How can I change the DNS settings using the command line in an openwrt router? I see these files here here
/etc/config/ddns
/etc/config/ipset-dns
But I slo see dnsmasq installed
but not sure which can change the DNS servers on the router
My end goal is to add a cron job that adds a custom DNS for couple of hours per day, then revert to the original DNS
Edit: I've found the following commands, can anybody explain?
uci set network.wan.dns='<list of space-separated DNS server IPs>'
uci commit network
reload_config
and
uci set network.wan.peerdns='0'
uci del network.wan.dns
uci add_list network.wan.dns='9.9.9.9'
uci add_list network.wan.dns='149.112.112.112'
uci commit