Okay I'm not sure where I should post this question, I'm trying out a couple different free VPNs (TorVPN, VPNBook and FreeVPN.me actually, but I'll just focus on the TorVPN for clarity sake) on Ubuntu 12.04. My OpenVPN client version/build info...
OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
The reason I suspect that it is my internet connection in general is because while using my laptop at a friend's house on his internet connection, I was able to connect to all of the listed services, via OpenVPN, with no problem at all actually. Just simply running...
# openvpn --config *relevant_file.ovpn*
However when I got home and tried it on my own internet connection, things got weird. I connected to the VPN servers just fine... There doesn't seem to be anything noteworthy to point out in the messages or anything but I don't know how to increase verbosity.
# openvpn --config ./torvpn-sagaciouskjb.ovpn
Fri Jan 9 03:46:59 2015 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
Enter Auth Username:
Enter Auth Password:
Fri Jan 9 03:47:04 2015 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Jan 9 03:47:04 2015 WARNING: file '___________' is group or others accessible
Fri Jan 9 03:47:04 2015 LZO compression initialized
Fri Jan 9 03:47:04 2015 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Fri Jan 9 03:47:04 2015 Socket Buffers: R=[87380->131072] S=[16384->131072]
Fri Jan 9 03:47:04 2015 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Jan 9 03:47:04 2015 Local Options hash (VER=V4): '_______'
Fri Jan 9 03:47:04 2015 Expected Remote Options hash (VER=V4): '__________'
Fri Jan 9 03:47:04 2015 Attempting to establish TCP connection with [AF_INET]188.227.224.104:443 [nonblock]
Fri Jan 9 03:47:05 2015 TCP connection established with [AF_INET]188.227.224.104:443
Fri Jan 9 03:47:05 2015 TCPv4_CLIENT link local: [undef]
Fri Jan 9 03:47:05 2015 TCPv4_CLIENT link remote: [AF_INET]188.227.224.104:443
Fri Jan 9 03:47:05 2015 TLS: Initial packet from [AF_INET]188.227.224.104:443, sid=_____________
Fri Jan 9 03:47:05 2015 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Jan 9 03:47:09 2015 VERIFY OK: depth=1, /C=HU/ST=BP/L=Budapest/O=TorVPN/CN=torvpn.com/emailAddress=cert@torvpn.com
Fri Jan 9 03:47:09 2015 VERIFY OK: nsCertType=SERVER
Fri Jan 9 03:47:09 2015 VERIFY OK: depth=0, /C=HU/ST=BP/L=Budapest/O=TorVPN/CN=torvpn.com/emailAddress=cert@torvpn.com
Fri Jan 9 03:47:16 2015 Data Channel Encrypt: Cipher 'DES-EDE3-CBC' initialized with 192 bit key
Fri Jan 9 03:47:16 2015 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Jan 9 03:47:16 2015 Data Channel Decrypt: Cipher 'DES-EDE3-CBC' initialized with 192 bit key
Fri Jan 9 03:47:16 2015 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Jan 9 03:47:16 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Fri Jan 9 03:47:16 2015 [torvpn.com] Peer Connection Initiated with [AF_INET]188.227.224.104:443
Fri Jan 9 03:47:19 2015 SENT CONTROL [torvpn.com]: 'PUSH_REQUEST' (status=1)
Fri Jan 9 03:47:19 2015 PUSH: Received control message: 'PUSH_REPLY,route 10.10.0.1,topology net30,ping 10,ping-restart 120,dhcp-option DNS 10.10.0.1,redirect-gateway,ifconfig 10.10.6.65 10.10.6.66'
Fri Jan 9 03:47:19 2015 OPTIONS IMPORT: timers and/or timeouts modified
Fri Jan 9 03:47:19 2015 OPTIONS IMPORT: --ifconfig/up options modified
Fri Jan 9 03:47:19 2015 OPTIONS IMPORT: route options modified
Fri Jan 9 03:47:19 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Jan 9 03:47:19 2015 ROUTE default_gateway=192.168.0.1
Fri Jan 9 03:47:19 2015 TUN/TAP device tun0 opened
Fri Jan 9 03:47:19 2015 TUN/TAP TX queue length set to 100
Fri Jan 9 03:47:19 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Jan 9 03:47:19 2015 /sbin/ifconfig tun0 10.10.6.65 pointopoint 10.10.6.66 mtu 1500
Fri Jan 9 03:47:19 2015 /sbin/route add -net 188.227.224.104 netmask 255.255.255.255 gw 192.168.0.1
Fri Jan 9 03:47:19 2015 /sbin/route del -net 0.0.0.0 netmask 0.0.0.0
Fri Jan 9 03:47:19 2015 /sbin/route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.10.6.66
Fri Jan 9 03:47:19 2015 /sbin/route add -net 10.10.0.1 netmask 255.255.255.255 gw 10.10.6.66
Fri Jan 9 03:47:19 2015 Initialization Sequence Completed
^CFri Jan 9 03:47:31 2015 event_wait : Interrupted system call (code=4)
Fri Jan 9 03:47:31 2015 TCP/UDP: Closing socket
Fri Jan 9 03:47:31 2015 /sbin/route del -net 10.10.0.1 netmask 255.255.255.255
Fri Jan 9 03:47:31 2015 /sbin/route del -net 188.227.224.104 netmask 255.255.255.255
Fri Jan 9 03:47:31 2015 /sbin/route del -net 0.0.0.0 netmask 0.0.0.0
Fri Jan 9 03:47:31 2015 /sbin/route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.0.1
Fri Jan 9 03:47:31 2015 Closing TUN/TAP interface
Fri Jan 9 03:47:31 2015 /sbin/ifconfig tun0 0.0.0.0
Fri Jan 9 03:47:32 2015 SIGINT[hard,] received, process exiting
Here is the .ovpn file for it...
client
dev tun
proto tcp
remote vpn.torvpn.com 443
resolv-retry infinite
nobind
persist-key
persist-tun
# Change and uncomment these if you want or have to use a proxy
;http-proxy-retry;
;http-proxy [proxy server] [proxy port #]
auth-user-pass
ns-cert-type server
ca torvpn-ca.crt
cert torvpn-__________.crt
key torvpn-__________.key
comp-lzo
verb 3
cipher DES-EDE3-CBC
I left some of the hash and ID values blanked out, don't know if they are needed or if I needed to better safe than sorry...
Anyway, this configuration worked while using my friend's network, but not my own. I have a CenturyLink 2.2 Mbit DSL connection and a ZyXel PK5001Z router and at first found some things online asserting that it could be the router's fault, but that didn't seem like it made sense to me. All of the relevant ports needed for OpenVPN are opened and I'm not really sure what at all is the difference if any between the two of our internet connections, other than his is a 60 MBit Charter cable connection and mine is just plain old DSL. I do know that my router has to use NAT, could that be effecting it?
This is what the routing table looks like after connecting...
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.10.6.66 0.0.0.0 UG 0 0 0 tun0
10.10.0.1 10.10.6.66 255.255.255.255 UGH 0 0 0 tun0
10.10.6.66 * 255.255.255.255 UH 0 0 0 tun0
link-local * 255.255.0.0 U 1000 0 0 wlan0
free-vpn.torvpn PK5001Z.PK5001Z 255.255.255.255 UGH 0 0 0 wlan0
192.168.0.0 * 255.255.255.0 U 2 0 0 wlan0
Now I'm going out on a limb and guessing PK5001Z.PK5001Z is my router, not sure why it didn't just put the IP... But that is the only strange thing to me. I haven't messed around with routing tables for a long time though.
So what happens is that, after connecting, being assigned these IP addresses and everything, there just doesn't seem to be any kind of real connectivity to remote addresses. In fact I cannot even seem to ping the given gateway...
kenny@laptop:~$ ping 10.10.6.66
PING 10.10.6.66 (10.10.6.66) 56(84) bytes of data.
^C
--- 10.10.6.66 ping statistics ---
30 packets transmitted, 0 received, 100% packet loss, time 29230ms
traceroute to 10.10.6.66 (10.10.6.66), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
Now I guess that could just mean it doesn't reply to ICMP or pings? So I thought "Well I should be able to connect to Google's DNS" and that's when things got really weird. Sometimes I can ping 8.8.8.8, sometimes I can't. Whether or not I receive replies seems to be totally random.
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=60 time=228 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=60 time=228 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=60 time=227 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=60 time=228 ms
64 bytes from 8.8.8.8: icmp_req=5 ttl=60 time=228 ms
64 bytes from 8.8.8.8: icmp_req=6 ttl=60 time=228 ms
64 bytes from 8.8.8.8: icmp_req=7 ttl=60 time=228 ms
64 bytes from 8.8.8.8: icmp_req=8 ttl=60 time=228 ms
64 bytes from 8.8.8.8: icmp_req=9 ttl=60 time=227 ms
^C
--- 8.8.8.8 ping statistics ---
10 packets transmitted, 9 received, 10% packet loss, time 9008ms
rtt min/avg/max/mdev = 227.783/228.285/228.938/0.544 ms
That was actually the best run I had, and actually made me think I forgot to turn the VPN before pinging it...
...going on...
kenny@laptop:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
27 packets transmitted, 0 received, 100% packet loss, time 26145ms
kenny@laptop:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 13102ms
kenny@laptop:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=6 ttl=60 time=318 ms
64 bytes from 8.8.8.8: icmp_req=7 ttl=60 time=230 ms
64 bytes from 8.8.8.8: icmp_req=8 ttl=60 time=229 ms
^C
--- 8.8.8.8 ping statistics ---
71 packets transmitted, 3 received, 95% packet loss, time 70040ms
rtt min/avg/max/mdev = 229.684/259.594/318.714/41.805 ms
So I decided to just try to use netcat and wireshark to see if I could follow a TCP handshake...
And after a looooong time waiting I think it worked.... In fact though I think I had to try twice before seeing any FIN or ACK packets. So is it just timing out?
kenny@laptop:~$ nc 8.8.8.8 53
kenny@laptop:~$ nc 8.8.8.8 53
kenny@laptop:~$
Now the thing is, this happens pretty much across all three of the VPN services I've tried. Yet, every mentioned VPN services has a corresponding PPTP service that works well. Should I bother trying to find different OpenVPN service, or just conclude my internet connection is not able to run them... for whatever reason.
Despite being able to make that TCP handshake... I think... I've not once been able to load even a mere webpage from any of these services over my own internet connection. Actually that's not entirely true, once I got VPNBook's own homepage to load half-way but I thought that was just a fluke.
Anyway tl;dr...
Do I just need to spend time to find a VPN I can connect to better, or just admit that I cannot use OpenVPN on my connection?