[Nottingham] Odd name resolution thing

Martin martin at ml1.co.uk
Fri Jan 3 17:05:31 UTC 2014

On 03/01/14 16:42, Jason Irwin wrote:
> I have a router running DNSMasq and that's tied in with the DHCP. As far
> as I can tell, this works ("ping", "dig" and "host" for "foo" and
> "foo.bar.local" all work).
> Some thing's don't, e.g. "ssh" and "wget" both fail with "Unable to
> resolve host" for "foo.bar.local" ("foo" works fine).
> I can fix that by changing "/etc/nsswitch.conf" from:
> hosts:          files mdns4_minimal [NOTFOUND=return] *dns* mdns4
> to:
> hosts:          files *dns* mdns4_minimal [NOTFOUND=return] mdns4
> Before I go and replicate this change on other machines, is this
> sensible to do? I don't expect people to actually use "foo.bar.local"
> but it'd be nice if it worked. I'm just thrown why Canonical ship a
> config that seems to bypass DNS and assume I must be missing something.

All is explained on:


The "[NOTFOUND=return]" avoids polluting the internet with useless
requests for local machines.

However... If you are running your own DNS locally for serving your
local lan for yourself, then you will indeed want your local DNS to be hit.

I just use:

hosts:          files dns

being as I run my own DNS service for my lan. All internet DNS is
blocked by a gateway firewall.

You may well need to include the "mdns" stuff if you're suffering the
Windows world and/or VPNs...

Have fun!

- ------------------ - ----------------------------------------
-    Martin Lomas    - OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7
- martin @ ml1 co uk - Import from   hkp://subkeys.pgp.net   or
- ------------------ - http:// ml1 .co .uk/martin_ml1_co_uk.gpg

More information about the Nottingham mailing list