Opened 8 years ago

Last modified 4 months ago

#753 assigned Bug / Defect

OpenVPN should update systemd-resolved on systems running it

Reported by: flavor8 Owned by: David Sommerseth
Priority: major Milestone:
Component: Generic / unclassified Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc: piotr.dobrogost

Description

systemd-resolved is used by many programs (e.g. ssh, ping, psql) to do DNS lookups, and maintains a DNS cache. After starting openvpn on a system with systemd-resolved, this cache is not automatically flushed / updated, and therefore resources provided by the VPN are not accessible by name.

There is a community supplied script that allows openvpn to update systemd directly. Please evaluate it and add post-initialization logic to openvpn to force systemd-resolved to update/flush its cache.

​ https://github.com/jonathanio/update-systemd-resolved

Change History (8)

comment:1 Changed 8 years ago by Gert Döring

Owner: set to David Sommerseth
Status: new → assigned
Version: 2.2.2 → git master branch

... since you're working on better systemd integration anyway...

comment:2 Changed 8 years ago by piotr.dobrogost

What's the status?

comment:3 Changed 8 years ago by David Sommerseth

Cc: piotr.dobrogost added

comment:4 Changed 6 years ago by piotr.dobrogost

Any news on integration with systemd-resolved?

comment:5 Changed 4 years ago by nobodyusesusernamesanymore

Wow. Five year old open bug - it'll be starting first grade soon!

comment:6 in reply to: 5 Changed 4 years ago by David Sommerseth

Replying to nobodyusesusernamesanymore :

Wow. Five year old open bug - it'll be starting first grade soon!

If it is urgent for you, use OpenVPN 3 Linux . It ships with systemd-resolved support. And with the coming v14_beta release, it will be enabled by default on Fedora and Ubuntu 20.04 and newer.

If that's not acceptable and you need a quicker response, patches are welcome. Sarcastic comments does not change the priority.

comment:7 Changed 4 months ago by Repacking8102

It would be nice to see this supported. The OpenVPN 3 Linux project does not have all the same features yet.

For anyone else who stumbles across here. It looks like most users have been getting around it with this helper script ​ https://github.com/jonathanio/update-systemd-resolved

Or you can just manually run

resolvectl dns tun0 your-dns-server
resolvectl domain tun0 your-domain

comment:8 in reply to: 7 Changed 4 months ago by David Sommerseth

Replying to Repacking8102 :

It would be nice to see this supported. The OpenVPN 3 Linux project does not have all the same features yet.

Could you elaborate what's missing? Both support for dhcp-option ADAPTER_DOMAIN_SUFFIX and the --dns option will come in the v24 release. Split-DNS is still possible, by using dhcp-option DOMAIN or dhcp-option DOMAIN-SEARCH and enabling the "tunnel" DNS Scope via openvpn3 config-manage --dns-scope tunnel .

Otherwise, please file an issue in the OpenVPN 3 Linux repository ... ​ https://codeberg.org/OpenVPN/openvpn3-linux/issues ... then I'll ensure it will get some attention.

Btw, this Trac instance is no longer used for bug tracking