What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Custom IPv6 DNS in Router Advertisements

ugdp3

New Around Here
I have an ASUS RT-AX59U router running the official firmware (Merlin is not available), and a Pi-hole on my network acting as DNS. I have configured the router's DNS settings (both LAN/WAN) to be the Pi-hole instead of my ISP's DNS servers. This works well on IPv4 (DHCP includes my Pi-hole's private IPv4 address), however for IPv6 the router always declares itself as DNS in the Router Advertisements instead of passing along my Pi-hole's (link-local) IPv6 address. The router is effectively proxying all IPv6 DNS requests, and since most devices on my network prefer IPv6, this results in nearly all Pi-hole traffic appearing to come from the router itself. So basically, the "Advertise router's IP in addition to user-specified DNS" option only works for IPv4, but not IPv6. Does anyone know of any workaround, possibly involving custom scripts, in order to force the router to supply the correct IPv6 DNS server? Note that my ISP supplies dynamic IPv6 prefixes and as such I cannot have other devices on my network generate RAs.
 
Not sure about the router settings for IPV6 but setting the Pi-Hole to be the DHCP server may fix your problem.
Then again, going back to IPV4 will also fix the problem.
 
Did you follow the ipv6 instructions here?
https://www.asus.com/support/faq/1046062/
Yes, I did set the IPv6 DNS to my Pi-hole, and it "works", however it's being proxied by the router. The RA messages contain the IPv6 address of my router instead of that of my Pi-hole.

Not sure about the router settings for IPV6 but setting the Pi-Hole to be the DHCP server may fix your problem.
Then again, going back to IPV4 will also fix the problem.
The IPv4 side of things work correctly, and DNS is set to my Pi-hole's IPv4 address. The problem is with IPv6, which doesn't use DHCP but rather SLAAC with RA messages (stateful DHCPv6 is disabled). I'd like to actually use IPv6. I'm trying to see if there is a way to override the router's internal configuration files to force it to advertise my Pi-hole's IPv6 address instead of itself.
 
I'm not running IPv6 now, but when I was, I was able to change the RA DNS using the "listen-address=" parameter in the corresponding dnsmasq config file. Not sure if that method would work here.

Edit: note, I created and used an ULA for this. Not sure a local link address would work.
 
Last edited:
Maybe. Check this thread for details:
 
I seem to have successfully set up asuswrt-scripts, together with a corresponding /jffs/scripts/dnsmasq.postconf script:

Bash:
#!/bin/sh

[ -z "$1" ] && exit 1

# Remove IPv6 DNS servers
sed -i '/^dhcp-option=lan,option6:23.*$/d' $1
# Add Pi-hole as IPv6 DNS
echo "dhcp-option=lan,option6:23,[fe80::addressgoeshere]" >> $1

My router is finally advertising the correct IPv6 DNS in router advertisements now :). I haven't tried rebooting the router, but if I understand correctly persistence should work thanks to the USB hook mechanism used by asuswrt-scripts.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top