kn0xy
Hello,
I am having a weird client reconnection issue where a Linux OpenVPN client connects, then disconnects in a cycle.
The server is OpenVPN AS 2.0.5
The client is running the OpenVPN client on Raspbery Pi Linux
Client settings:
setenv FORWARD_COMPATIBLE 1
client
server-poll-timeout 4
nobind
remote x.x.x.x 443 udp
remote x.x.x.x 443 udp
remote x.x.x.x 443 tcp
remote x.x.x.x 443 udp
remote x.x.x.x 443 udp
remote x.x.x.x 443 udp
remote x.x.x.x 443 udp
remote x.x.x.x 443 udp
dev tun
dev-type tun
ns-cert-type server
reneg-sec 604800
sndbuf 100000
rcvbuf 100000
auth-user-pass /etc/openvpn/pass.txt
# NOTE: LZO commands are pushed by the Access Server at connect time.
# NOTE: The below line doesn't disable LZO.
comp-lzo no
verb 3
setenv PUSH_PEER_INFO
From what I can tell is that the client connects, authenticates, gets assigned a VPN IP address. Then the client exists:
Log from server:
2014-04-15 11:27:29+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:29 2014 x.x.x.x:51111 TLS: Initial packet from [AF_INET]xxxxxxxx:51111, sid=d251e622 61242ecc'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 x.x.x.x:51111 VERIFY OK: depth=1, /CN=OpenVPN CA'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 x.x.x.x:51111 VERIFY OK: nsCertType=CLIENT'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 x.x.x.x:51111 VERIFY OK: depth=0, /CN=xxxxxxx'
2014-04-15 11:27:35+0000 [OMIClientAuth,0,] AUTH SUCCESS {'status': 0, 'reason': 'local auth succeeded', 'serial_list': [], 'user': u'xxxxxxx', 'proplist': {u'type': u'user_compile', u'pvt_password_digest': '[redacted]', u'prop_superuser': u'true', u'prop_autogenerate': u'true'}, 'common_name': u'xxxxxxx', 'serial': u'4'} cli=''/''
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 MANAGEMENT: CMD \'client-kill 29 "HALT,disconnected due to new connection by same user"\''
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 Delayed exit in 5 seconds'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: "Tue Apr 15 11:27:35 2014 SENT CONTROL [xxxxxx]: 'HALT,disconnected due to new connection by same user' (status=1)"
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: "Tue Apr 15 11:27:35 2014 MANAGEMENT: CMD 'client-auth 30 0'"
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 xxxxxx/x.x.x.x:51111 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 xxxxxx/x.x.x.x:51111 [xxxxxx] Peer Connection Initiated with [AF_INET]x.x.x.x:51111'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 xxxxxx/x.x.x.x:51111 OPTIONS IMPORT: compression parms modified'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 xxxxxx/x.x.x.x:51111 MULTI: Learn: x.x.x.x -> xxxxxx/x.x.x.x:51111'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 xxxxxx/x.x.x.x:51111 MULTI: primary virtual IP for xxxxxx/x.x.x.x:51111: x.x.x.x'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 xxxxxx/x.x.x.x:51111 MULTI: internal route x.x.x.x/24 -> xxxxxx/x.x.x.x:51111'
2014-04-15 11:27:35+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:35 2014 xxxxxx/x.x.x.x:51111 MULTI: Learn: x.x.x.x/24 -> xxxxxx/x.x.x.x:51111'
2014-04-15 11:27:37+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:37 2014 xxxxxx/x.x.x.x:51111 send_push_reply(): safe_cap=940'
2014-04-15 11:27:37+0000 [-] OVPN 1 OUT: "Tue Apr 15 11:27:37 2014 xxxxxx/x.x.x.x:51111 SENT CONTROL [xxxxxx]: 'PUSH_REPLY,explicit-exit-notify,topology subnet,route-delay 5 30,dhcp-pre-release,dhcp-renew,dhcp-release,route-metric 101,ping 12,ping-restart 50,auth-token SESS_ID,comp-lzo no,redirect-gateway def1,redirect-gateway bypass-dhcp,redirect-gateway autolocal,route-gateway x.x.x.x,dhcp-option DNS x.x.x.x ,dhcp-option DOMAIN xxx.xxx.xxx ,register-dns,block-ipv6,ifconfig x.x.x.x 255.255.255.128' (status=1)"
2014-04-15 11:27:40+0000 [-] OVPN 1 OUT: 'Tue Apr 15 11:27:40 2014 xxxxxx/x.x.x.x:38719 SIGTERM[soft,delayed-exit] received, client-instance exiting'
Now, they way the client is set up, when the system boots /etc/rc.local executes the openvpn client with the mentioned client configuration downloaded from the OpenVPN AS server using the following command "nohup openvpn --config client.ovpn &"
I must admit I am lost as to why it keeps cycling through the connection. I can see this in the user log on the server:
"disconnected because user-specific properties prevent concurrent VPN connections by this user". I figure this is due to all the reconnects.
Appreciate your time!
kn0x