Hey folks,
I've set up OpenVPN on a dd-wrt router. I can connect fine using my android phone (certificates are ok), but after I do, there's no DNS service (I can open sites using their IP). The OpenVPN Connect client, on the Android device, shows my IP as 192.168.17.6. I can access devices on my local network without a problem. My external IP, however, is not the router's external IP, but the mobile carrier's IP.
Here's my setup:
push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 8.8.8.8"
server 192.168.17.0 255.255.255.0
dev tun0
proto udp
keepalive 10 120
comp-lzo
script-security 2
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
# Only use crl-verify if you are using the revoke list - otherwise leave it commented out
# crl-verify /tmp/openvpn/ca.crl
# management parameter allows DD-WRT\s OpenVPN Status web page to access the server\s management port
# port must be 5001 for scripts embedded in firmware to work
management localhost 16
If I remove "push "dhcp-option DNS 8.8.8.8"", I can open sites with their URL, because Android's OpenVPN client automatically assigns Google's DNS if the OpenVPN server doesn't push any DNS information. But if I push the DNS to the client, I can no longer open URL's (even though 8.8.8.8 is used in both cases).
Here are the firewall rules:
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.17.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
Here's the client configurtion:
remote my.router's.external.ip 1194
client
remote-cert-tls server
dev tun0
proto udp
resolv-retry infinite
nobind
persist-key
persist-tun
float
keepalive 10 120
inactive 3600
comp-lzo
verb 3
nobind
script-security 2
Any help will be greatly appreciated!