LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to diagnose dnsmasq problems? (http://www.linuxquestions.org/questions/linux-software-2/how-to-diagnose-dnsmasq-problems-947706/)

catkin 05-31-2012 03:04 AM

How to diagnose dnsmasq problems?
 
Is there any further diagnosis that can be done before packet sniffing?

dnsmasq suddenly stopped working (it stopped resolving names). Its config files had not been changed for at least several weeks:
Code:

root@CW8:~# ll /etc/*dnsmasq*
-rw-r--r-- 1 root root 22K Apr 10 16:37 /etc/dnsmasq.conf
-rw-r--r-- 1 root root 22K Mar 16  2011 /etc/dnsmasq.conf.org
-rw-r--r-- 1 root root 703 Jun 21  2010 /etc/resolv.dnsmasq.conf

/etc/dnsmasq.d:
total 0

Starting dnsmasq with --log-queries and running dig linuxquestions.org produced this output in /var/log/messages, showing dnsmasq is receiving the query and querying the usual DNS servers -- but does not get an answer.
Code:

May 31 12:29:17 CW8 dnsmasq[6420]: query[A] linuxquestions.org from 127.0.0.1
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 61.0.0.5
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 61.1.96.69
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 61.1.96.71
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 61.1.96.72
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.240.23
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.240.135
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.240.180
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.240.181
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.240.208
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.245.1
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.255.139
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.255.145
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 218.248.255.146
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 4.2.2.1
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 4.2.2.2
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 4.2.2.3
May 31 12:29:17 CW8 dnsmasq[6420]: forwarded linuxquestions.org to 4.2.2.4

Adding a DNS server before the loopback for dnsmasq in /etc/resolv.conf worked around the problem:
Code:

search localdomain
nameserver 4.2.2.4
nameserver 127.0.0.1

There is no firewall:
Code:

root@CW8:~# iptables --list
Chain INPUT (policy ACCEPT)
target    prot opt source              destination       

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination       

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination



All times are GMT -5. The time now is 10:28 AM.