For couple of days now I've woken up in the morning and whilst my LAN is fine no device on the network, including the router can resolve anything via DNS. I can ping addresses by IP address from any device on the network, including the router (obviously!) and SSH to my VPS (based on IP address), but no joy resolving URLs. Restarting the WAN interface didn't resolve the problem and only rebooting seems to resolve it.
My network configuration looks as follows....
config interface 'wan'
option proto 'pppoe'
option ifname 'eth1'
option username '##########'
option password '##########'
option ipv6 'auto'
option mtu '1500'
option keepalive '0'
option _orig_ifname 'eth1'
option _orig_bridge 'false'
option peerdns '0'
option dns '1.1.1.1 8.8.8.8 9.9.9.10'
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'
The relevant section of my /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option localservice '1'
option serversfile '/tmp/adb_list.overall'
config dhcp 'lan'
option interface 'lan'
option start '2'
option limit '20'
option leasetime '12h'
option dhcpv6 'server'
option ra 'server'
option ra_management '1'
list dhcp_option 'option:dns-server,192.168.1.1'
I have tried installing dnscrypt and have the configuration below, but on re-reading the linked page I do not think I've ever configured it correctly as I did not comment out the line option resolvfile /tmp/resolv.conf.auto
and add in the lines to point to dnscrypt so I don't think that can be the issue but am including it for completeness.
config global
# start dnscrypt-proxy from procd interface trigger rather than immediately in init
# if needed you can restrict trigger to certain interface(s)
# list procd_trigger 'wan'
# list procd_trigger 'wan6'
config dnscrypt-proxy ns1
option address '127.0.0.1'
option port '5353'
option resolver 'fvz-anyone'
Strange thing is its been fine for a long time (like a year) and its just started playing up without any update.
I found in the logs...
Tue Nov 26 06:00:32 2019 user.err adblock-3.6.5[11635]: 'dnsmasq' not running or not executable
...suggesting that the dnsmasq process may have died, but nothing indicating why it would have died.
I've tried using uci
but it results in...
~$ uci show network
uci: I/O error
On the back of which I searched and found this thread suggesting the flash memory may be on its way out :-/
Any advice or suggestions on how to investigate this or any other possible causes/solutions to the DNS issue would be appreciated.
Thanks in advance.