17

I've tried using network-admin. It has a list of DNS servers, including 127.0.0.1 and two that I put in. It always uses the 127 address first, no matter how many times I change it. The lists of files, hook scripts, etc, are confusing: where is the single configuration file for networking that I can modify to effect a permanent change?

I'm tired of asking my ISP's poor quality DNS server to serve my internet requests. I have no idea why Ubuntu repeatedly resets my configuration, or where the graphical interface stores this information -- until it's changed again. This is UNNECESSARILY confusing.

I checked network-admin gui an hour ago and it read, in order, 127.0.1.1 8.8.4.4 8.8.8.8 I moved the two 8.'s to the top, above 127; just checked it, now the first, which wasn't on the list before, is 192.168.1.254 -- which is my network routers lan-side address. Requests to this are routed to the internet; DNS requests here are automatically routed to att's DNS instead of Google's. This is demonstrated when there is a lookup error in FireFox browser it shows an error page from dnserrorassist.att.net

I really would like to have a single, static list of DNS servers, to be able to modify it at my will, and to set the lookup order in which they are used. Can i do that with Ubuntu (16.04)?

Old Uncle Ho
  • 283
  • 1
  • 2
  • 6
  • What "files" and "hook scripts" are you referring to? Are you manually editing the /etc/resolv.conf file and/or files in /etc/resolvconf/resolv.conf.d/ (base/head/tail)? or are you talking about configuring via the network manager GUI? – steeldriver Sep 04 '16 at 01:18
  • 1
  • "Traditionally, the file /etc/resolv.conf was a static configuration file that rarely needed to be changed or automatically changed via DCHP client hooks. Nowadays, a computer can switch from one network to
  • – Old Uncle Ho Sep 04 '16 at 01:36
  • 1
    another quite often and the resolvconf framework is now being used to track these changes and update the resolver's configuration automatically. It acts as an intermediary between programs that supply nameserver information and applications that need nameserver information. Resolvconf gets populated with information by a set of hook scripts related to network interface configuration. – Old Uncle Ho Sep 04 '16 at 01:36
  • The most notable difference for the user is that any change manually done to /etc/resolv.conf will be lost as it gets overwritten each time something triggers resolvconf. Instead, resolvconf uses DHCP client hooks, and /etc/network/interfaces to generate a list of nameservers and domains to put in /etc/resolv.conf, which is now a symlink: " [https://help.ubuntu.com/12.04/serverguide/network-configuration.html#name-resolution]
    1. I've tried using network-admin -- that is a gui
    – Old Uncle Ho Sep 04 '16 at 01:37
  • This page, potentially published long ago, possibly out of date?, says not to edit resolv.conf manually. It then goes into a lot of detail, but it loses me quickly. I last used Redhat. It seems there was usually a single configuration file for most things; figure it out, set it, move on. Ubuntu seems to use layer upon layer, it can be very confusing. It's even difficult ask questions, sorry – Old Uncle Ho Sep 04 '16 at 01:41
  • It's like the maintainers of sites such as this are proud to have talked about 12.04 and though there are lots of changes, it's not worth talking about anymore -- is that is? I just don't understand – Old Uncle Ho Sep 04 '16 at 01:42
  • 1
    Really I'm just trying to set a couple of google nameservers to be at the top of the list; I keep getting errors from dnserrorassist.att.net because they aren't current or the server is busy or whatever. No matter how many times I set 8.8.8.8 or any other servers at the top of the list using the gui, next time I boot it's back to using the default, 127.0.0.1 That seems like a problem with Ubuntu's name resolution system setup. If it's not, if there is a reliable way to set it, I'd like to find it, set it, move on to user-ville – Old Uncle Ho Sep 04 '16 at 01:50
  • I think you're just misunderstanding the resolution chain: 127.0.0.1 simply refers to your localhost, which runs a local nameserver (called dnsmasq) which in turn uses the nameservers that you have specified via the GUI. It shouldn't be a problem. – steeldriver Sep 04 '16 at 02:03
  • 1
    Thanks for that, and I see your point, but is it then beyond the scope to ask why my webpage loads make requests that are then resolved by att.net DNS servers instead of Google DNS servers as specified in the gui network-admin? – Old Uncle Ho Sep 04 '16 at 02:28
  • I checked it an hour ago and it read, in order, 127.0.1.1 8.8.4.4 8.8.8.8

    I moved the two 8.'s to the top, above 127; just checked it, now the first, which wasn't on the list before, is 192.168.1.254 -- which is my network routers lan-side address. Requests to this are routed to the internet; DNS requests here are automatically routed to att's DNS instead of Google's. This is demonstrated when there is a lookup error in FireFox browser it shows an error page from dnserrorassist.att.net

    – Old Uncle Ho Sep 04 '16 at 02:32
  • I really would like to have a single, static list of DNS servers, to be able to modify it at my will, and to set the lookup order in which they are used. Can i do that with Ubuntu (16.04)? – Old Uncle Ho Sep 04 '16 at 02:34
  • Please [edit] your question to include this information - instead of posting it in comments – steeldriver Sep 04 '16 at 02:42