0

I recently upgraded to Lubuntu 17.10.1. While setting up my VPN, I headed over to /etc/resolv.conf, to set my dns servers (so as to prevent dns leaks). However, it now reads:

 This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known DNS servers.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

I ignored the first sentence, and edited the file anyway. It had no effect. Terminal still outputs the default servers, and leak-test websites still reveal my local ISP. I have been going crazy for two days now, trying to make the system accept my chosen servers, but nothing seems to work, and I have been scouring the internet, trying everything I can find, including this: How do I fix a DNS leak? Anybody have a fool-proof method?

4
  • Well, I am glad that you have always known just what to do in every situation you have encountered within the linux OS, but some of use mere mortals have been obligated to poke,prod, test, and google our way to any degree of proficiency. In the past, I simnply had to manually edit resolv.conf, and since changing settings in the network manager and elsewhere had failed me, I gave it a shot. I searched for man:systemd-resolved.service, nothing was listed, I didn't realize it was a terminal command right away, thoughI did try it eventually, just not with a space after man.
    – MadUbuntu
    Feb 9, 2018 at 12:35
  • Okay, I have gone through the manual, and I am really not sure how to proceed. it mentions files that don't appear to exist, such as /usr/lib/systemd/resolv.conf, and /run/systemd/resolve/resolv.conf. I tried creating them, and nothing seems to have happened. Has anybody had success in changing their dns servers?
    – MadUbuntu
    Feb 9, 2018 at 13:16
  • Well, I only edited the file after several other methods failed. either way, it seems to be working now. Thanks for your input.
    – MadUbuntu
    Feb 9, 2018 at 18:02
  • Good :-) I was hoping you'd be able to create the answer ;)
    – Rinzwind
    Feb 9, 2018 at 19:29

1 Answer 1

1

Try deleting the symbol link and replacing the resolv.conf with a new original static file as stated in the comments.

#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#

The dhclient can overwrite the resolve.conf If your VPS is using DHCP to load the initial network configuration. If this is the case you can update the /etc/dhcp/dhclient.conf file to supersede the domain-name domain-search and domain-name-servers file. Like this

supersede domain-name "mydomain.com";
supersede domain-search "mydomain.com";
supersede domain-name-servers ip1 1p2 ip3;
1
  • Okay, replacing the symlink did it. I confused myself, by continually looking in the /etc/resolvconf directory, which did not contain a symlink. I created a static file there anyway, just to see if anything would happen. I have since removed it. Frankly, I have forgotten all the places where I have saved my DNS server ip's at this point, so I feel fortunate that I haven't broken anything. Or, perhaps I have. Only time will tell.
    – MadUbuntu
    Feb 9, 2018 at 18:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .