-
Notifications
You must be signed in to change notification settings - Fork 14
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
DNS Resolution #3
Comments
Hmm, I need to look how AWS Client does this, but I'm pretty sure it's possible to do since we do this on our VPN (not AWS tho, so I need to setup my own in order to test). |
The "right" way to do it is to utilize Overwriting |
For the record, NetworkManager's OpenVPN integration parses the OpenVPN output directly to set routes and DNS, but that's obviously not an option with a custom GUI. |
I don't see why not... aren't we capturing the openvpn output already? |
For anyone using systemd-resolved (Ubuntu), the following can get you pretty far: resolvectl dns tun0 10.100.0.2
resolvectl domain tun0 ~amazonaws.com Update it to use your nameservers/domains and run after the VPN connection is online. |
Posting here for visibility in case it helps anyone who runs into a similar issue or has a better solution.
Ran into an issue where the AWS configured DNS server was not being utilized, resulting in internal addresses not being able to be resolved. I'm unsure how the VPN client automatically handles this and I don't see any references in the exported OVPN file.
Option 1 - resolv.conf
Overwrite
/etc/resolv.conf
directly to use the new DNS serverThis overrides ALL traffic to go through the AWS DNS server. If the gateway is properly configured (e.g. with split tunneling) and load/performance isn't an issue, this is the simplest.
Option 2 - dnsmasq
Use dnsmasq for more granular control of which nameservers to use for address ranges.
Overwrite
/etc/resolv.conf
to point to internal dnsmasq address, defaults to 127.0.0.1Uncomment no-dhcp-interface and add in default nameserver and nameservers for specific internal domains
Option 3 - route gateway config
This is the most advanced option. Note that I couldn't get this to work for my usecase, but this would be the most portable as the configuration should be encapsulated within the ovpn file.
This should be some combination of
The exact combination of addresses and gateway will depend on your route list.
The text was updated successfully, but these errors were encountered: