Tag Archives: ipv6

IPv6: RIPE reverse DNS delegation, tinydns PTR setup & classless delegation

RIPE explains how to set up IPv6 reverse DNS delegation pretty good here but it can be a bit confusing at times. Basically you have to simply send something like that to auto-dbm@ripe.net if your allocation is 2b02:0b08::/32

domain: 8.0.b.0.2.0.b.2.ip6.arpa
descr: Reverse delegation for Something Inc.
admin-c: SMTH-RIPE
tech-c: SMTH-RIPE
zone-c: SMTH-RIPE
nserver: ns1.something.com
nserver: ns2.something.com
changed: someone@something.com 20130531
source: RIPE
mnt-by: SOMETHING-MNT
password: yourmntpasswd

ns1.something.com and ns2.something.com are only reachable via IPv4 at this time, but since most IPv6 hosts are hopefully dual-stacked, it shouldn’t matter. Before you tell RIPE to delegate to you, add something like this to tinydns:

Z8.0.b.0.2.0.b.2.ip6.arpa:ns1.something.com:dnsmaster.something.com:1:86400:86400:86401:86400:86400:
&8.0.b.0.2.0.b.2.ip6.arpa::ns1.something.com
&8.0.b.0.2.0.b.2.ip6.arpa::ns2.something.com

^1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.0.0.0.0.8.0.b.0.2.0.b.2.ip6.arpa:some-example-host.something.com

The above will set up tinydns to serve PTR requests for your allocation and also sets up an example PTR record for 2b02:0b08:0:1::1 resolving to some-example-host.something.com.

Now, let’s say you have a customer with his own /64 assignment and you want to forward PTR requests for his assignment to his DNS a.k.a. classless delegation. Then you would set up the following in tinydns:

&7.0.0.0.0.0.0.0.8.0.b.0.2.0.b.2.ip6.arpa::dns1.customer.com:3600
&7.0.0.0.0.0.0.0.8.0.b.0.2.0.b.2.ip6.arpa::dns2.customer.com:3600

That’s it. To confirm it’s working you can query your own tinydns:

# dig @ip-of-your-tinydns -x 2b02:0b08:0:7::0001

;; QUESTION SECTION:
;1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.7.0.0.0.0.0.0.0.8.0.b.0.2.0.b.2.ip6.arpa. IN PTR

;; AUTHORITY SECTION:
7.0.0.0.0.0.0.0.8.0.b.0.2.0.b.2.ip6.arpa. 3600 IN NS dns1.customer.com.
7.0.0.0.0.0.0.0.8.0.b.0.2.0.b.2.ip6.arpa. 3600 IN NS dns2.customer.com.

Disable IPv6 on Linux (CentOS)

Just put this into /etc/sysctl.conf. No need to mess with the IPv6 modules.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

And also inet_protocols = ipv4 in /etc/postfix/main.cf

Why would you want to do that? I have a rogue IPv6 router advertising going on in my network that I can’t block. That results in Linux boxes assigning themselves an IPv6 address from that “foreign” router. This can cause trouble when sending eMail. For example DirectAdmins exim tries to send out via IPv6 by default and if there’s no PTR set for that IP eMails might not get delivered: “550-inconsistent or no DNS PTR record for 2a01:…”. The true solution is to set a PTR, remove the rogue RA or properly enable IPv6 on own network equipment with PTRs, so this is just a dirty workaround.

PS: If postfix doesn’t start up after you disabled IPv6 and complains with the error message “fatal: parameter inet_interfaces: no local interface found for ::1” then you could remove ::1 from /etc/hosts and postfix will run again.