A reverse DNS lookup (or resolution) is a querying technique used to determine the domain name associated with an IP address. This is the opposite of the typical forward DNS lookup where you use a domain name to look up the corresponding IP address. NS1 users can host reverse DNS for both IPv4 and IPv6 subnets.
To configure reverse DNS for a subnet, you must first create a new reverse zone:
- In the NS1 portal, click the Zones tab.
- Click the Add Zone button to create a new zone.
- Enter the domain name for the reverse zone as follows:
IPv4 example - if you want to host reverse DNS for the 22.214.171.124/24 IPv4 subnet, the reverse zone domain name would be 3.2.1.in-addr.arpa. For smaller sized IPv4 subnets, please see the note below.
IPv6 example - if you want to host reverse DNS for the 1234:5678:90ab:cdef::/64 IPv6 subnet, the reverse zone domain name would be f.e.d.c.b.a.0.9.8.7.126.96.36.199.2.1.ip6.arpa. The same pattern applies to other size subnets such as 1234:5678:90ab::/48 being b.a.0.9.8.7.188.8.131.52.2.1.ip6.arpa.
- Click Save Zone.
- From the Zones list, click the name of the reverse zone you just created to view all associated records.
If you do not see the new zone, ensure the Show Reverse Zones check box is ticked.
- Scroll to the bottom of the page, and click Add Record on the bottom left side.
- Under Record Type, select PTR (pointer) from the drop-down menu.
- In the Name field, enter the final octet of the IP address for your resource/server or leave blank for a root-level record.
- In the Answers section, add the fully-qualified domain name of your resource/server.
- Click Add Answers.
- If you own the subnet, change the delegation of the reverse DNS zone with your RIR (e.g., ARIN, RIPE, etc.) to point to the DNS servers assigned to your reverse zone.
These are shown on the Nameservers tab for your zone.
Note: To configure reverse DNS for an IPv4 subnet that is smaller than a /24 (such as /29), work with the owner of the IP space (for example, your hosting provider) to sub-delegate a reverse zone on your behalf. In general, they will sub-delegate a zone with a name like 0/184.108.40.206.in-addr.arpa or 0-220.127.116.11.in-addr.arpa. Either format is valid when configuring with NS1.
- Ask your provider which format ("/" or "-") they will use, and then create the zone as instructed.
- Within the zone, create records for each IP address using the PTR record type - for example, 4.0/18.104.22.168.in-addr.arpa. - to provide a reverse name for the 22.214.171.124 IP address when the 126.96.36.199/29 network has been sub-delegated.
- Please make sure to tell your provider which DNS nameservers are assigned to your reverse zone. You can view them by clicking the zone and selecting the Nameservers tab.
For IPv6 subnets, if you have been directly assigned the IPv6 space by your RIR, you can delegate the reverse zone to yourself. Otherwise, you will need to work with your provider to sub-delegate the reverse zone.