0

Somehow I've clobbered my whole DNS system in 16.04.
I now must edit /run/resolvconf/resolv.conf to add a name server such as nameserver 8.8.8.8 or similar.
Of course, this always disappears after a reboot.
(And, yes, I KNOW I'm not supposed to hack it this way!)

NOTE: I'm accessing the router through wifi, not Ethernet.

I have tried editing /etc/NetworkManager/NetworkManager.conf - it currently shows

[main]  
plugins=ifupdown,keyfile,ofono  
dns=dnsmasq  
[ifupdown]  
managed=false 

I've tried commenting out the dns= line but still the problem persists. I have tried edited the ipv4 params in the wifi-settings, attempting to use either static or auto - but it's still no go after a reboot.

Currently my `/etc/network/interfaces shows

# interfaces(5) file used by ifup(8) and ifdown(8)  
auto lo  
iface lo inet loopback  
address 192.168.200.44  
netmask 255.255.255.0   
gateway 192.168.200.1  
dns-nameservers 8.8.4.4** 

I added the IP-data lines there as a last resort. Presumably, they mean nothing if I have used "loopback" instead of "static", right?

Ideally, I'd like to use DHCP instead of a static, but use my own nameservers such as google or OpenDNS.
So where can I look to see what the problem with BOTH my DNS and Static is?

Tony Lancer
  • 1,003
aqk
  • 301

1 Answers1

1

First, as it is badly malformed, return your /etc/network/interfaces file to default:

# interfaces(5) file used by ifup(8) and ifdown(8)  
auto lo  
iface lo inet loopback  

Second, you can easily set your own DNS nameservers in Network Manager like this: https://farm4.staticflickr.com/3898/14334590042_3c72168038_o.jpg

After making these changes, reboot and let us hear your report.

chili555
  • 60,188
  • @chiliSSS - As per my OP, _I have tried edited the ipv4 params in the wifi-settings, attempting to use either static or auto _
    And, yes, I have already tried the Automatic (DHCP) addresses only option as well, using both Google's AND OpenDNS's nameservers.

    Seems to have no effect.

    – aqk Nov 27 '16 at 18:53
  • May we please see an entire diagnostic? http://askubuntu.com/questions/425155/my-wireless-wifi-connection-does-not-work-what-information-is-needed-to-diagnos/425180#425180 – chili555 Nov 27 '16 at 21:50
  • I'm sorry, but you will have to specify what "an entire diagnostic" is. General terms don't help. – aqk Dec 04 '16 at 03:42
  • If you click the link I gave, it explains how to download and run a script that gathers all the information in one report that you can post in your question or else here and give us the link: http://paste.ubuntu.com It's all explained in the link. – chili555 Dec 04 '16 at 14:28
  • OKAY, Chilidawg... I finally got around to this after a month or so. Hope you can make some sense of it. NEAT SCRIPT! Up to now, I've been busy re-creating the run - resolv conf with a simple resolv.conf /run/resolvconf/resolv.conf from my home dir every time I boot into Linux. So finally I've gotten around to running yr script. It is at - http://paste.ubuntu.com/23755617/ The gen mentioned it was bigger than xxxK, USE THE GZIP, But I think it is all there. Happy New Year! – aqk Jan 07 '17 at 01:57
  • May we have the link to the result, please? – chili555 Jan 07 '17 at 02:01
  • Damn! yr too fast for me! – aqk Jan 07 '17 at 02:03
  • How do I create a newline in "comment"? shift-enter doesn't do it. – aqk Jan 07 '17 at 02:04
  • May I assume the entry in /etc/resolv.conf is the one you manually entered? If you reboot and do not make the entry, you can't resolve IP addresses? Is the file a symbolic link? ls -al /etc/resolv.confIs Network Manager set to DHCP or static or addresses only with DNS specified? – chili555 Jan 07 '17 at 02:13
  • The entry in /etc/resolv.conf I have not touched (AFAIK). Perhaps I DID enter it there back in December- not sure. If I reboot, the entry in /run/resolv.conf is missing. So I simply copy a resolv.conf from my home dir to it. Contents = nameserver 8.8.4.4 .... running ls -al yields lrwxrwxrwx 1 root root 29 Feb 20 2015 /etc/resolv.conf -> ../run/resolvconf/resolv.conf Oh yeah- again- How do I create a newline here? (easier to read) – aqk Jan 07 '17 at 02:27