Results 1 to 10 of 10

Thread: Changing DNS

  1. #1
    Join Date
    Jun 2015
    Beans
    12

    Changing DNS

    I have a GUI iteration of 18.04 running as a full VM on my Proxmox host. This exist really for only one reason, so that I can have a centralized place to mount all my network locations and then have those backed up to crashplan (crasphlan doesn't support headless within linux)




    I can change "/etc/resolv.conf" and it will instantly start using the DNS I point it to. The issue is when any kind of system reboot comes into play. Once recovered, it goes back to using the local host as the DNS.

    It seems this is a byproduct of the network GUI features taking precedence? However, that section in my GUI appears to be blank (see attached pic "1").

    I've tried setting it in /etc/network/interfaces as this is how I've configured all the other static options (see attached pic "2"). This however does nothing for the DNS.

    Any ideas on how to set a DNS that will persist between system/service restarts?


    Edit:

    It seems resolvconf should be the service I need. Attempting to install it, I could see there were issues with dsnmasq trying to use the port (I assume part of the resolvconf service) but it was reported another service was already using port 53. Continued investigation showed this service to be systemd-resolved. I used these instructions to remove systemd-resolved and then used these instructions to deploy resolvconf.

    I received no apparent errors when running this, however DNS is still not working (see attached pic "3")

    Attached Images Attached Images
    • File Type: png 1.png (123.2 KB, 2 views)
    • File Type: png 2.png (33.6 KB, 2 views)
    • File Type: png 3.png (27.3 KB, 1 views)
    Last edited by Frank_Snyder; December 5th, 2019 at 01:33 AM.

  2. #2
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Changing DNS

    Please don't post large graphics to the forums. This is very problematic for helpers with low speeds, who are on limited data plans, or are viewing from smartphones or small screens. It is also unnecessary to post whole screenshots in most cases. Terminal output can be highlighted with the mouse, copied with a right click and pasted into the posting box between [CODE] and [/CODE] tags for clarity. Or highlight the output and use the button in the *Adv Reply* toolbar.

    If you must post resource-intensive images, please post them as attachments using the paperclip icon in the *Adv Reply* toolbar.

  3. #3
    Join Date
    Jun 2015
    Beans
    12

    Re: Changing DNS

    Sorry about that. I agree and would usually post direct terminal outputs but the issue is that the OS is within a console and is therefore harder to copy over unless I'm browsing the forums directly in the VM. I'll edit my post as you suggested.

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Changing DNS

    I would learn to use systemd-resolved since it will be the standard in all future releases for some time to come. You can specify particular DNS servers in the file /etc/systemd/resolved.conf. See "man resolved.conf" for details.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Jun 2015
    Beans
    12

    Re: Changing DNS

    Thanks for the reply. Now to figure out how to re-add it given I used link in above edit to remove it...

  6. #6
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Changing DNS

    Code:
    sudo apt update
    sudo apt purge resolvconf
    sudo apt install systemd-resolved
    should do the trick.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Jun 2015
    Beans
    12

    Re: Changing DNS

    Hmm, I'm getting the "unable to locate package" when going to reinstall it. I have all the basic repositories enabled and a quick search did not seem to unveil what one would be holding this.

  8. #8
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,816
    Distro
    Ubuntu Mate 22.04 Jammy Jellyfish

    Re: Changing DNS

    I have the just the four main repositories (universe, restricted, multiverse and main (canonical-supported)) and resolvconf is available via Synaptic

  9. #9
    Join Date
    May 2007
    Beans
    231
    Distro
    Xubuntu

    Re: Changing DNS

    The tested and true way was always to edit /etc/resolvconf/resolv.conf.d/tail , as it wouldn't be overwritten.

  10. #10
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Changing DNS

    Quote Originally Posted by Frank_Snyder View Post
    Hmm, I'm getting the "unable to locate package" when going to reinstall it. I have all the basic repositories enabled and a quick search did not seem to unveil what one would be holding this.
    Apparently systemd-resolved is not in its own package. You need to install the entire systemd package.

    https://packages.ubuntu.com/search?s...stemd-resolved
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Tags for this Thread

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
  •