client-connect and client-disconnect
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 1
- Joined: Wed Mar 21, 2012 2:53 am
client-connect and client-disconnect
Hi all, any idea how to configure client-connect and client-disconnect on the server side for OpenVPN AS?
TIA
panji
TIA
panji
-
- OpenVpn Newbie
- Posts: 9
- Joined: Wed Oct 10, 2012 12:44 pm
Re: client-connect and client-disconnect
Hi,
There is a text area in "Advanced VPN Settings" / "Additional OpenVPN Config Directives (Advanced)" / "Server Config Directives"
There, I typed:
The script has permission: 755.
it is as simple as:
I still get this message in the /var/log/openvpnas.log :
Bruno
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"
it is as simple as:
Code: Select all
#!/bin/bash
exit 0
I don't understand what is wrong.client-connect command failed: could not execute external program
Bruno
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: client-connect and client-disconnect
Code: Select all
client-connect command failed: could not execute external program
Try:
Code: Select all
#!/bin/bash
echo "this is only a test" >> /var/log/messages.log
Also make it executable:
Code: Select all
chmod +x /etc/openvpn/client-connect.sh
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK
-
- OpenVpn Newbie
- Posts: 9
- Joined: Wed Oct 10, 2012 12:44 pm
Re: client-connect and client-disconnect
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
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
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: client-connect and client-disconnect
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.
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK
-
- OpenVpn Newbie
- Posts: 9
- Joined: Wed Oct 10, 2012 12:44 pm
Re: client-connect and client-disconnect
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
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
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: client-connect and client-disconnect
Seems better, lets see the logs
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK