abstractable
New Around Here
Sorry for digging up an old thread but I wanted to share my final solution to disable broadcasting any IPv6 DNS server with Merlin-Asuswrt firmware. I want to keep IPv6 enabled on my router for the outside world but there is no need for my Pi Hole to be reachable via IPv6. I therefore added a /jffs/scripts/dnsmasq.postconf file with the following contents:
I then made this script executable and rebooted the router. All DNS options for IPv6 have now disappeared from /etc/dnsmasq.conf and an empty option6:23 line is added at the bottom to stop the router from broadcasting an IPv6 DNS server altogether. This is done on an Asus ET8 router with 3004.388.5_0-gnuton1 firmware.
Bash:
#!/bin/sh
#Remove all DNS6 entries
sed -i '/^.*option6.*$/d' $1
#Disable broadcasting router IP6 as DNS6 server
echo "dhcp-option=option6:23" >> $1
I then made this script executable and rebooted the router. All DNS options for IPv6 have now disappeared from /etc/dnsmasq.conf and an empty option6:23 line is added at the bottom to stop the router from broadcasting an IPv6 DNS server altogether. This is done on an Asus ET8 router with 3004.388.5_0-gnuton1 firmware.