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

Re: Temporary failure in name resolution



Greg Wooledge on Fri, 2 Apr 2021 23:24:43 -0400 wrote:

"On Fri, Apr 02, 2021 at 10:48:09PM -0400, Dan Norton wrote:
> # cat /etc/resolv.conf
> domain attlocal.net
> search attlocal.net
> nameserver 1.1.1.1
> nameserver 1.0.0.1
> ...and this works very well. I like it because it cuts out more
> of google's monitoring of my browsing (I use Brave browser and
> DuckDuckGo).
> 
> Now what about the first two lines? What purpose? Can I cut out AT&T
> also? ;)

man resolv.conf

       search Search list for host-name lookup.
              By default, the search list contains one entry, the local
       domain name.   It  is  determined  from  the local hostname
       returned by gethostname(2); the local domain name is taken to
       be  everything after  the first '.'.  Finally, if the hostname
       does not contain a '.', the root domain is assumed as the local
       domain name.

              [...]

              The  domain  directive is an obsolete name for the search
              direc‐ tive that handles one search list entry only.

Those lines do nothing, unless you routinely type commands like
"ssh lemon" or "ping pineapple" with no dots in the hostname.  In that
case, assuming the hosts are not defined in /etc/hosts, the resolver
will try to look up "lemon.attlocal.net" or "pineapple.attlocal.net" or
whatever."

I see. Thanks for pointing that out.

"Remember that something will probably overwrite your changes to the
resolv.conf file, unless you take preemptive steps."

Isn't there a tidier way besides making resolv.conf immutable,
resulting in lots of /etc/resolv.conf.dhclient-new.* files? Maybe
stopping dhclient from overwriting resolv.conf[1]?

 - Dan

[1]https://wiki.debian.org/resolv.conf#Modifying_.2Fetc.2Fdhcp.2Fdhclient.conf


Reply to: