[Dnsmasq-discuss] setting up dynamic DNS?

Adam Hardy adam.ant at cyberspaceroad.com
Mon Sep 10 23:02:42 BST 2007


It's the fqdn.fqdn line that causes the problem! I took that out of the 
dhclient.conf on the clients and now have just

send host-name gondor;

which works (massive grin!) - thanks!

But there is one more niggle: it looks as though dnsmasq on isengard is asking 
the internet name-server where isengard is when another machine asks it to 
resolve its hostname.

isengard dnsmasq[2716]: query[AAAA] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: forwarded isengard.localdomain.net to 194.74.65.69
isengard dnsmasq[2716]: forwarded isengard.localdomain.net to 194.74.65.69
isengard dnsmasq[2716]: query[AAAA] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: forwarded isengard.localdomain.net to 194.74.65.69
isengard dnsmasq[2716]: query[A] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts isengard.localdomain.net is 192.168.0.2
isengard dnsmasq[2716]: query[A] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts isengard.localdomain.net is 192.168.0.2
isengard dnsmasq[2716]: query[PTR] 2.0.168.192.in-addr.arpa from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts 192.168.0.2 is isengard.localdomain.net
isengard dnsmasq[2716]: query[A] isengard.localdomain.net from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts isengard.localdomain.net is 192.168.0.2
isengard dnsmasq[2716]: query[PTR] 2.0.168.192.in-addr.arpa from 192.168.0.234
isengard dnsmasq[2716]: /etc/hosts 192.168.0.2 is isengard.localdomain.net
isengard dnsmasq[2716]: query[PTR] 234.0.168.192.in-addr.arpa from 127.0.0.1
isengard dnsmasq[2716]: DHCP 192.168.0.234 is gondor.localdomain.net
isengard dnsmasq[2716]: query[A] gondor.localdomain.net from 127.0.0.1
isengard dnsmasq[2716]: DHCP gondor.localdomain.net is 192.168.0.234



Jan 'RedBully' Seiffert on 10/09/07 21:54, wrote:
> Adam Hardy wrote:
>> Thanks again for the help. Config files appended at bottom for reference.
>>
>> Jan 'RedBully' Seiffert on 10/09/07 16:45, wrote:
>>> Adam Hardy wrote:
>> adam at gondor:~$ cat /etc/resolv.conf
>> search localdomain.net
>> nameserver 192.168.0.2
> 
> Ok, looks good.
> 
> 
>>> Is their default gateway set to isengard? (route -n should say so)
>> Yes
>>
> 
> Ok, so this works.
> 
>>> What's printed to isengards system logs when a client gets an IP?
>> isengard dnsmasq[26803]: reading /etc/resolv.conf
>> isengard dnsmasq[26803]: using nameserver 194.74.65.69#53
>> isengard dnsmasq[26803]: ignoring nameserver 127.0.0.1 - local interface
>> isengard dnsmasq[26803]: Ignoring DHCP host name arnor.localdomain
>> because it has an illegal domain part
> 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> here is the problem
> 
> [snip]
>> /var/lib/misc/dnsmasq.leases has no hostnames in it.
>>
>> Hmmm. Doesn't look good does it? :(
> 
> No no, all working within it's spec IMHO ;)
> 
>> What do you think could be wrong
>> with it? There seems to be something wrong with the hostname I'm sending
>> it ('illegal domain name part')
> 
> dnsmasq is basicaly fine with the hostname, it does not like the domain
> you're client is sending.
> It tries to protect you from forgery.
> If a client would record itself as www.google.com, and dnsmasq would
> believe this, it would forward all your LAN machines for www.google.com
> to this machine.
> 
> Somehow the "domain=localdomain.net" doesn't do the trick.
> 
> But when looking again, arnor (and maybe the other machines) is sending
> "$HOSTNAME.localdomain" as hostname?
> 
> the final ".net" seems to get eaten...
> 
> May you can remove all the references to your domain from your
> dhclient.conf, for a test.
> 
>> adam at gondor:~$ cat /etc/dhcp3/dhclient.conf |grep -v ^#
>>
>> send host-name "gondor.localdomain.net";
> 
> This should be the hostname only, or?
> 
>> send dhcp-lease-time 3600;
>> supersede domain-name "localdomain.net";
> 
> drop this, dnsmasq should give out the right domain
> 
>> request subnet-mask, broadcast-address, time-offset, routers,
>>         domain-name, domain-name-servers, host-name,
>>         netbios-name-servers, netbios-scope, interface-mtu;
> 
>> send fqdn.fqdn "gondor.localdomain.net";
>> send fqdn.encoded on;
>> send fqdn.server-update off;
>>
> 
> drop all this fqdn stuff for a test
> 
> Which version of dnsmasq is this?
> 
>> and it also seems to be forwarding the
>> query for arnor.localdomain.net up to the internet nameserver.
>>
> 
> Thats because dnsmasq could not find an entry in it's own db, and thinks
> maybe the upstream server know something about it.
> 
> To tell dnsmasq that localdomain.net is local, and it should not ask
> upstream about it, you may want to add:
> local=/localdomain.net/
> to your dnsmasq.conf
> 
> 
>> Adam
>>
> 
> Grettings
> 	Jan
> 
>> PS here are the files for reference if they help:
>>
> [snip]
>> isengard:~# cat /etc/dnsmasq.conf |grep -v ^# |grep -e ^[[:alnum:]]
>> domain-needed
>> bogus-priv
>> filterwin2k
>> domain=localdomain.net
>> dhcp-range=192.168.0.3,192.168.0.254,12h
>> dhcp-option=1,255.255.255.0
> 
> 
>> dhcp-option=3,192.168.0.2
>> dhcp-option=6,192.168.0.2
> normally you should be able to put 0.0.0.0 in here, so dnsmasq will
> automatically fill in the right value for your interface
> 
>> log-queries
> 




More information about the Dnsmasq-discuss mailing list