Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 20.04 DNS settings for tun0 device are reset after a period of time #89

Open
hrkristian opened this issue Dec 4, 2020 · 3 comments
Labels
Needs Feedback Requires additional information from user. NetworkManager NetworkManager strikes again

Comments

@hrkristian
Copy link

This issue cropped up with Ubuntu 20.04. The update-systemd-resolve script works as expected, but after a whlie (cannot say for sure but anywhere from an hour to several) the settings are lost, as if reverting back to the state before the script was run.

There's nothing special to this install of Ubuntu (was upgraded from 19.10) so it seems strange more aren't having this issue, though there are two of us that I know of in the company I'm contracted with.

My settings are entirely standard:

script-security 2
up /etc/openvpn/scripts/update-systemd-resolved
down /etc/openvpn/scripts/update-systemd-resolved
down-pre

@fuhsjr00
Copy link

fuhsjr00 commented Aug 3, 2021

I see this problem as well, though I have observed it on both Ubuntu 18.04 and 20.04.

My config is slightly different:

script-security 2
up /etc/openvpn/scripts/update-systemd-resolved
up-restart
down /etc/openvpn/scripts/update-systemd-resolved
down-pre

@gucki
Copy link

gucki commented Feb 7, 2022

I had the same issue. Solved it by enhancing the original script to periodically check and apply the DNS settings in the background. If you like, you can try my fork: https://github.com/gucki/update-systemd-resolved

@tomeon
Copy link
Collaborator

tomeon commented Sep 8, 2023

The up-restart directive may help with some causes of forgotten DNS settings, though evidently not all of them given this comment. If you don't currently have up-restart in your config, suggest that you add it and see if that helps address the issue.

What are you using to manage your network generally? For instance, NetworkManager, or systemd-networkd?

@tomeon tomeon added the Needs Feedback Requires additional information from user. label Sep 8, 2023
@tomeon tomeon added the NetworkManager NetworkManager strikes again label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Feedback Requires additional information from user. NetworkManager NetworkManager strikes again
Projects
None yet
Development

No branches or pull requests

4 participants