Dnsmasq

From miki
Revision as of 09:13, 20 April 2022 by Mip (talk | contribs) (Created page with " == Links == * DNS. * Linux networking. * Network troubleshooting. * D-Bus. == Troubleshooting == DNS is down: <source lang="bash"> nslookup google.be # Serve...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Links

Troubleshooting

DNS is down:

nslookup google.be
# Server:       127.0.0.1
# Address:  127.0.0.1#53
# 
# ** server can't find google.be: NXDOMAIN

127.0.0.1:53 is served by dnsmasq:

sudo netstat -lpn | grep 127.0.0.1:53
# tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      30718/dnsmasq       
# udp        0      0 127.0.0.1:53            0.0.0.0:*                           30718/dnsmasq

On Debian, this is configured in /etc/resolv.conf:

# Generated by NetworkManager
nameserver 127.0.0.1

Let's bypass dnsmasq to see if issue is there. For this, we use Google DNS 8.8.8.8:

cat /etc/resolv.conf
# # Generated by NetworkManager
# nameserver 8.8.8.8

nslookup google.be
# Server:       8.8.8.8
# Address:  8.8.8.8#53
# 
# Non-authoritative answer:
# Name: google.be
# Address: 216.58.213.163
# Name: google.be
# Address: 2a00:1450:4007:811::2003

DNS is back when bypassing dnsmasq.

Apparently killing dnsmasq is enough to restore the service (this will restore /etc/resolv.conf)

sudo pkill dnsmasq