Results 1 to 4 of 4

Thread: DNS server won't stay!

  1. #1
    Join Date
    Aug 2013
    Location
    Colorado, US
    Beans
    220
    Distro
    Ubuntu Mate 18.04 Bionic Beaver

    DNS server won't stay!

    So I have been getting this error
    Code:
    devon@UbuntuServer:~$ sudo apt update[sudo] password for devon: 
    Err http://us.archive.ubuntu.com trusty InRelease
      
    Err http://us.archive.ubuntu.com trusty-updates InRelease
      
    Err http://us.archive.ubuntu.com trusty-backports InRelease
      
    Err http://security.ubuntu.com trusty-security InRelease
      
    Err http://download.opensuse.org  InRelease
      
    Err http://us.archive.ubuntu.com trusty Release.gpg
      Could not resolve 'us.archive.ubuntu.com'
    Err http://us.archive.ubuntu.com trusty-updates Release.gpg
      Could not resolve 'us.archive.ubuntu.com'
    Err http://security.ubuntu.com trusty-security Release.gpg
      Could not resolve 'security.ubuntu.com'
    Err http://download.opensuse.org  Release.gpg
      Could not resolve 'download.opensuse.org'
    Err http://us.archive.ubuntu.com trusty-backports Release.gpg
      Could not resolve 'us.archive.ubuntu.com'
    Err http://plex.r.worldssl.net lucid InRelease
      
    Err http://plex.r.worldssl.net lucid Release.gpg
      Could not resolve 'plex.r.worldssl.net'
    Reading package lists... Done
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/InRelease  
    
    
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease  
    
    
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease  
    
    
    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease  
    
    
    W: Failed to fetch http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/InRelease  
    
    
    W: Failed to fetch http://plex.r.worldssl.net/PlexMediaServer/ubuntu-repo/dists/lucid/InRelease  
    
    
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'us.archive.ubuntu.com'
    
    
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Could not resolve 'us.archive.ubuntu.com'
    
    
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Could not resolve 'us.archive.ubuntu.com'
    
    
    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Could not resolve 'security.ubuntu.com'
    
    
    W: Failed to fetch http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/Release.gpg  Could not resolve 'download.opensuse.org'
    
    
    W: Failed to fetch http://plex.r.worldssl.net/PlexMediaServer/ubuntu-repo/dists/lucid/Release.gpg  Could not resolve 'plex.r.worldssl.net'
    
    
    W: Some index files failed to download. They have been ignored, or old ones used instead.
    I did some research on the web and found it is an issue with the DNS so the information I found on ask Ubuntu said to do this

    Code:
    sudo nano /etc/resolv.conf or nano /etc/resolv.conf
    and then I did this

    Code:
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 8.8.8.8 nameserver 8.8.4.4
    Now I see the comment that my changes will be overwritten, it works until I reboot and then they are blank. How do I permanently set these as my DNS servers?

    I am running Ubuntu 14.04.2 server 64 Bit.

    Thanks.
    We all know Linux is great... it does infinite loops in 5 seconds.
    - Linus Torvald

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,790
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: DNS server won't stay!

    Hi grier-devon.

    Is the server set with a static IP? If so, you need to add a line like this to your /etc/network/interfaces.
    Code:
    dns-nameservers 8.8.8.8  8.8.8.4
    And also set /etc/resolv.conf as symbolic link. Here is a similar thread with more details.

    If the server is getting its IP from a DHCP server, then the server is the one to be set to handle the DNS addresses.

    Hope it helps. Let us know if that helps, and you if you have more questions.
    Regards.

  3. #3
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: DNS server won't stay!

    You can also do this, I believe, by clicking on the network icon in your panel and choosing Edit.
    Go to the IPv4 tab and add the DNS servers you want as additional, similar to the way I show in the screenshot, or even change the
    Code:
    Automatic (DHCP)
    to
    Code:
    Automatic (DHCP) addresses only
    and again add those DNS servers you want in the DNS Servers box.

    That should then stick as you want it to.
    Attached Images Attached Images

  4. #4
    Join Date
    Aug 2013
    Location
    Colorado, US
    Beans
    220
    Distro
    Ubuntu Mate 18.04 Bionic Beaver

    Re: DNS server won't stay!

    Thanks papibe,
    Adding "dns-nameservers 8.8.8.8 8.8.8.4" to the "/etc/network/interfaces" fixed the problem as I am running the server static. Weird how it took a week after the server setup for this to happen, I appreciate your help!

    We all know Linux is great... it does infinite loops in 5 seconds.
    - Linus Torvald

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •