logo
. . .

Mastering Ubuntu: A Step-by-Step Guide to Setting Up Reverse DNS PTR Records

Step 1: Access DNS Configuration
Ensure you have access to your DNS server configuration. Depending on your setup, this might be managed through a hosting provider or a control panel like BIND.

Step 2: Identify the IP Address
Identify the specific IP address you want to associate with a domain name. This is typically the IP address of your Ubuntu server.

Step 3: Create the PTR Record
Open the DNS configuration file on your Ubuntu server. The location may vary, but it’s commonly found in /etc/bind/named.conf or /etc/bind/named.conf.local.
Add a PTR record for your chosen IP address in reverse order. For example:

1.0.0.127.in-addr.arpa. IN PTR example.com.
Ensure the IP address is reversed and ends with in-addr.arpa.
Step 4: Restart DNS Service
After making changes, restart the DNS service to apply the new configuration:

#systemctl restart bind9 # For Ubuntu 16.04 and later
Step 5: Verify Configuration
Use online tools such as MXToolbox to confirm that your PTR record is correctly configured.