mrk3434
I'm trying to log some data about the VPN on connect and disconnect to a log file, and send an email with this information.
Platform: OpenVPN AS, CentOS 5.8
Here's the error:
"client-connect command failed: could not execute external program"
Through the web GUI, I'm doing this in the server config directives:
script-security 2
client-connect "/bin/bash /usr/local/openvpn_as/scripts/connect.sh"
client-connect "/bin/bash /usr/local/openvpn_as/scripts/disconnect.sh"
Any ideas why this isn't working? This is literally a default install with this configuration change.
as.conf:
/usr/local/openvpn_as/scripts/confdba -a
{
"Default": {
"admin_ui.https.ip_address": "eth0",
"admin_ui.https.port": "943",
"aui.eula_version": "1",
"auth.ldap.0.name": "My LDAP servers",
"auth.ldap.0.ssl_verify": "never",
"auth.ldap.0.timeout": "4",
"auth.ldap.0.use_ssl": "never",
"auth.module.type": "pam",
"auth.pam.0.service": "openvpnas",
"auth.radius.0.acct_enable": "false",
"auth.radius.0.name": "My Radius servers",
"cs.cws_proto_v2": "true",
"cs.https.ip_address": "eth0",
"cs.https.port": "943",
"cs.prof_sign_web": "true",
"host.name": "X.X.X.X",
"sa.initial_run_groups.0": "web_group",
"sa.initial_run_groups.1": "openvpn_group",
"vpn.client.config_text": "",
"vpn.client.routing.inter_client": "false",
"vpn.client.routing.reroute_dns": "true",
"vpn.client.routing.reroute_gw": "true",
"vpn.client.routing.superuser_c2c_access": "false",
"vpn.daemon.0.client.netmask_bits": "20",
"vpn.daemon.0.client.network": "5.5.0.0",
"vpn.daemon.0.listen.ip_address": "eth0",
"vpn.daemon.0.listen.port": "443",
"vpn.daemon.0.listen.protocol": "tcp",
"vpn.daemon.0.server.ip_address": "eth0",
"vpn.general.osi_layer": "3",
"vpn.server.config_text": "--client-connect \"/bin/bash /usr/local/openvpn_as/scripts/connect.sh\"",
"vpn.server.daemon.enable": "true",
"vpn.server.daemon.tcp.n_daemons": "1",
"vpn.server.daemon.tcp.port": "443",
"vpn.server.daemon.udp.n_daemons": "1",
"vpn.server.daemon.udp.port": "1194",
"vpn.server.duplicate_cn": "true",
"vpn.server.group_pool.0": "5.5.16.0/20",
"vpn.server.port_share.enable": "true",
"vpn.server.port_share.ip_address": "1.2.3.4",
"vpn.server.port_share.port": "1234",
"vpn.server.port_share.service": "admin+client",
"vpn.server.routing.private_access": "nat",
"vpn.server.routing.private_network.0": "10.181.0.0/17",
"vpn.tls_refresh.do_reauth": "true",
"vpn.tls_refresh.interval": "360"
}