[Dnsmasq-discuss] log-queries

Simon Kelley simon at thekelleys.org.uk
Sat Apr 14 12:48:05 BST 2007


Petar Aleksich wrote:
> Hello,
> 
> I have here a prob setting up dnsmasq on my router box:
> 
> I want to have 2 resolv.conf ... one for the system itself
> in /etc/resolv.conf which points to nameserver 127.0.0.1 to use the
> local dnsmasq. dnsmasq itself uses /etc/ppp/resolv.conf which is set to
> my providers domain-servers when the internet connection is established.
> 
> All seems to work fine except for the fact that after some time i
>  noticed that with log-queries enabled dnsmasq doesn't answer DNS
> queries from the LAN.
> 
> I'm running dnsmasq for local DNS cache and dhcpd to serve IPs on my
> gentoo box and this is how my setup looks :
> 
> ------------------
> # sed -e 's/#.*//;/^\s*$/d' "$@" /etc/dnsmasq.conf
> resolv-file=/etc/ppp/resolv.conf
> interface=lan
> interface=lo
> listen-address=192.168.0.1
> listen-address=127.0.0.1
> log-queries
> ----------------
> # cat /etc/resolv.conf
> nameserver 127.0.0.1
> -----------------
> # cat /etc/dhcp/dhcpd.conf
> authoritative;
> ddns-update-style interim;
> subnet 192.168.0.0 netmask 255.255.255.0 {
>         range 192.168.0.200 192.168.0.250;
>         default-lease-time 259200;
>         max-lease-time 518400;
>         option subnet-mask 255.255.255.0;
>         option broadcast-address 192.168.0.255;
>         option routers 192.168.0.1;
>         option domain-name-servers 192.168.0.1;
> }
> 
> host kaja {
>         hardware ethernet 00:0f:ea:34:12:93;
>         fixed-address 192.168.0.240;
> }
> -------------------------------------------
> My syslog shows this when dnsmasq is started
> 
> Apr 13 15:02:12 phearless dnsmasq[8252]: reading /etc/resolv.conf
> Apr 13 15:02:12 phearless dnsmasq[8252]: using nameserver
> 212.200.190.150#53
> Apr 13 15:02:12 phearless dnsmasq[8252]: using nameserver
> 212.200.191.150#53
> Apr 13 15:13:13 phearless dnsmasq[8252]: reading /etc/resolv.conf
> Apr 13 15:13:13 phearless dnsmasq[8252]: using nameserver
> 212.200.190.150#53
> Apr 13 15:13:13 phearless dnsmasq[8252]: using nameserver
> 212.200.191.150#53
> Apr 13 15:13:23 phearless dnsmasq[8252]: reading /etc/resolv.conf
> Apr 13 15:13:23 phearless dnsmasq[8252]: using nameserver
> 212.200.190.150#53
> Apr 13 15:13:23 phearless dnsmasq[8252]: using nameserver
> 212.200.191.150#53
> Apr 13 15:13:31 phearless dnsmasq[8252]: exiting on receipt of SIGTERM
> Apr 13 15:15:07 phearless dnsmasq[22219]: started, version 2.38
> cachesize 150
> Apr 13 15:15:07 phearless dnsmasq[22219]: compile time options: IPv6
> GNU-getopt no-ISC-leasefile DBus no-I18N no-TFTP
> Apr 13 15:15:07 phearless dnsmasq[22219]: reading /etc/resolv.conf
> Apr 13 15:15:07 phearless dnsmasq[22219]: using nameserver
> 212.200.190.150#53
> Apr 13 15:15:07 phearless dnsmasq[22219]: using nameserver
> 212.200.191.150#53
> Apr 13 15:15:07 phearless dnsmasq[22219]: read /etc/hosts - 8 addresses
> 
> 
> My question is how can i see what's happening with DNS
> queries from the LAN. And were does dnsmasq keep local cache?

logging of DNS queries goes to log-level "debug" which might be saved 
somewhere else: you need to look at the configuration of your syslogd to 
find where.

The local cache is stored in memory: Once you solved the log problem, 
you can get the current contents dumped to the log by sending SIGUSR1 to 
dnsmasq.


Cheers,

Simon.

> 
> Thanks
> 
> 
> 
> 
> 
> 
> 
> 




More information about the Dnsmasq-discuss mailing list