[Dnsmasq-discuss] "random" problem with name resolution

Rance Hall ranceh at gmail.com
Fri Jul 24 11:09:32 BST 2009


On Fri, Jul 24, 2009 at 3:54 AM, Stefano Bridi<stefano.bridi at gmail.com> wrote:
> Hi all, first of all thanks for the wonderful tool!
> I have a problem with the dns part of dnsmasq: sometimes does not
> resolve hostnames.
> The machine on which dnsmasq run is a Debian Lenny firewall between
> lan,dmz,internet and some other private network with some openVPN
> tunnel on board... version of dnsmasq is 2.45-1
>
> The firewall itself is configured to resolve the name asking to
> dnsmasq. (127.0.0.1)
>
> The dnsmasq.conf is:
> ###########################################
> no-resolv
> server=/ctn.mydomain.tld/CTN.MYDOMAIN.TLD DNS SERVER
> server=ISP DNS 1
> server=ISP DNS 2
> server=ISP DNS 3
> no-dhcp-interface=eth2
> no-dhcp-interface=eth3
> no-hosts
> addn-hosts=/etc/hosts.dnsmasq
> expand-hosts
> domain=mydomain.tld
> dhcp-range=..........
> dhcp-host=.............
> dhcp-host=.............
> dhcp-host=.............
> dhcp-host=.............
> dhcp-option=3,0.0.0.0
> dhcp-option=42,0.0.0.0
> dhcp-option=44,LAN WINS SERVER
> dhcp-authoritative
> cache-size=4096
> no-negcache
> log-queries
> log-async
> query-port=0
> ###########################################
> where "CTN.MYDOMAIN.TLD DNS SERVER" "ISP DNS *" "LAN WINS SERVER" are
> the correct value.

There are two things that I want to point you to:

1) the local=/domain.tld/ option

if you specify this option correctly then members of that domain are
never forwarded to isp.  This option will fix your problem of
forwarding names to the public internet that dont exist.  and should
speed things up right off.

2) while the above is good advice, its not complete, it doesnt fix the
problem of dnsmasq not knowing about the boxes on the localnet in the
first place.

On its face, I'd say that this is a configuration error.  In all my
years of using dnsmasq Ive never seen this problem on a otherwise
correctly configured dnsmasq that wasnt my fault.

the way you have dnsmasq configured local queries only come from one
of two places, the alternate host file you specified, and the dhcp
leases file.

Make absolutely sure that the host you are occasionally having trouble
with is actually present in either one of these files.  I suspect it
is not present at the point you are having the trouble.

HTH

Rance



More information about the Dnsmasq-discuss mailing list