Skip to content

Commit 2151550

Browse files
committed
Add notes in README.md regarding running down as root user
This helps deal with issue #26.
1 parent ffa3d3e commit 2151550

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ down /etc/openvpn/scripts/update-systemd-resolved
6969
down-pre
7070
```
7171

72+
*Note*: The `down` and `down-pre` options here will not work as expected where
73+
the `openvpn` daemon drops privileges after establishing the connection (i.e.
74+
when using the `user` and `group` options). This is because only the `root` user
75+
will have the privileges required to talk to `systemd-resolved.service` over
76+
DBus. The `openvpn-plugin-down-root.so` plugin does provide support for
77+
enabling the `down` script to be run as the `root` user, but this has been known
78+
to be unreliable.
79+
80+
Ultimately this shouldn't affect normal operation as `systemd-resolved.service`
81+
will remove all settings associated with the link (and therefore naturally
82+
update `/etc/resolv.conf`, if you have it symlinked) when the TUN or TAP device
83+
is closed. The option for `down` and `down-pre` just make this step explicit
84+
before the device is torn down rather than implicit on the change in
85+
environment.
86+
7287
Alternatively if you don't want to edit your client configuration, you can add
7388
the following options to your openvpn command:
7489

0 commit comments

Comments
 (0)