perhaps you need --explicit-exit-notify for UDP vpn to inform the server of the client disconnect. UDP is connectionless protocol. I point out - you have not provided OpenVPN configs or logs.
Regards ----- Original Message ----- From: "Dylan Humphreys" <dylan.humphr...@comodo.com> To: <openvpn-users@lists.sourceforge.net> Sent: Friday, November 13, 2015 5:32 PM Subject: [Openvpn-users] client-connect script only runs once > Hi All. > Im wanting to use the client-connect script to some wizardry with an > iptables > firewall. To start with however, I thought Id start simple: > > Debian Wheezy, openvpn 2.3.2 > I have this in my openvpn.conf: > > script-security 3 system > client-connect /etc/openvpn/scripts/clientconnect.sh > > In an attempt to check that the script is actually run, clientconnect.sh > consists of this: > > #!/bin/bash > echo "testing">>/etc/openvpn/scripts/test > exit 0 > > Simple enough. > > If I run the script from the command line, as expected "testing" is > appended > to the file every time, and 0 returned. > > When I connect from my client, then I get a "testing" in > /etc/openvpn/scripts/test. Great! > > But when I disconnect, and connect again, I dont get another "testing" > > So, to check its *actually* being run i changed the exit value to 1 > > sure enough, *every* attempt to connect from the client then failed > because > the script returns a non 0 value. > > Why does it look like the script isnt being run? > > BTW, if I restart the openvpn service on the server then I get "testing" > once > more, but again, nothing is written on subsequent connections. > > Thanks in advance! > Dylan > > -- > Dylan Humphreys > Senior Systems Administrator - Infrastructure Support Group > Comodo CA Ltd > Registered in England No 04058690 > > Skype: dylancomodo > Office Tel Europe: +44 (0) 161 8747070 > Fax Europe: +44 (0) 161 8771767 > > > Registered Office: > 3rd Floor, 26 Office Village, Exchange Quay, > Trafford Road, Salford, Manchester M53EQ > > ------------------------------------------------------------------------------ > _______________________________________________ > Openvpn-users mailing list > Openvpn-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-users ------------------------------------------------------------------------------ _______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users