How to setup Reverse DNS and PTR records

灰暗的星星灰暗的星星灰暗的星星灰暗的星星灰暗的星星
 

DNS can be tricky. There is a lot to know and, even when you think you have a firm grasp on it, surprises still pop up. Reverse DNS and PTR record configuration is one of those sneaky topics, but it's crucial to SPAM prevention during email delivery.

For some reason I was unable to find a clear and simple answer out there for how to accomplish this task, so that is my goal with this post. A simple explanation of reverse DNS is that it’s the exact opposite of DNS. Standard (aka forward) DNS maps a domain name to an IP address whereas reverse DNS maps an IP address to a domain name. The two are distinct and separate lookups however. Just because a forward lookup of example.com resolves to 1.2.3.4 doesn’t mean that a reverse lookup of 1.2.3.4 will resolve to example.com.

Real example:

In the case of ITWorld, the reverse DNS resolves to an Amazon EC2 cloud host which is powering its DNS servers.

Why it’s needed

The most common reason for establishing a reverse DNS is for outbound e-mail servers. Since a reverse DNS record adds further tracing to the origin of an e-mail, it also adds credibility to the e-mail server itself. For that reason, some incoming mail servers will not even consider accepting a message from an IP address which does not identify itself with a PTR record in a reverse DNS zone.

How to do it

A very important thing to note, you must create the reverse DNS zone on the authoritative DNS nameserver for the main IP address of your server. You can find out which nameserver is the authoritative server by entering the IP address you’re trying to configure into the DIG Web Interface. If the Reverse response is not provided by your nameserver, you’ll need to contact your hosting provider to help you set a PTR record. You should be able to accomplish that be emailing their support team and letting them know you’d like a PTR record set for the IP address X.X.X.X resolving to yourdomain.example.com.

If you are in control of the authoritative nameserver, the first step is to create a reverse DNS zone. The hostname for the zone has to be in a very specific format. It starts with a portion of your IP address written backward followed by .in-addr.arpa.

If for example your IP address is 192.168.0.100, you start by dropping the final octet (last set of numbers) to give you 192.168.0

Next, you need to reverse that fragment of the IP address giving you: 0.168.192

Finally, append .in-addr.arpa. leaving you with the completed reverse zone domain of: 0.168.192.in-addr.arpa.

Create the PTR Recrod

Now that you’ve created your zone file you can create the PTR record.

Add a new PTR record and for the name, enter the final digit of the IP address that you’re setting up the reverse record for. In our example, 100. For the Canonical Hostname, enter the domain name you’d like the IP address to resolve to, for instance mailserver.example.com.

After you’ve saved your zone file, allow some time for the change to propagate before validating the new reverse DNS record. If everything went properly, you should see something like the following the next time you run the DIG Web Interface Tool:

100.0.168.192.in-addr.arpa. 6230 IN PTR mailserver.example.com.

提交评论


安全码
刷新

 

自1996年以来,公司一直专注于域名注册、虚拟主机、服务器托管、网站建设、电子商务等互联网服务,不断践行"提供企业级解决方案,奉献个性化服务支持"的理念。作为戴尔"授权解决方案提供商",同时提供与公司服务相关联的硬件产品解决方案。
 

联系方式

地址:河南省郑州市经五路2号

电话:0371-63520088 

QQ:76257322

网站:800188.com

电邮:该邮件地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。

微信:用企业微信联系