2

Morning. Trying to setup dnsmasq on my little network, and having some trouble.

Running

 dig cnn.com

; <<>> DiG 9.11.5-P4-5.1ubuntu2.1-Ubuntu <<>> cnn.com
;; global options: +cmd
;; connection timed out; no servers could be reached

trying directly to check my server, I get the following:


nslookup cnn.com 172.16.99.50 
Server:         172.16.99.50 
Address:   172.16.99.50#53

Non-authoritative answer: Name:   cnn.com 
Address: 151.101.1.67 
Name: cnn.com 
Address: 151.101.129.67 
Name:   cnn.com 
Address: 151.101.65.67
...

Looking at the dnsmasq service, I see the following:

status dnsmasq.service 
dnsmasq.service - dnsmasq - A lightweight
DHCP and caching DNS server    Loaded: loaded
(/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-02-07 13:08:31 IST; 15min ago 
Process: 2232 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited,
status=0/SUCCESS)   Process: 2233 ExecStart=/etc/init.d/dnsmasq
systemd-exec (code=exited, status=0/SUCCESS)   Process: 2259
ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf
(code=exited, status=0/SUCCESS)  Main PID: 2258 (dnsmasq)
    Tasks: 1 (limit: 4915)    Memory: 2.2M    CGroup: /system.slice/dnsmasq.service
           └─2258 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7
/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-serv

Feb 07 13:08:26 Rain dnsmasq[2232]: dnsmasq: syntax check OK. Feb 07
13:08:26 Rain dnsmasq[2258]: started, version 2.80 cachesize 150 Feb
07 13:08:26 Rain dnsmasq[2258]: compile time options: IPv6 GNU-getopt
DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC
loop-detect inotify dump Feb 07 13:08:26 Rain dnsmasq[2258]: using
nameserver 8.8.4.4#53 Feb 07 13:08:26 Rain dnsmasq[2258]: using
nameserver 8.8.8.8#53 Feb 07 13:08:26 Rain dnsmasq[2258]: using local
addresses only for domain xxxxx.local
**Feb 07 13:08:26 Rain dnsmasq[2258]: no servers found in /run/dnsmasq.resolv.conf, will retry** Feb 07 13:08:26 Rain
dnsmasq[2258]: bad name at /etc/hosts line 12 Feb 07 13:08:26 Rain
dnsmasq[2258]: read /etc/hosts - 45 addresses Feb 07 13:08:31 Rain
systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS
server.

the /run/dnsmasq/resolv.conf file is empty (and obviously get overridden on restarting the service).

ON the dnsmasq, I set the no-resolve option to ignore the /etc/resolv.conf file So I believe there's a problem pointing the queries to the local dnsmasq instance since if I point it explicitly things do work. Any ideas where does the dnsmasq take the definition for the /run/dnsmasq/resolv.conf file ?

Any other troubleshooting steps ?

Thanks in advance !

0 Answers0