Hello, I am trying to set up a typical roadwarrior-style VPN. I would like my Openvpn client device to send all its traffic through my home network. My client and server can already connect, now I just need to configure tunneling/routing.
My ISP (Verizon fios) requires me to use thier router. I have forwarded port 31194 for openvpn on that router. I have connected a switch to that router and installed Openvpn on it. This switch is just a DD-WRT router with the wan port disabled. My Openvpn client is a Droid running Cyanogenmod 7. It can connect to the Openvpn server locally and remotely. I can confirm this by doing "tcpdump -i tun0" on the server. It shows the connection requests coming from the client.
The router IP is 192.168.1.1, and the Openvpn server IP is 192.168.1.129.
Server config:
dev tun
server 192.168.5.0 255.255.255.0
port 31194
dh dh2048.pem
ca ca.crt
cert belkin-play.crt
key belkin-play.key
script-security 2
push "route 192.168.1.0 255.255.255.0"
user nobody
group nobody
persist-tun
persist-key
keepalive 10 60
Client config:
client
remote dyndns.example.com 31194 udp
dev tun
tls-client
ca ca.crt
cert client.crt
key client.key
keepalive 10 60
redirect-gateway
Here is the server's route table:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.5.2 * 255.255.255.255 UH 0 0 0 tun0
192.168.5.0 192.168.5.2 255.255.255.0 UG 0 0 0 tun0
192.168.1.0 * 255.255.255.0 U 0 0 0 br0
169.254.0.0 * 255.255.0.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 br0
Also, IP forwarding is enabled:
# cat /proc/sys/net/ipv4/ip_forward
1