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

systemd: prefer VPN DNS entries #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mathstuf
Copy link

@mathstuf mathstuf commented Nov 9, 2019

By setting DNSDefaultRoute=true, the VPN link's DNS is preferred over the main connection's DNS entries.

By setting `DNSDefaultRoute=true`, the VPN link's DNS is preferred over the main connection's DNS entries.
@mathstuf
Copy link
Author

mathstuf commented Nov 9, 2019

Hmm. This doesn't seem to quite do what I expected…hrm.

@alfredopalhares
Copy link
Owner

@mathstuf can you confirm this ?

@mathstuf
Copy link
Author

I couldn't get resolved to actually put the VPN entries first. It seemed like it worked, but I suspect some hash-based or pointer-based sorting letting me get lucky sometimes.

@alfredopalhares
Copy link
Owner

Bu,t aren't you using /etc/resolv.conf ?

@mathstuf
Copy link
Author

Yes, but it is generated by systemd-resolved. It ends up with a mismash of my main Internet connection and the VPN DNS settings.

@alfredopalhares
Copy link
Owner

alfredopalhares commented Nov 13, 2019 via email

@mathstuf
Copy link
Author

So it seems the proper way to do this is to call resolvectl dns and resolvectl domain to set up the DNS entries in the right order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants