As a workaround, I placed the following script in
/etc/NetworkManager/dispatcher.d/02-vpnupdown location. It will restart
systemd-resolved service everytime you bring up a vpn connection
allowing to use as current dns the one provided by the vpn. I tried to
send a SIGRTMIN+1 signal to systemd-resolve to flush dns server but it
randomly have the desired effect by cli but never by a script triggered
by a vpn-up event from network-manager. On vpn-down event, dns
configuration is fine so I won't restart the service to avoid restarting
it too often.

Hope this will help someone while this issue is being fixed.

#!/bin/bash

STATUS=$2

case "$STATUS" in
    'vpn-up') systemctl restart systemd-resolved;;
esac

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1880864

Title:
  networkmanager IKE VPN connection causes DNS leak

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1880864/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to