openvpn management "kill" command not working
Posted: Mon Aug 15, 2011 8:51 pm
Hi,
I want to kill a client session using openvpn managament. After initiating the script the client disconnects from the server but after around 5-10 secs it start connecting again, automatically.
I want to automatically kill a client connection on the other servers after he/she connects to a specific server (using same user credentials) using telnet command.
Server script:
bash script:
BTW:
when i also telnet a remote openvpn management port(not using script) the result is still the same.
The client gets disconnected but after a few seconds he/she appears in the "status".
Anything wrong with my configuration?
I want to kill a client session using openvpn managament. After initiating the script the client disconnects from the server but after around 5-10 secs it start connecting again, automatically.
I want to automatically kill a client connection on the other servers after he/she connects to a specific server (using same user credentials) using telnet command.
Server script:
Code: Select all
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
script-security 2
client-connect /etc/openvpn/server/clientconnect.sh
client-disconnect /etc/openvpn/server/clientdisconnect.sh
server 10.8.0.0 255.255.255.0
reneg-sec 0
keepalive 2 15
persist-key
persist-tun
client-cert-not-required
username-as-common-name
client-to-client
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
comp-lzo
max-clients 40
status status/vpn.log
verb 3
Code: Select all
#! bin/bash
telnet remote.ip port <<EOF
kill client.user.name
EOF
when i also telnet a remote openvpn management port(not using script) the result is still the same.
The client gets disconnected but after a few seconds he/she appears in the "status".
Anything wrong with my configuration?