VPN connected but no internet
Posted: Sun Apr 21, 2013 1:59 am
Hello,
I can successfully connect my iphone to the openvpn server on a ddwrt router but I cant get internet on it. My goal is to configure OpenVPN server on my DD-WRT router and connect my iphone/laptop to it when not at home. Please check out this link which shows my current network.
Image deleted
I have port forwarded 1194 to 192.168.0.27 from my cisco modem/router.
Here is my server config file:
push "route 192.168.5.0 255.255.255.0"
push "route 192.168.0.0 255.255.255.0"
push "dhcp-option DNS 10.8.0.1"
push "redirect-gateway def1"
server 10.8.0.0 255.255.255.0
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 5001
Here is the client config file:
remote wanip 1194
client
remote-cert-tls server
dev tun0
proto tcp
resolv-retry infinite
nobind
persist-key
persist-tun
float
route-delay 30
ca ca.crt
cert client.crt
key client.key
firewall commands:
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.5.0/24 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.0.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
I used this website as a guide:
http://www.dd-wrt.ca/wiki/index.php/
the problem is I cant get internet access on the phone. But I am able to access the router configs by typing in 192.168.5.1 on safari. I can also ping the router (192.168.5.1 and 192.168.0.27) and the Openvpn server (10.8.0.1) successfully.
If i remove push "redirect-gateway def1" from server config, then i can access internet but thats no use to me because I want my web browsing to be secured which goes through the VPN.
I have tried udp instead of tcp with no success. not sure what else too do.
Please help. Thanks.
I can successfully connect my iphone to the openvpn server on a ddwrt router but I cant get internet on it. My goal is to configure OpenVPN server on my DD-WRT router and connect my iphone/laptop to it when not at home. Please check out this link which shows my current network.
Image deleted
I have port forwarded 1194 to 192.168.0.27 from my cisco modem/router.
Here is my server config file:
push "route 192.168.5.0 255.255.255.0"
push "route 192.168.0.0 255.255.255.0"
push "dhcp-option DNS 10.8.0.1"
push "redirect-gateway def1"
server 10.8.0.0 255.255.255.0
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 5001
Here is the client config file:
remote wanip 1194
client
remote-cert-tls server
dev tun0
proto tcp
resolv-retry infinite
nobind
persist-key
persist-tun
float
route-delay 30
ca ca.crt
cert client.crt
key client.key
firewall commands:
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.5.0/24 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.0.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
I used this website as a guide:
http://www.dd-wrt.ca/wiki/index.php/
the problem is I cant get internet access on the phone. But I am able to access the router configs by typing in 192.168.5.1 on safari. I can also ping the router (192.168.5.1 and 192.168.0.27) and the Openvpn server (10.8.0.1) successfully.
If i remove push "redirect-gateway def1" from server config, then i can access internet but thats no use to me because I want my web browsing to be secured which goes through the VPN.
I have tried udp instead of tcp with no success. not sure what else too do.
Please help. Thanks.