Hello,
I have the OpenVPN client installed on my laptop, which I use to connect to my home devices when I'm offsite. When using OpenVPN in this manner, traffic intended for my home devices is routed through the VPN while traffic intended for the public Internet is routed directly. This is the desired state of affairs.
I am trying to add privatetunnel.com functionality to my setup. I was able to download my profile by going to
http://www.privatetunnel.com > settings > download profile. After placing the Privatetunnel config file in the OpenVPN configuration directory, I was able to successfully make a connection to the Privatetunnel VPN server.
The problem is that no traffic is being routed over the Privatetunnel VPN. When I go to
http://www.whatismyip.com it shows the IP address that my ISP has assigned to me.
I gather that my problems are related to the redirect-gateway option.
This site:
https://openvpn.net/index.php/open-source/documentation/howto.html#redirect very clearly explains the adjustments needed on the VPN server to accomplish what I need. But I have no control whatsoever over Privatetunnel's server setup.
I attempted to manually add the option "redirect-gateway def1" to my London.ovpn configuration file, but as far as I can tell this makes no difference.
Any guidance would be greatly appreciated.
Rick B.
I will now post my configuration:
London.ovpn file:
setenv USERNAME "
myusername@myisp.net"
client
dev tun
remote uk-ln-001.privatetunnel.com 1194 udp
remote uk-ln-001.privatetunnel.com 1194 udp
remote uk-ln-001.privatetunnel.com 443 tcp
remote uk-ln-001.privatetunnel.com 1194 udp
remote uk-ln-001.privatetunnel.com 1194 udp
remote uk-ln-001.privatetunnel.com 1194 udp
remote uk-ln-001.privatetunnel.com 1194 udp
remote uk-ln-001.privatetunnel.com 1194 udp
remote-cert-tls server
comp-lzo no
redirect-gateway def1 <<-- I ADDED THIS
auth SHA1
nobind
verb 3
sndbuf 0
rcvbuf 0
socket-flags TCP_NODELAY
<ca>
-----BEGIN CERTIFICATE-----
[encryption key here]
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
[encryption key here]
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
[encryption key here]
-----END CERTIFICATE-----
</cert>
<extra-certs>
-----BEGIN CERTIFICATE-----
[encryption key here]
-----END CERTIFICATE-----
</extra-certs>
<key>
-----BEGIN RSA PRIVATE KEY-----
[encryption key here]
-----END RSA PRIVATE KEY-----
</key>
key-direction 1
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
[encryption key here]
-----END OpenVPN Static key V1-----
</tls-auth>
output of route-print, with Privatetunnel connection active:
===========================================================================
Interface List
15...00 50 b6 13 9d 43 ......ASIX AX88772B USB2.0 to Fast Ethernet Adapter
13...00 ff 1c f5 a3 55 ......TAP-Windows Adapter V9
12...90 a4 de 59 4f 48 ......Atheros AR9285 802.11b/g/n WiFi Adapter
1...........................Software Loopback Interface 1
21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
22...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
23...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
18...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.11.1 192.168.11.147 20
10.9.0.0 255.255.0.0 On-link 10.9.200.41 276
10.9.200.41 255.255.255.255 On-link 10.9.200.41 276
10.9.255.255 255.255.255.255 On-link 10.9.200.41 276
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.11.0 255.255.255.0 On-link 192.168.11.147 276
192.168.11.147 255.255.255.255 On-link 192.168.11.147 276
192.168.11.255 255.255.255.255 On-link 192.168.11.147 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.9.200.41 276
224.0.0.0 240.0.0.0 On-link 192.168.11.147 276
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.9.200.41 276
255.255.255.255 255.255.255.255 On-link 192.168.11.147 276
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
1 306 ::1/128 On-link
13 276 fe80::/64 On-link
15 276 fe80::/64 On-link
15 276 fe80::b9ac:c9f5:8cb:3e70/128
On-link
13 276 fe80::b9ba:1a9f:437:e783/128
On-link
1 306 ff00::/8 On-link
13 276 ff00::/8 On-link
15 276 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
connection log:
Mon Feb 22 14:41:26 2016 Warning: cannot open --log file: C:\Program Files\OpenVPN\log\London.log: Access is denied. (errno=5)
Mon Feb 22 14:41:26 2016 OpenVPN 2.3.8 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Aug 4 2015
Mon Feb 22 14:41:26 2016 library versions: OpenSSL 1.0.1p 9 Jul 2015, LZO 2.08
Mon Feb 22 14:41:26 2016 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25341
Mon Feb 22 14:41:26 2016 Need hold release from management interface, waiting...
Mon Feb 22 14:41:26 2016 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25341
Mon Feb 22 14:41:26 2016 MANAGEMENT: CMD 'state on'
Mon Feb 22 14:41:26 2016 MANAGEMENT: CMD 'log all on'
Mon Feb 22 14:41:26 2016 MANAGEMENT: CMD 'hold off'
Mon Feb 22 14:41:26 2016 MANAGEMENT: CMD 'hold release'
Mon Feb 22 14:41:26 2016 Control Channel Authentication: tls-auth using INLINE static key file
Mon Feb 22 14:41:26 2016 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Feb 22 14:41:26 2016 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Feb 22 14:41:26 2016 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon Feb 22 14:41:26 2016 MANAGEMENT: >STATE:1456173686,RESOLVE,,,
Mon Feb 22 14:41:27 2016 NOTE: setsockopt TCP_NODELAY=1 failed
Mon Feb 22 14:41:27 2016 UDPv4 link local: [undef]
Mon Feb 22 14:41:27 2016 UDPv4 link remote: [AF_INET]5.152.200.198:1194
Mon Feb 22 14:41:27 2016 MANAGEMENT: >STATE:1456173687,WAIT,,,
Mon Feb 22 14:41:27 2016 MANAGEMENT: >STATE:1456173687,AUTH,,,
Mon Feb 22 14:41:27 2016 TLS: Initial packet from [AF_INET]5.152.200.198:1194, sid=f7756b0d de3bbba8
Mon Feb 22 14:41:27 2016 VERIFY OK: depth=2, CN=OpenVPN CA
Mon Feb 22 14:41:27 2016 VERIFY OK: depth=1, CN=PT Transitional 20150615
Mon Feb 22 14:41:27 2016 Validating certificate key usage
Mon Feb 22 14:41:27 2016 ++ Certificate has key usage 00a0, expects 00a0
Mon Feb 22 14:41:27 2016 VERIFY KU OK
Mon Feb 22 14:41:27 2016 Validating certificate extended key usage
Mon Feb 22 14:41:27 2016 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Mon Feb 22 14:41:27 2016 VERIFY EKU OK
Mon Feb 22 14:41:27 2016 VERIFY OK: depth=0, CN=uk4.privatetunnel.com
Mon Feb 22 14:41:28 2016 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Feb 22 14:41:28 2016 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Feb 22 14:41:28 2016 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Feb 22 14:41:28 2016 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Feb 22 14:41:28 2016 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Mon Feb 22 14:41:28 2016 [uk4.privatetunnel.com] Peer Connection Initiated with [AF_INET]5.152.200.198:1194
Mon Feb 22 14:41:29 2016 MANAGEMENT: >STATE:1456173689,GET_CONFIG,,,
Mon Feb 22 14:41:30 2016 SENT CONTROL [uk4.privatetunnel.com]: 'PUSH_REQUEST' (status=1)
Mon Feb 22 14:41:30 2016 PUSH: Received control message: 'PUSH_REPLY,route-gateway 10.9.0.1,ifconfig 10.9.200.41 255.255.0.0,client-ip 64.91.152.8,ping 8,ping-restart 40,comp-lzo no,topology subnet,explicit-exit-notify,redirect-gateway def1,dhcp-option DNS 10.9.0.1,sndbuf 0,rcvbuf 0,socket-flags TCP_NODELAY'
Mon Feb 22 14:41:30 2016 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:3: client-ip (2.3.8)
Mon Feb 22 14:41:30 2016 Option 'explicit-exit-notify' in [PUSH-OPTIONS]:8 is ignored by previous <connection> blocks
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: timers and/or timeouts modified
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: explicit notify parm(s) modified
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: LZO parms modified
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
Mon Feb 22 14:41:30 2016 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: --socket-flags option modified
Mon Feb 22 14:41:30 2016 NOTE: setsockopt TCP_NODELAY=1 failed
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: --ifconfig/up options modified
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: route options modified
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: route-related options modified
Mon Feb 22 14:41:30 2016 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Mon Feb 22 14:41:30 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Mon Feb 22 14:41:30 2016 MANAGEMENT: >STATE:1456173690,ASSIGN_IP,,10.9.200.41,
Mon Feb 22 14:41:30 2016 open_tun, tt->ipv6=0
Mon Feb 22 14:41:30 2016 TAP-WIN32 device [Local Area Connection 2] opened: \\.\Global\{1CF5A355-59A2-42DF-8AD3-493AD70BD2A4}.tap
Mon Feb 22 14:41:30 2016 TAP-Windows Driver Version 9.21
Mon Feb 22 14:41:30 2016 Set TAP-Windows TUN subnet mode network/local/netmask = 10.9.0.0/10.9.200.41/255.255.0.0 [SUCCEEDED]
Mon Feb 22 14:41:30 2016 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.9.200.41/255.255.0.0 on interface {1CF5A355-59A2-42DF-8AD3-493AD70BD2A4} [DHCP-serv: 10.9.255.254, lease-time: 31536000]
Mon Feb 22 14:41:30 2016 NOTE: FlushIpNetTable failed on interface [13] {1CF5A355-59A2-42DF-8AD3-493AD70BD2A4} (status=5) : Access is denied.
Mon Feb 22 14:41:36 2016 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
Mon Feb 22 14:41:36 2016 C:\Windows\system32\route.exe ADD 5.152.200.198 MASK 255.255.255.255 192.168.11.1
Mon Feb 22 14:41:36 2016 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied. [status=5 if_index=15]
Mon Feb 22 14:41:36 2016 Route addition via IPAPI failed [adaptive]
Mon Feb 22 14:41:36 2016 Route addition fallback to route.exe
Mon Feb 22 14:41:36 2016 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Mon Feb 22 14:41:36 2016 ERROR: Windows route add command failed [adaptive]: returned error code 1
Mon Feb 22 14:41:36 2016 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.9.0.1
Mon Feb 22 14:41:36 2016 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied. [status=5 if_index=13]
Mon Feb 22 14:41:36 2016 Route addition via IPAPI failed [adaptive]
Mon Feb 22 14:41:36 2016 Route addition fallback to route.exe
Mon Feb 22 14:41:36 2016 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Mon Feb 22 14:41:37 2016 ERROR: Windows route add command failed [adaptive]: returned error code 1
Mon Feb 22 14:41:37 2016 C:\Windows\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.9.0.1
Mon Feb 22 14:41:37 2016 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied. [status=5 if_index=13]
Mon Feb 22 14:41:37 2016 Route addition via IPAPI failed [adaptive]
Mon Feb 22 14:41:37 2016 Route addition fallback to route.exe
Mon Feb 22 14:41:37 2016 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Mon Feb 22 14:41:37 2016 ERROR: Windows route add command failed [adaptive]: returned error code 1
Mon Feb 22 14:41:37 2016 Initialization Sequence Completed
Mon Feb 22 14:41:37 2016 MANAGEMENT: >STATE:1456173697,CONNECTED,SUCCESS,10.9.200.41,5.152.200.198