I am running OpenVPN linking two linux machines on two networks. These machines are not the networks' gateways. There are also separate DD-WRT routers which are acting as the gateways on both networks.
I would like to use this setup to make both networks completely visible and usable to each other over the internet. What types of routes would I need to set up on each box/router to make this possible? Do I need to use any kind of iptables rules (not thinking I would).
Also, just couple points-
- The link works fine between the two boxes. They are able to ping each other and transmit traffic.
- I do not want any of the normal internet traffic passed across the VPN- only the traffic intended to go to the specific site.
- The networks have separate IP ranges and both netmask 255.255.255.0
I'm stuck and I've tried adding all kinds of static routes on both my linux boxes and the routers and I can't seem to get anything pingable outside of the VPN link. Any help would be greatly appreciated!
I have added the routes on my VPN boxes and DD-WRT routers, but i'm not able to ping anything outside of the machines. I can ping 172.16.130.2 from the VPN client, and vice-versa I'm able to ping 172.16.120.2 from the VPN server, but still nothing else.
I have also enabled IP forwarding in the kernels of both VPN boxes.
Adding Current Routes:
VPN Server: nonpublished static IP eth0 / 172.16.130.2 eth1 / 10.9.8.1 tun0
Destination Gateway Genmask Flags Metric Ref Use Iface 10.9.8.2 * 255.255.255.255 UH 0 0 0 tun0 18.104.22.168 * 255.255.255.224 U 0 0 0 eth0 172.16.130.0 172.16.130.1 255.255.255.0 UG 0 0 0 eth1 172.16.130.0 * 255.255.255.0 U 0 0 0 eth1 172.16.120.0 10.9.8.2 255.255.255.0 UG 0 0 0 tun0 default wsip-24-249-108 0.0.0.0 UG 0 0 0 eth0
VPN Client: 172.16.120.2 eth0 / 10.9.8.2 tun0
Destination Gateway Genmask Flags Metric Ref Use Iface 10.9.8.1 * 255.255.255.255 UH 0 0 0 tun0 172.16.130.0 10.9.8.1 255.255.255.0 UG 0 0 0 tun0 172.16.120.0 * 255.255.255.0 U 0 0 0 eth0 default munch-router 0.0.0.0 UG 0 0 0 eth0