Openvpn linux connection reset, restarting [0]

by tom   Last Updated August 14, 2019 20:00 PM

This works perfectly fine under windows but fails on my ubuntu laptop

Does anyone have any insight as to why this is?

openvpn output

Thu Dec 31 13:49:42 2015 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Apr 13 2015
Thu Dec 31 13:49:42 2015 WARNING: file 'tom.key' is group or others accessible
Thu Dec 31 13:49:42 2015 Socket Buffers: R=[87380->131072] S=[16384->131072]
Thu Dec 31 13:49:42 2015 Attempting to establish TCP connection with [AF_INET]120.136.49.81:47 [nonblock]

.........

Thu Dec 31 13:49:46 2015 OPTIONS IMPORT: timers and/or timeouts modified
Thu Dec 31 13:49:46 2015 OPTIONS IMPORT: --ifconfig/up options modified
Thu Dec 31 13:49:46 2015 OPTIONS IMPORT: route options modified
Thu Dec 31 13:49:46 2015 OPTIONS IMPORT: route-related options modified
Thu Dec 31 13:49:46 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Thu Dec 31 13:49:46 2015 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 IFACE=wlan0 HWADDR=88:53:2e:a5:8b:1f
Thu Dec 31 13:49:46 2015 TUN/TAP device tap0 opened
Thu Dec 31 13:49:46 2015 TUN/TAP TX queue length set to 100
Thu Dec 31 13:49:46 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Thu Dec 31 13:49:46 2015 /sbin/ip link set dev tap0 up mtu 1500
Thu Dec 31 13:49:46 2015 /sbin/ip addr add dev tap0 10.8.0.61/8 broadcast 10.255.255.255
Thu Dec 31 13:49:46 2015 /sbin/ip route add 120.136.49.81/32 via 192.168.1.1
RTNETLINK answers: File exists
Thu Dec 31 13:49:46 2015 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Dec 31 13:49:46 2015 /sbin/ip route add 0.0.0.0/1 via 10.1.4.10
Thu Dec 31 13:49:46 2015 /sbin/ip route add 128.0.0.0/1 via 10.1.4.10
Thu Dec 31 13:49:46 2015 /sbin/ip route add 10.0.0.0/8 via 10.1.4.10
RTNETLINK answers: File exists
Thu Dec 31 13:49:46 2015 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Dec 31 13:49:46 2015 Initialization Sequence Completed

Thu Dec 31 13:50:01 2015 Connection reset, restarting [0]
Thu Dec 31 13:50:01 2015 SIGUSR1[soft,connection-reset] received, process restarting
Thu Dec 31 13:50:01 2015 Restart pause, 5 second(s)

At this point it enters an infinite loop of reconnects and disconnects where the connection is active for about 3 seconds before the disconnect

tom.ovpn contents:

client
dev tap
proto tcp
remote xxxxxxxxxxxxxxx 47
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert tom.crt
key tom.key
ns-cert-type server
comp-lzo
verb 3

I can find a lot of information online about this issue, caused by all sorts of different problems but none of them seem to apply here.

The most common cause seems to be a problem in the ovpn file but as I have said above, this works perfectly under windows.

Tags : linux openvpn


Answers 2


I found the issue. A silly mistake on my part. I needed to open the firewall on port 47

sauce: http://www.sparklabs.com/forum/viewtopic.php?f=3&t=1631

tom
tom
January 04, 2016 00:39 AM

For me the vpn-connection actually works just fine, but I get this error message on the log. After (a few years of) investigation I finally figured out that the error message of connection reset is caused by our Zabbix network monitoring that opens the TCP-connection and immediately closes afterwards.

PHZ.fi-Pharazon
PHZ.fi-Pharazon
August 14, 2019 19:36 PM

Related Questions


Resolv Conf Multiple DNS Servers with specific domains

Updated September 05, 2017 12:00 PM



connect OpenVPN client at Ubuntu startup

Updated August 09, 2018 08:00 AM