Ok so this is driving me crazy no reason this should be so hard to set up. Having a problem trying to get an android 4.4 gnex to connect to the internet and my local network (192.168.0.0) through a dd-wrt router with openvpn. Router is netgear r7000 and is the only router on the network, running latest kongAC 23900M. 192.168.0.1 is router ip, 10.8.0.0 is openvpn server subnet. Server gets 10.8.0.1 android phone gets 10.8.0.2. Followed this tutorial
http://wazem.blogspot.ca/2013/07/how-to-configure-openvpn-between-dd-wrt.html along with trying all the outdated tutorials on the dd-wrt wiki.
Config is as follows:
OpenVPN: Enabled
Start Type: Wan up
Config as: Server
Server mode: TUN
Network: 10.8.0.0
Netmask: 255.255.255.0
Port: 1194
Tunnel Protocol: TCP
Encryption Cipher: AES-256-CBC
Hash Algorithm: MD5
Advanced Options: Enabled
TLS Cipher: None
LZO Compression: Adaptive
Redirect default Gateway: Disable
Allow Client to Client: Enable
Allow duplicate cn: Disable
Tunnel MTU setting: 1500
Tunnel UDP Fragment: Blank (disabled)
Tunnel UDP MSS-Fix: Disable
Additional Config: (Server Side)
push "route 192.168.0.0 255.255.255.0"
server 10.8.0.0 255.255.255.0
push "dhcp-option DNS 207.67.222.222"
dev tun0
proto tcp
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
management localhost 16
Client Config: (OpenVPN for Andriod GNex w/ v4.4.2)
management /data/data/de.blinkt.openvpn/cache
mgmtsocket unix
managment-client
management-query-passwords
managment-hold
machine-readable-output
client
verb 4
connect-retry 5
resolv-retry 60
dev tun
remote myexternalipaddress 1194 tcp-client
comp-lzo
route-ipv6 ::/0
route 0.0.0.0 0.0.0.0 vpn_gateway (no idea why this is here)
nobind
cipher AES-256-CBC
auth MD5
float
persist-tun
preresolve
ns-cert-type server
Firewall Rules: This is where I'm sure the problem is.
iptables -I INPUT 1 -p tcp --dport 1194 -j ACCEPT
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I INPUT -i tun0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j MASQUERADE
iptables -I FORWARD -i tun0 -j ACCEPT
iptables -I FORWARD -o tun0 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
Routing table:
0.0.0.0 0.0.0.0 XXX.XXX.XXX.1 UG 0 WAN
10.8.0.0 255.255.255.0 0.0.0.0 U 0 tun0
XXX.XXX.XXX.0 255.255.254.0 0.0.0.0 U 0 WAN
169.254.0.0 255.255.0.0 0.0.0.0 U 0 LAN & WLAN
192.168.0.0 255.255.255.0 0.0.0.0 U 0 LAN & WLAN
(Had to block external IP with XXX)
With the current config I have I'm able to connect to the vpn but not much else. I can ping 10.8.0.1 and 10.8.0.2, I can also ping the router 192.168.0.1. I cannot access the internet or my home server at 192.168.0.100. Help!