So, I’ve followed guides on how to get Dnsmasq configured for local DNS and DHCP on a RPi, I’m running Ubuntu Mate 16.04 on my RPi. I believe I have something configured incorrectly because none of my clients on my LAN can resolve host names of each other. The host name of my Dnsmasq DNS and DHCP server is pimate. Here is the config:
domain-needed
bogus-priv
domain=2019.local
expand-hosts
local=/2019.local/
#interface=enxb827eb678f55
listen-address=127.0.0.1
#listen-address=192.168.15.12
bind-interfaces
dhcp-range=lan, 192.168.15.100, 192.168.15.160, 12h
dhcp-option=lan,3, 192.168.15.1
dhcp-option=lan,6, 192.168.15.12
dhcp-host=ac:9e:17:b4:f1:e3,192.168.15.10
server=208.67.222.222
server=208.67.220.220
log-facility=/var/log/dnsmasq.log
log-async
Here is the /etc/hosts file on my Dnsmasq DNS/DHCP server:
192.168.15.12 pimate
192.168.15.12 pimate.2019.local
127.0.0.1 localhost
127.0.1.1 pimate
192.168.15.1 router
192.168.15.2 merakisw
192.168.15.3 roboteye1
192.168.15.4 roboteye2
192.168.15.5 roboteye3
192.168.15.6 re200
192.168.15.7 merakiap
192.168.15.8 bufnas
192.168.15.9 xbox
192.168.15.10 edmate1604
192.168.15.30 robotmedia
192.168.15.98 brothers
192.168.15.99 hp
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Here what I am seeing when I run 'netstat -aunp:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:67 0.0.0.0:* 9200/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 1227/dnsmasq
udp 0 0 0.0.0.0:631 0.0.0.0:* 1020/cups-browsed
udp 0 0 192.168.15.12:123 0.0.0.0:* 1692/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 1692/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 1692/ntpd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 975/avahi-daemon: r
udp 0 0 127.0.0.1:36831 127.0.1.1:53 ESTABLISHED 2319/synergyc
udp 0 0 0.0.0.0:38374 0.0.0.0:* 975/avahi-daemon: r
udp 0 0 127.0.0.1:53 0.0.0.0:* 9200/dnsmasq
udp 0 0 127.0.1.1:53 0.0.0.0:* 1227/dnsmasq
udp 0 0 192.168.15.12:53 0.0.0.0:* 1227/dnsmasq
udp6 0 0 fe80::d269:be77:3cb:123 :::* 1692/ntpd
udp6 0 0 ::1:123 :::* 1692/ntpd
udp6 0 0 :::123 :::* 1692/ntpd
udp6 0 0 :::5353 :::* 975/avahi-daemon: r
udp6 0 0 :::34564 :::* 975/avahi-daemon: r
Looking at the /var/log/dnsmasq.log file I see this:
Aug 7 15:38:59 dnsmasq-dhcp[8753]: DHCP, IP range 192.168.15.100 -- 192.168.15.160, lease time 1h
Aug 7 15:38:59 dnsmasq[8753]: using nameserver 208.67.220.220#53
Aug 7 15:38:59 dnsmasq[8753]: using nameserver 208.67.222.222#53
Aug 7 15:38:59 dnsmasq[8753]: using local addresses only for domain 2019.local
Aug 7 15:38:59 dnsmasq[8753]: no servers found in /var/run/dnsmasq/resolv.conf, will retry
Aug 7 15:38:59 dnsmasq[8753]: read /etc/hosts - 21 addresses
Aug 7 15:39:40 dnsmasq[8753]: reading /var/run/dnsmasq/resolv.conf
Aug 7 15:39:40 dnsmasq[8753]: using nameserver 208.67.220.220#53
Aug 7 15:39:40 dnsmasq[8753]: using nameserver 208.67.222.222#53
Aug 7 15:39:40 dnsmasq[8753]: using local addresses only for domain 2019.local
Aug 7 15:39:40 dnsmasq[8753]: ignoring nameserver 127.0.0.1 - local interface
Aug 7 15:39:41 dnsmasq[8753]: no servers found in /var/run/dnsmasq/resolv.conf, will retry
Aug 7 15:42:39 dnsmasq[8753]: exiting on receipt of SIGTERM
Aug 7 15:42:40 dnsmasq[9200]: started, version 2.75 cachesize 150
Aug 7 15:42:40 dnsmasq[9200]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Aug 7 15:42:40 dnsmasq-dhcp[9200]: DHCP, IP range 192.168.15.100 -- 192.168.15.160, lease time 1h
Aug 7 15:42:40 dnsmasq[9200]: using nameserver 208.67.220.220#53
Aug 7 15:42:40 dnsmasq[9200]: using nameserver 208.67.222.222#53
Aug 7 15:42:40 dnsmasq[9200]: using local addresses only for domain 2019.local
Aug 7 15:42:40 dnsmasq[9200]: no servers found in /var/run/dnsmasq/resolv.conf, will retry
Aug 7 15:42:40 dnsmasq[9200]: read /etc/hosts - 22 addresses
While researching some one mentioned on a thread that Network Manager can cause a conflict and comment out the dnsmasq entry in /etc/NetworkManager/NetworkManager.conf, I have done that:
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
[ifupdown]
managed=false
One thing I find interesting in the /var/log/dnsmasq.log is this:
Aug 7 15:42:40 dnsmasq[9200]: no servers found in /var/run/dnsmasq/resolv.conf, will retry
My /var/run/dnsmasq/resolv.conf is empty.
This is my /etc/resolv.conf:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
Thoughts? Any idea why no one can resolve host names on my LAN? I can’t even resolve the DNS server host name on all my clients.