Page 1 of 1

device is removed before down script is called

Posted: Fri Dec 21, 2018 4:19 pm
by monochromec
Openvpn version is 2.4.6

The device is removed *before* any configured down script is called:

Fri Dec 21 17:01:39 2018 Closing TUN/TAP interface
Fri Dec 21 17:01:39 2018 /sbin/ip addr del dev tun0 local 10.8.0.6 peer 10.8.0.5
Fri Dec 21 17:01:39 2018 /etc/openvpn/update-resolv-conf tun0 1500 1554 10.8.0.6 10.8.0.5 init
Unknown interface 'tun0': No such device
Fri Dec 21 17:01:39 2018 WARNING: Failed running command (--up/--down): external program exited with error status: 1

This happens on Cosmic as well f29 reproducibly. As the device is gone, update-resolv-conf does not properly remove any associated DNS sever entries
from /etc/resolv.conf

The only work-around on systems using systemd-resolved is to restart this daemon as part of the update-resolv-conf.

Fix: reverse the calling sequence as part of the server shutdown.

Re: device is removed before down script is called

Posted: Sat Dec 22, 2018 3:42 am
by TinCanTech
monochromec wrote:
Fri Dec 21, 2018 4:19 pm
This happens on Cosmic as well f29 reproducibly
F29 is indeed broken ..

https://github.com/masterkorp/openvpn-u ... /issues/30