Skip to content
CitexNode
All guides

IPv6 and reverse DNS

Find and test your VPS's IPv6 address, set reverse DNS in the dashboard and check it.

5 min read

Your VPS has an IPv4 and an IPv6 address. This guide shows how to find and test the IPv6 address in the system, and how to set reverse DNS for both addresses.

Covers Debian 12 and 13, Ubuntu 22.04 and 24.04, AlmaLinux 9 and Rocky Linux 9. Commands run as root.

Which addresses does the VPS have?

In the dashboard, open your VPS and the Network tab. Under IP addresses you see both addresses, each marked IPv4 or IPv6.

On the server itself:

bash
ip -6 addr show scope global
ip -6 route show default

The first shows the IPv6 address (inet6 …/…), the second the default route (default via …). Both should be present, and the address should match the one in the dashboard.

Addresses starting with fe80: are only valid on the local link (link-local); they do not count here.

Test IPv6

From the server outwards:

bash
ping -6 -c 3 ipv6.google.com
curl -6 https://ifconfig.co

The ping should get replies, and curl should print your IPv6.

From outside to the server: if your PC has IPv6 (check e.g. at https://test-ipv6.com), run from there:

bash
ping YOUR-IPV6
ssh root@YOUR-IPV6

On Windows the command is ping -6 YOUR-IPV6.

Firewall for IPv6

Rules for services must apply to IPv6 too. ufw creates rules for both automatically as long as /etc/default/ufw has IPV6=yes (the default). firewalld also covers both. Your own nftables rules in an inet table apply to both, in an ip table only to IPv4.

Point a domain at the IPv6

If your service also runs over IPv6, add an AAAA record with the IPv6 to your domain, next to the A record for the IPv4. See Managing DNS records. Only set the AAAA record if the service is really reachable over IPv6.

What reverse DNS is

A normal DNS record translates a name into an address (mail.example.com → 203.0.113.5). Reverse DNS (a PTR record) goes the other way: address → name.

You mainly need it for a mail server. Many receivers reject mail from addresses without a matching PTR. Websites, game servers or a VPN do not need it.

The name should match in both directions: the address's PTR points to mail.example.com, and mail.example.com has an A or AAAA record pointing to exactly this address.

Set reverse DNS in the dashboard

  1. First create the A (and, if wanted, AAAA) record for the name, e.g. mail.example.com.
  2. In the dashboard, open your VPS, Network tab.
  3. Under IP addresses, click rDNS next to the address.
  4. In the field Reverse DNS for …, enter the fully qualified hostname, e.g. mail.example.com.
  5. Click Save. You see Reverse DNS saved.

Saving an empty field removes the entry. After saving, the button briefly shows Save in … s; after that you can change it again.

For the IPv6, do the same in its row. If saving fails for the IPv6, open a ticket with the address and the name you want.

Check that it worked

In the dashboard, the address now shows PTR mail.example.com.

In DNS, check with dig (package dnsutils or bind9-dnsutils on Debian and Ubuntu, bind-utils on AlmaLinux and Rocky Linux):

bash
dig -x 203.0.113.5 +short
dig mail.example.com A +short

The first query should return mail.example.com., the second 203.0.113.5 again. For IPv6 the same with dig -x YOUR-IPV6 +short and dig mail.example.com AAAA +short.

A new PTR can take a while to be visible everywhere, up to a few hours depending on caches.

Common errors

  • "Enter a fully qualified hostname". The name needs at least a domain with an ending, e.g. mail.example.com, not just mail.
  • ip -6 addr shows no global address, but the dashboard lists one. The network configuration in the system is missing or was overwritten. Open a ticket; the Console in the dashboard gets you onto the server even without network.
  • IPv6 ping works outwards but not inwards. The firewall blocks ICMPv6 or the port. Check ufw status or firewall-cmd --list-all.
  • dig -x still shows the old name. The old entry is still cached. Check again later.
  • Mail is rejected despite a PTR. PTR and A record do not match, or SPF, DKIM and DMARC are missing. See Sending mail from your VPS.

What next

If you get stuck, open a ticket.