I try to install OpenVPN 2.3 server in CentOS 6.7, and the client in Windows XP. I thought it works fine until I add --client-connect and --client-disconnect to the server.conf……When I add them, I saw client connect and disconnect at the same time……For example, in connect.log, client connect at 10:01. And in disconnect.log, client disconnect at 10:01 too.
The IP of CentOS is 10.8.0.1, and client's is 10.8.0.6, they could ping each other, but the client couldn't connect to internet.Is there any faults in my config?
server.conf
port 8099
proto udp
dev tun
mode server
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
max-clients 20
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
verb 9
script-security 3
auth-user-pass-verify /etc/openvpn/validator.sh via-env # the bash of username and pass
client-cert-not-required
username-as-common-name
client-connect /etc/openvpn/connect.sh
client-disconnect /etc/openvpn/disconnect.sh
openvpn.ovpn
client
proto udp
dev tun
auth-nocache
auth-user-pass
remote 10.211.55.104 8099 udp
persist-key
persist-tun
pull
comp-lzo
nobind
tls-client
ca ca.crt