How to disable DoT (DNS over TLS) with Stubby and Dnsmasq

I followed the instructions here to set up DoT. It was working OK, but I'd now like to disable it.

So I basically want to reverse these commands:

/etc/init.d/dnsmasq stop
uci set dhcp.@dnsmasq[0].noresolv="1"
uci set dhcp.@dnsmasq[0].localuse="1"
uci -q delete dhcp.@dnsmasq[0].server
uci get \
| sed -e "s/\s/\n/g;s/@/#/g" \
| while read -r STUBBY_SERV
do uci add_list dhcp.@dnsmasq[0].server="${STUBBY_SERV}"
uci commit dhcp
/etc/init.d/dnsmasq start

I believe I've done that for most of them, but I'm not sure what the reverse of:

uci -q delete dhcp.@dnsmasq[0].server

Anyone know what to type to reverse the action of that command?

1 Like

If you were not using any server directly to the dnsmasq, then dnsmasq will use the nameservers it has available from the interfaces, e.g from your ISP. If you had some nameserver there, you'll need to restore it. It's also good idea to take a backup before you try such things.

1 Like

Interesting topic. Did you ever figure out how to reverse?