LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   dnsmasq question (https://www.linuxquestions.org/questions/slackware-14/dnsmasq-question-4175440513/)

Woodsman 12-07-2012 07:52 PM

dnsmasq question
 
I use dnsmasq for DNS name caching. In dnsmasq.conf I have strict-order specified.

In /etc/resolv.conf are these directives:

nameserver 127.0.0.1
nameserver 208.67.222.222
nameserver 208.67.220.220

I have www.slackbuilds.org listed in /etc/hosts:

208.94.238.115 www.slackbuilds.org

When I use dig to test www.slackbuilds.org, the dnsmasq log shows only a localhost lookup. This is expected because no external DNS name server is needed. For example:

dig @localhost www.slackbuilds.org +short

Dec 7 16:52:22 dnsmasq[6319]: query[A] www.slackbuilds.org from 127.0.0.1
Dec 7 16:52:22 dnsmasq[6319]: /etc/hosts www.slackbuilds.org is 208.94.238.115

When I use dig to query a domain name not in /etc/hosts, the dnsmasq log shows the results of an expected external query. For example:

dig @localhost www.h-online.org +short

Dec 7 16:54:18 dnsmasq[6319]: query[A] www.h-online.org from 127.0.0.1
Dec 7 16:54:18 dnsmasq[6319]: forwarded www.h-online.org to 208.67.222.222
Dec 7 16:54:18 dnsmasq[6319]: reply www.h-online.org is 195.145.108.80

So far so good. Now for the quirk.

When I fetch the slackbuilds.org RSS feed with akregator, which uses the www.slackbuild.org domain, the dnsmasq log shows an external DNS server lookup:

Dec 7 16:55:04 dnsmasq[6319]: query[AAAA] www.slackbuilds.org from 127.0.0.1
Dec 7 16:55:04 dnsmasq[6319]: forwarded www.slackbuilds.org to 208.67.222.222
Dec 7 16:55:05 dnsmasq[6319]: reply www.slackbuilds.org is <CNAME>

Why does dnsmasq forward a lookup request to 208.67.222.222 when I use akregator but not with dig?

Edit: dnsmasq 2.52 on Slackware 13.1

Celyr 12-08-2012 03:43 AM

because akregator asks for the AAAA record (ipv6) as you may see

Woodsman 12-08-2012 01:30 PM

Okay, thank you. I did not know what AAAA meant. :) I will have to learn more. Now that you've explained what is happening, why is akregator asking for an ipv6 address when an ipv4 address already exists?

Celyr 12-10-2012 06:24 PM

Well, it's up to Akregator wich record to ask, maybe you may have a look to the settings. At the moment i find ipv6 pretty pointless so i just blacklist the module and i'm happy with that

Woodsman 12-10-2012 06:49 PM

Looks like the problem is AAAA lookups are performed before A. A possible solution is editing /etc/resolv.conf with 'options single-request'. Also, /etc/hosts has to be updated with a feedback loop for IPv6. I haven't worked my way through or tested all of this yet. For now, like you, I've gone back to disabling ipv6 system-wide.

linuxxer 12-20-2012 07:28 AM

deleted


All times are GMT -5. The time now is 04:48 PM.