0

I've been working at my company for over a year, and have never had this particular issue with my VPN. Unfortunately, I don't know much about networking so I'm a little confused at what's happening. Here's the behavior on a Fedora 25 workstation totally fresh install.

run sudo openconnect --juniper somevpn.com
cat /etc/resolv.conf immediately after the connection is made shows all the various nameservers I can connect to at work. trying to actually navigate to any of the sites on the local network fails, and even regardless of that, if I check the resolve.conf again just a few seconds after the connection is made, I'll see that I'm back on my local network, although the process for the VPN is still going.

So is there some black-list that I'm not aware of? What's going in and rewriting my resolve.conf? I've got VPN connected on other devices, so I know my credentials are fine, and I'm positive I'm below the maximum number of allowed connections.

  • 2
    systemd-resolved will change /run/systemd/resolve/resolv.conf based on the network you connect to, and sometimes that is symlinked to /etc/resolv.conf. Making /etc/resolv.conf a standalone file will break this functionality, so systemd will stop trying to manage your /etc/resolv.conf. Restoring the symlink will restore the functionality. Same (recommended) functionality is present at /usr/lib/systemd/resolv.conf See freedesktop.org/software/systemd/man/…. – Patrick Sep 1 '17 at 14:31
  • I noticed that the former file you mentioned doesn't exist, so I checked the status of the systemd-resolved service, and sure enough it was dead. After starting it back up and running my VPN again, I'm able to connect. Thanks, and if you want to wrap that up into an answer, I'll gladly accept it. – Csteele5 Sep 1 '17 at 14:38
  • You're very welcome. I'll submit it as an answer. – Patrick Sep 1 '17 at 14:38
2

Systemd-Resolved usually handles changing /etc/resolv.conf based on the network you're connecting to:

  • When connecting to a network, it will change /run/systemd/resolve/resolv.conf, in some cases on your system, this file may be symlinked to /etc/resolv.conf - If that is the case, systemd-resolved will change /etc/resolv.conf accordingly. If this symlink is not present, systemd-resolved will not change /etc/resolv.conf

  • The same kind of functionality is present at /usr/lib/systemd/resolv.conf Once again, if that symlink is present, systemd-resolved will handle /etc/resolv.conf

Additionally, if this is wrecking your DNS, after connection you can still manually change /etc/resolv.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.