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 # this is the "up" directive but the issue is the same as with client-connect up /etc/openvpn/up.sh ...
/etc/openvpn/up.sh is owned by root by 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: /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?