update-systemd-resolved
update-systemd-resolved copied to clipboard
Integrate with NetworkManager OpenVPN
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 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.
@wiryonolau -- closing this for now. Please reopen if you could use further assistance.