I installed dnsmasq to provide both DHCP and DNS on my home network. Everything was working swimmingly until just now.
Seemingly out of the blue I was unable to connect to the internet on any computer on my network. Nor could I connect to the computer running dnsmasq by hostname.
I couldn't for the life of me figure out what was wrong. I tried restarting the computer. I tried restarting dnsmasq. I checked the dnsmasq syslog entries and I noticed that, after restarting dnsmasq, dnsmasq was complaining about /var/run/dnsmasq/resolv.conf being empty. That seemed weird.
I checked /etc/network/interfaces, several times, and finally I noticed that the stanza for the relevant interface in my file was slightly different than an example I saw online.
Here's what I had:
auto eth0 iface eth0 inet static address 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.1 nameserver 192.168.1.1
I changed the last line to this:
and almost immediately after I restarted the interface, DNS requests were working again.
How was dnsmasq working before I changed the interfaces files?