1

For Linux Mint 18.3

I began by reading several posts here and elsewhere about /etc/resolv.conf. Some of those posts reference -- but do not explain the function of -- a line of the form search attlocal.net.

I have also observed that IF I use a VPN to connect to the Internet, THEN the VPN software replaces the IP addresses of the DNS servers in /etc/resolv.conf AND removes the line search attlocal.net. So it seems that search attlocal.net is not essential? Perhaps even "anti-useful" in some contexts?

So:

  • What's the purpose of search attlocal.net?

  • Is it desirable to configure whatever it is that populates /etc/resolv.conf to NOT include search attlocal.net by default?

  • Can, or should, search attlocal.net be replaced with something "better"? (And if yes, how?)

2
  • 1
    Have you tried man resolv.conf to see what information the manual pages provide? That's normally a good starting point if you wonder what should go in a standard configuration file. Commented Jul 16, 2020 at 20:05
  • I didn't try the man page simply because the thought didn't occur to me. It will occur to me going forward. I did, however, try lots of other searches. As stated, more or less regular references to search attlocal.net, no explanations. Thx... Commented Jul 17, 2020 at 21:07

1 Answer 1

1

The search directive tells the DNS resolver to append the domain name to hostnames it can't find.

For example, if /etc/resolv.conf contains

server attlocal.net

And you do

ping somehost

the resolver will try to lookup an IP address for somehost. If that fails, it will try to lookup an IP address for somehost.attlocal.net before returning failure.

In your case, I'd guess it was set up via DHCP, as part of your initial, non-VPN connection, probably to an AT&T device (or clone). It's an attempt to make it easier for all the hosts served by the DHCP server to look like they have IP addresses in the same domain, and can use plain hostnames for each other.

When you activate your VPN, it wants ALL network traffic to go through the VPN. It doesn't want any traffic to go to *.attlocal.net. Since the VPN setup is rewriting /etc/resolv.conf, the server directive isn't needed

1
  • I guess you supposed to write down "search" instead of "server" . Commented Sep 25, 2024 at 4:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.