Tunnel Connection Signaling?

How to customize and extend your OpenVPN installation.
Post Reply
closedLoop
OpenVpn Newbie
Posts: 3
Joined: Tue Aug 01, 2017 4:20 pm

Tunnel Connection Signaling?

Post by closedLoop » Tue Sep 12, 2017 8:04 pm

Greetings.

I've recently been looking into a way of detecting when OpenVPN has successfully completed a tunnel connection on the client-side (and, by omission, when it has closed same); and have a couple of simple questions.

As an outside example to get things going here, one need only detect the changing presence/absence of /var/lib/NetworkManager/dhclient-*.conf to quickly determine whether or not a basic network connection has been established on a Debian variant; a very scriptable event. FWIW, this works around the potentially buggy signaling regimen which NetworkManager has sometimes been known for...

In any event, is there a similar signaling facility which one might take recourse to in OpenVPN? Or, since I already use up and down calls to head off DNS leaks via /etc/openvpn/update-resolv-conf, is there some way of formatting those calls to add a couple of simple bash commands right from the target .ovpn script? If I understand things, it seems as though this could be a good place to start ;)

Thanks --

Post Reply