It appears that /etc/
and /tmp/etc/
are the same.
# Connect to the router.
telnet 192.168.1.1
# Edit as needed.
vi /tmp/etc/dnsmasq.conf
vi /tmp/etc/resolv.conf
# Restart dnsmasq.
killall dnsmasq && dnsmasq --log-async --no-poll
# Verify that the reported "Server" is the expected DNS server.
nslookup www.google.com
These links were helpful:
You can also use https://github.com/jacklul/asuswrt-scripts with the stock firmware. I'm using the scripts in that repo to replicate all the functionality needed from ASUSWRT-Merlin including dnsmasq manipulation and allowing config to survive reboots. I needed to do this because there is no ASUSWRT-Merlin version for the RT-AX89X afaik.