update-systemd-resolved icon indicating copy to clipboard operation
update-systemd-resolved copied to clipboard

Integrate with NetworkManager OpenVPN

Open wiryonolau opened this issue 5 years ago • 1 comments

Hi, actually how do I integrate this script with NetworkManager ? Where should I put this script ?

When running using cli to connect to openvpn, the script working and I can access to my internal server using internal dns. Other hostname that not in my internal dns will be access using my local network.

But if I call from networkmanager ( gui ) , the script never run.

wiryonolau avatar May 19 '19 04:05 wiryonolau

@wiryonolau you should put the script into your OpenVPN configuration file directly. It shouldn't be called by NetworkManager. If you install the script inside (/etc/openvpn/scripts), then add the following configuration to your OpenVPN file:

script-security 2
setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
up /etc/openvpn/scripts/update-systemd-resolved
up-restart
down /etc/openvpn/scripts/update-systemd-resolved
down-pre

Also, be aware of the issue of DNS leakage when using NetworkManager. See here for more details.

jonathanio avatar May 19 '19 18:05 jonathanio

@wiryonolau -- closing this for now. Please reopen if you could use further assistance.

tomeon avatar Jul 21 '23 18:07 tomeon