konstantino
Hi,
I have this odd behaviour when I try the following script on Linux (mind you the same script works flawlessly on Windows and on OSX (Windows and OSX box are in the same network as the linux box)).
Here's the config file:
[oconf=]
remote vpn.host.here 1194 tcp-client
pull
tls-client
persist-key
ca ca.crt
nobind
persist-tun
cert mycert.crt
comp-lzo adaptive
dev tun
key mykey.key
route 172.16.0.0 255.255.255.0 vpn_gateway default
resolv-retry infinite
ns-cert-type server
[/oconf]
Under Linux the connection times out after awhile:
Wed Aug 3 16:22:32 2016 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Feb 2 2016
Wed Aug 3 16:22:32 2016 library versions: OpenSSL 1.0.2g-fips 1 Mar 2016, LZO 2.08
Wed Aug 3 16:22:32 2016 Attempting to establish TCP connection with [AF_INET]vpn_host_ip_here:1194 [nonblock]
Wed Aug 3 16:22:33 2016 TCP connection established with [AF_INET]vpn_host_ip_here:1194
Wed Aug 3 16:22:33 2016 TCPv4_CLIENT link local: [undef]
Wed Aug 3 16:22:33 2016 TCPv4_CLIENT link remote: [AF_INET]vpn_host_ip_here:1194
Wed Aug 3 16:22:33 2016 [server] Peer Connection Initiated with [AF_INET]vpn_host_ip_here:1194
Wed Aug 3 16:22:35 2016 TUN/TAP device tun0 opened
Wed Aug 3 16:22:35 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Wed Aug 3 16:22:35 2016 /sbin/ip link set dev tun0 up mtu 1500
Wed Aug 3 16:22:35 2016 /sbin/ip addr add dev tun0 local 192.168.7.10 peer 192.168.7.9
Wed Aug 3 16:22:35 2016 Initialization Sequence Completed
Wed Aug 3 16:24:35 2016 [server] Inactivity timeout (--ping-restart), restarting
Wed Aug 3 16:24:35 2016 SIGUSR1[soft,ping-restart] received, process restarting
Wed Aug 3 16:24:40 2016 Attempting to establish TCP connection with [AF_INET]vpn_host_ip_here:1194 [nonblock]
Wed Aug 3 16:24:50 2016 TCP: connect to [AF_INET]vpn_host_ip_here:1194 failed, will try again in 5 seconds: Connection timed out [last message repeats]
Any pointers on how I should go about debugging this are much appreciate it. The linux box can ping (and even telnet) to the vpn_host_ip_here and port.
Thanks,
/Konstantino
TinCanTech
Try --verb 4 in your config and then compare the two log files.
Also, it is possible the VPN server is simply disconnecting you.
konstantino
Thanks for the tip TinCan. I'm afraid it didn't help much though. There are a couple of differences (persist_config, persist_mode, xormethod=0, xormask='', xormasklen=0 explicitly defined in osx but not defined on linux and windows (perhaps that's the default values anyhow) ), openvpn version (linux and windows use 2.3.10, osx uses 2.3.11, ssl version linux uses 1.0.2g, osx 1.0.2h3 and windows 1.0.1q) and also differences in the socket buffers sizes but the issue remains the same. pfsense (server-side) initially states that the connection is successful and afterwards it timeouts and gets dropped. Any further pointers on going deeper on this are appreciated.
Increasing verbosity even higher doesn't seem to yield anything obvious.
Thank you for your time.
konstantino
One more thing, both windows and osx are using a management interface (openvpn gui, tunnelblick respectively) + up/down scripts. It's hard to say how those contribute to the process.
TinCanTech
If we can not see it we can not help ..
Please see the Forum rules (top of this page)
konstantino
Perhaps verbosity 7 might help. Here's the message that keeps repeating on the client side until the time-out:
Thu Aug 4 16:41:30 2016 us=590499 TCPv4_CLIENT READ [53] from [AF_INET]192.121.150.3:1194: P_DATA_V1 kid=0 DATA len=52
Thu Aug 4 16:41:30 2016 us=590543 TLS: tls_pre_decrypt, key_id=0, IP=[AF_INET]192.121.150.3:1194
Thu Aug 4 16:41:30 2016 us=590576 PID_TEST [0] [SSL-0] [] 0:4 0:5 t=1470321690[0] r=[0,0,0,0,1]
Thu Aug 4 16:41:30 2016 us=590592 RECEIVED PING PACKET
TinCanTech
--verb 7 does not help .. in this case.
However, your server config and log might.