[Dnsmasq-discuss] resolution of local (DynDNS-) domain name

Simon Kelley simon@thekelleys.org.uk
Sun, 21 Nov 2004 19:00:29 +0000


Jochen Schulz wrote:
> Hi there,
> 
> I'm having a little trouble getting dnsmasq (v2.17-1 from Debian
> testing) to return either the public or the private IP of my router when
> queried for the local domain name (I'd prefer the public IP but I am not
> sure whether that would be "correct").
> 
> I have a dial-in router (blackbox from SMC) which knows upstream DNS
> servers and I have a small server (hostname debris) which announces
> itself as the local DNS server via DHCP to the clients on the network.
> dnsmasq on this server is configured to query the router for non-local
> addresses:
> 
> /etc/dnsmasq.conf
> |no-resolv
> |server=192.168.6.1      # my router
> |local=/localnet/wasteland.homelinux.net/
> |expand-hosts
> |domain=wasteland.homelinux.net
> |dhcp-option=3,192.168.6.1
> |dhcp-option=6,192.168.6.3
> |dhcp-authoritative
> |# ... rest of DHCP configuration snipped
> 
> My /etc/hosts contains only entries for the nodes with fixed addresses:
> |127.0.0.1      localhost
> |192.168.6.1    router        router.wasteland.homelinux.net
> |192.168.6.3    debris        debris.wasteland.homelinux.net
> 
> Resolution of the  DHCP clients' names (qualified and unqualified) works
> fine, but dnsmasq obviously doesn't ask the router when queried for the
> local domain name itself:
> 
> |debris: $ host wasteland.homelinux.net localhost
> |Using domain server:
> |Name: localhost
> |Address: 127.0.0.1#53
> |Aliases:
> |
> |Host wasteland.homelinux.net not found: 3(NXDOMAIN)
> 
> |debris: $ host wasteland.homelinux.net router
> |Using domain server:
> |Name: router
> |Address: 192.168.6.1#53
> |Aliases:
> |
> |wasteland.homelinux.net has address 80.171.7.62
> 
> I am not sure whether this is actually a problem with dnsmasq. The
> output of 'hostname' is confusing me:
> 
> |debris $ hostname
> |debris.wasteland.homelinux.net
> 
> |debris $ hostname --fqdn
> |debris
> 
> I think it should be the other way round, but I have no idea what I have
> done wrong. I am prepared for hits with your cluebats.
> 
> J.

No cluebat needed. Let's just check that I understand this: you want

wasteland.homelinux.net

to be forwarded to the upstream nameservers, but

anyhost.wasteland.homelinux.net

to be kept local?

In that case change your local= line to

local=/localnet/.wasteland.homelinux.net/

Note the extra period before "wasteland".

HTH

Simon.