I've been struggling for 2 hours now... I want OpenVPN to run a script when a client connects, but it seems to ignore my client-connect directive!
I am running OpenVPN 2.4.0 on Raspbian. In my server.conf, I have
...
script-security 3
up /etc/openvpn/up.sh
...
/etc/openvpn/up.sh is owned by root and is world-executable (rwxr-xr-x), and it is as simple as
#!/bin/sh
whoami >> /tmp/connect.txt
exit 0
I can successfully connect to my server, /var/log/daemon.log even states
ovpn-server[2050]: /etc/openvpn/up.sh tun0 1500 1621 10.100.0.1 10.100.0.2 init
without stating any error, yet nothing appears on /tmp, as if my script was not called. What is going wrong? :-(
Thanks in advance for your help