[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: searching for hosts in domain local



Hi Dan,

On Sat, Apr 16, 2016 at 10:14:29PM -0700, Dan Hitt wrote:
> I would like to drop the '.local' because it's an extra six characters
> with absolutely no value.
> 
> In principle, i think it should be possible to by just adding
>      search local
> to my /etc/resolv.conf, but this absolutely does not work.  (I imagine that
> local is a really magic name in some contexts but not very magic in others.)

You may need to use "local." with a dot at the end.

What doesn't work about it?

".local" TLD is kind of special so you may find problems anyway -
it's used for multicast DNS (Avahi). You may be better off picking a
different domain for your local network.

> Furthermore, /etc/resolv.conf doesn't want to be written, as it
> says it is generated automatically, so even if it worked, it wouldn't
> be such a good solution.

You can override the domain search list that your DHCP server
provides by editing /etc/dhcp/dhclient.conf and putting in either:

supersede domain-name "local."

or:

prepend domain-name "local."

or:

append domain-name "local."

Depending upon whether you want to have *only* your search domains,
your search domains *first*, or your search domains *last*,
respectively.

See man dhclient.conf for more info.

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: