Hi all!
I want to setup a OpenVPN on my DDWRT router; with "redirect-gateway def1" -> or in other words as tunnel for redirecting all traffic for clients.
With configuration (see below) I can connect to OpenVPN server (from my Mac and from iPhone); I can ping my Router directly (192.168.186.1), also I can access NAS which is behind router; I can ping the (alias) openVPN server IP 192.168.15.1
But i cant browse to other sites; and cannot get working properly.
Here is the problem (executed on Mac)
$ traceroute www.google.com
traceroute: Warning: www.google.com has multiple addresses; using 173.194.69.105
traceroute to www.l.google.com (173.194.69.105), 64 hops max, 52 byte packets
1 192.168.15.1 (192.168.15.1) 14.492 ms 17.060 ms 15.207 ms
2 * * * (....)
I hope someone will look into this...
Here is my setup:
Server config:
root@DD-WRT:~# cat /tmp/openvpn/openvpn.conf
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
keepalive 10 120
verb 4
mute 5
log-append /var/log/openvpn
tls-server
management 127.0.0.1 5002
management-log-cache 50
mtu-disc yes
topology subnet
client-config-dir /tmp/openvpn/ccd
script-security 2
port 1194
proto udp
cipher aes-128-cbc
auth sha256
ifconfig-pool-persist /tmp/openvpn/ip-pool 86400
comp-lzo yes
push "redirect-gateway def1"
fast-io
tun-mtu 1500
server 192.168.15.0 255.255.255.0
dev tun0
tls-auth /tmp/openvpn/ta.key 0
push "dhcp-option DNS 8.8.8.8"
Here is my Viscosity config:
client
remote 84.xxx.xxx.xxx 1194 udp
persist-key
tls-client
tls-auth ta.key 1
pull
ca ca.crt
dev tun
persist-tun
cert cert.crt
comp-lzo yes
nobind
key key.key
tls-timeout 10
resolv-retry infinite
mute 5
nobind
remote-cert-tls server
verb 5
auth sha256
script-security 2
route-delay 2
cipher aes-128-cbc
Here are IPABLES script on DDWRT router:
iptables -I INPUT 1 -p udp -dport=1194 -j ACCEPT
iptables -I FORWARD 1 -source=192.168.15.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
Best Regards