Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 Basics & Questions & General Chatter => Topic started by: porjo on May 10, 2015, 04:30:11 AM

Title: DNS resolver
Post by: porjo on May 10, 2015, 04:30:11 AM
I've just configured IPv6 tunnel with an OpenWRT router. It's all working fine, however I noticed that my clients are using the HE end of my 6in4 tunnel as a DNS resolver. For example, on my laptop (running Linux):

Code: [Select]
$ cat /etc/resolv.conf
# Generated by NetworkManager
search lan lan.
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 2001:470:1f05:467::1

That last nameserver IP corresponds with my 6in4 tunnel IP - my end is ::2 and the HE end is ::1. This is not causing me a problem (DNS lookups against that IP work!), but I was curious to know:

- why is my router sending that IP as a DNS resolver? (i.e. is this behaviour part of the IPv6 spec?)
- should I be using that IP to resolve DNS against? (the Henet doco doesn't mention this)
- can I override this with another IP, for example 2001:470:20::2 (the anycast caching nameserver listed in my tunnel setup details)?

For reference, my OpenWRT network config is:

Code: [Select]
config interface 'wan6'
option proto 6in4
option peeraddr  '72.52.104.74'
option ip6addr   '2001:470:1f04:467::2/64'
option ip6prefix '2001:470:1f05:467::/64'
option tunnelid  '12341234'
option username  'xxxxxxxx'
        option updatekey 'xxxxxxxxxxxxxx'

Thanks.
Title: Re: DNS resolver
Post by: porjo on May 10, 2015, 03:01:40 PM
Turns out that the behaviour is caused by the odhcpd process which handles ipv6 router advertisements for OpenWRT. Modifying /etc/config/dhcp as follows allowed me to override the DNS resolver:

Code: [Select]
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'server'
option ra 'server'
option ra_management '1'
list dns '2001:470:20::2'

(I added the last line)
Title: Re: DNS resolver
Post by: snarked on May 15, 2015, 06:56:05 PM
Quote
That last nameserver IP corresponds with my 6to4 tunnel ....
6in4, not 6to4.  6to4 IPv6 addresses are in the range 2002::/16.
Title: Re: DNS resolver
Post by: porjo on May 21, 2015, 10:26:43 PM
Quote
6in4, not 6to4.
Yes, quite right! Oops. I've updated my original post now.