device is removed before down script is called

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
monochromec
OpenVpn Newbie
Posts: 1
Joined: Fri Dec 21, 2018 4:11 pm

device is removed before down script is called

Post by monochromec » Fri Dec 21, 2018 4:19 pm

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.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: device is removed before down script is called

Post by TinCanTech » Sat Dec 22, 2018 3:42 am

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

Post Reply