asuswrt-merlin, SLACC, and custom V6 DNS servers

I decided to try out the TimeWarner IPv6 support again now that my area has the MAXX service and to my surprise it actually worked. Unfortunately TimeWarner also "helps" you out with those pesky internet hostnames and provides you a nice splashy search screen full of ads when you type the wrong hostname.

I've fixed this on the IPv4 side by setting my DNS servers to the Google public servers however couldn't get it to work on the IPv6 side. My config is as follows:

Every v6 RA included the TimeWarner V6 DNS server

The problem lies in the way that asuswrt-merlin sets up the v6 DNS servers when SLACC is enabled on the public side of the firewall. To fix this we simply have to modify the dnsmasq.conf file before restarting the service. To do this simply drop the following file into /jffs/scripts/dnsmasq.postconf, chmod +x the file, and restart.

#!/bin/sh

CONFIG=$1  
source /usr/sbin/helper.sh

pc_replace "dhcp-option=lan,option6:23,[::]" "dhcp-option=lan,option6:23,[$(nvram get ipv6_dns1)],[$(nvram get ipv6_dns2)]" $CONFIG  

Run service restart_dnsmasq and check the config file located at /tmp/etc/dnsmasq.conf.

Fixed!