Apologies if this is a stupid question, I'm new to this. I am trying to setup an OpenVPN client on my openwrt router so that all devices connected to this router will be using my VPN. I have followed
this guide pretty closely and from what I can see I think my VPN is connecting properly but I still can't access the internet through the router.
My logs indicate that I am connecting fine
Fri Jan 16 13:47:32 2015 us=513936 OpenVPN 2.3.6 mips-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Jan 6 2015
Fri Jan 16 13:47:32 2015 us=514309 library versions: OpenSSL 1.0.1k 8 Jan 2015, LZO 2.08
Fri Jan 16 13:47:32 2015 us=514910 WARNING: file 'login.txt' is group or others accessible
Fri Jan 16 13:47:32 2015 us=522657 LZO compression initialized
Fri Jan 16 13:47:32 2015 us=525021 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Fri Jan 16 13:47:32 2015 us=526344 Socket Buffers: R=[163840->131072] S=[163840->131072]
Fri Jan 16 13:47:32 2015 us=587531 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Jan 16 13:47:32 2015 us=588720 UDPv4 link local: [undef]
Fri Jan 16 13:47:32 2015 us=590031 UDPv4 link remote: [AF_INET]66.55.134.214:1194
Fri Jan 16 13:47:32 2015 us=723670 TLS: Initial packet from [AF_INET]66.55.134.214:1194, sid=61b065ef 8189efeb
Fri Jan 16 13:47:32 2015 us=725462 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Jan 16 13:47:33 2015 us=521619 CRL CHECK OK: C=US, ST=OH, L=Columbus, O=Private Internet Access, CN=Private Internet Access CA, emailAddress=secure@privateinternetaccess.com
Fri Jan 16 13:47:33 2015 us=522650 VERIFY OK: depth=1, C=US, ST=OH, L=Columbus, O=Private Internet Access, CN=Private Internet Access CA, emailAddress=secure@privateinternetaccess.com
Fri Jan 16 13:47:33 2015 us=527424 Validating certificate key usage
Fri Jan 16 13:47:33 2015 us=528222 ++ Certificate has key usage 00a0, expects 00a0
Fri Jan 16 13:47:33 2015 us=528960 VERIFY KU OK
Fri Jan 16 13:47:33 2015 us=529744 Validating certificate extended key usage
Fri Jan 16 13:47:33 2015 us=530538 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Fri Jan 16 13:47:33 2015 us=531352 VERIFY EKU OK
Fri Jan 16 13:47:33 2015 us=532875 CRL CHECK OK: C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=Private Internet Access, name=Private Internet Access, emailAddress=secure@privateinternetaccess.com
Fri Jan 16 13:47:33 2015 us=533684 VERIFY OK: depth=0, C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=Private Internet Access, name=Private Internet Access, emailAddress=secure@privateinternetaccess.com
Fri Jan 16 13:47:35 2015 us=190751 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Jan 16 13:47:35 2015 us=192055 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Jan 16 13:47:35 2015 us=193571 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Jan 16 13:47:35 2015 us=194884 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Jan 16 13:47:35 2015 us=196617 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Fri Jan 16 13:47:35 2015 us=197745 [Private Internet Access] Peer Connection Initiated with [AF_INET]66.55.134.214:1194
Fri Jan 16 13:47:37 2015 us=443600 SENT CONTROL [Private Internet Access]: 'PUSH_REQUEST' (status=1)
Fri Jan 16 13:47:37 2015 us=574723 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 209.222.18.222,dhcp-option DNS 209.222.18.218,ping 10,route 10.167.1.1,topology net30,ifconfig 10.167.1.6 10.167.1.5'
Fri Jan 16 13:47:37 2015 us=576630 OPTIONS IMPORT: timers and/or timeouts modified
Fri Jan 16 13:47:37 2015 us=577635 OPTIONS IMPORT: --ifconfig/up options modified
Fri Jan 16 13:47:37 2015 us=578578 OPTIONS IMPORT: route options modified
Fri Jan 16 13:47:37 2015 us=579505 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Jan 16 13:47:37 2015 us=594502 TUN/TAP device tun123 opened
Fri Jan 16 13:47:37 2015 us=595834 TUN/TAP TX queue length set to 100
Fri Jan 16 13:47:37 2015 us=596280 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Jan 16 13:47:37 2015 us=596693 /sbin/ifconfig tun123 10.167.1.6 pointopoint 10.167.1.5 mtu 1500
Fri Jan 16 13:47:37 2015 us=617919 /sbin/route add -net 66.55.134.214 netmask 255.255.255.255 gw 192.168.1.1
Fri Jan 16 13:47:37 2015 us=635691 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.167.1.5
Fri Jan 16 13:47:37 2015 us=643060 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.167.1.5
Fri Jan 16 13:47:37 2015 us=678819 /sbin/route add -net 10.167.1.1 netmask 255.255.255.255 gw 10.167.1.5
Fri Jan 16 13:47:37 2015 us=696517 Initialization Sequence Completed
But my ifconfig output is different from the one in the tutorial
The tutorial has
tun1337 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:46.246.36.165 P-t-P:46.246.36.165 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:770 errors:0 dropped:0 overruns:0 frame:0
TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:114167 (111.4 KiB) TX bytes:4050 (3.9 KiB)
Where the inet addr is the address of the VPN server, however my inet address is internal
tun123 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.167.1.6 P-t-P:10.167.1.5 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:69 errors:0 dropped:0 overruns:0 frame:0
TX packets:378 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:5244 (5.1 KiB) TX bytes:19145 (18.6 KiB)
Similarly my netstat table has internal IP addresses on it and the one from the tutorial is to the VPN server
Tutorial
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 46.246.36.1 128.0.0.0 UG 0 0 0 tun1337
46.246.36.0 0.0.0.0 255.255.255.0 U 0 0 0 tun1337
128.0.0.0 46.246.36.1 128.0.0.0 UG 0 0 0 tun1337
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
46.246.36.130 192.168.1.1 255.255.255.255 UGH 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan
Mine
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.30.1.21 128.0.0.0 UG 0 0 0 tun123
10.30.1.21 0.0.0.0 255.255.255.255 UH 0 0 0 tun123
10.30.1.1 10.30.1.21 255.255.255.255 UGH 0 0 0 tun123
128.0.0.0 10.30.1.21 128.0.0.0 UG 0 0 0 tun123
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
107.191.33.7 192.168.1.1 255.255.255.255 UGH 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan
Why is my OpenVPN client using internal IP addresses?