Page 1 of 1
client-connect and client-disconnect
Posted: Wed Mar 21, 2012 3:04 am
by panji
Hi all, any idea how to configure client-connect and client-disconnect on the server side for OpenVPN AS?
TIA
panji
Re: client-connect and client-disconnect
Posted: Wed Oct 10, 2012 1:19 pm
by BrnVrn
Hi,
There is a text area in "Advanced VPN Settings" / "Additional OpenVPN Config Directives (Advanced)" / "Server Config Directives"
There, I typed:
Code: Select all
script-security 2
client-connect "/etc/openvpn/client-connect.sh"
The script has permission: 755.
it is as simple as:
I still get this message in the /var/log/openvpnas.log :
client-connect command failed: could not execute external program
I don't understand what is wrong.
Bruno
Re: client-connect and client-disconnect
Posted: Sun Oct 14, 2012 7:39 pm
by xauen
Code: Select all
client-connect command failed: could not execute external program
Means there is really nothing to execute.
Try:
Code: Select all
#!/bin/bash
echo "this is only a test" >> /var/log/messages.log
and you should see some result
Also make it executable:
Code: Select all
chmod +x /etc/openvpn/client-connect.sh
Re: client-connect and client-disconnect
Posted: Mon Oct 15, 2012 7:28 am
by BrnVrn
Thanks for your response.
The script has execute permission.
I also tried with echo "..." , but it doesn't change anything. (I saw ".. exit 0 .." advised on this forum to avoid any side effect.
I guess there are some chroot or special user involved.
In the meantime, I started from scratch with a CentOS and OpenVPN package.
It is sad as Access Server, looked quite useful at first.
Regards
Bruno
Re: client-connect and client-disconnect
Posted: Mon Oct 15, 2012 8:19 am
by xauen
Can you post your server configs, probably you are using a "group nogroup" & "user nobody" in the configs. try removing that if you have it and check.
Re: client-connect and client-disconnect
Posted: Mon Oct 15, 2012 8:32 am
by BrnVrn
I was using the OpenVPN Access Server appliance.
Do you want a dump of the config.db ? As explained in
http://openvpn.net/index.php/access-ser ... erver.html
The Access Server run as openvpn_as:openvpn_as . I already tried to chown the script to this user without success.
Regards
Bruno
Re: client-connect and client-disconnect
Posted: Mon Oct 15, 2012 9:44 am
by xauen
Seems better, lets see the logs