I have two linux machines connected to each other over an OpenVPN connection. Box1 VPN IP 192.168.210.1, Box2 VPN IP 192.168.210.2. I use TAP.
Both linux machines site behind standard SOHO routers. Site1 (192.168.1.0/24) connected to Fios, Site2 (192.168.5.0/24) connected to cable internet.
I have established working routing between the two sites, so that all computers at each site can see all computers at the other site. Additionally, other OpenVPN clients at 192.168.210.3+ can see Site1 and Site2 without any issues.
I'd like to establish some routes at Site1 that will force some traffic destined for the outside to traverse over the VPN from Site1 to Site2 and then out to the internet.
I'm struggling with the routing tables at Site1 and Site2 to accomplish this.
Any pointers/howto links would be appreciated. -- (1) It's either 99¢ or $0.99; not .99¢ (2) It's "so MUCH fun" not "so fun"
On second thought, the link was perfect. It got me to the right answer. Thank you.
for posterity, the answer was quite simple. i screwed up the original route add command.
the example i wanted test was to route all traffic to 126.96.36.199 (whatismyipaddress.com) from the VPN server to the VPN client.
the correct route command is:
route add -net 188.8.131.52 netmask 255.255.255.0 gw 192.168.210.2 dev tap0
where 184.108.40.206 is the destination network where 255.255.255.0 is the netmask for the dest network range where 192.168.210.2 is the client VPN IP address where tap0 is the network device on the server that is used by OpenVPN
life is good again.
additionally, forcing all other LAN devices on the openvpn server side to use this route would require an entry in the SOHO router on the server side to match. -- (1) It's either 99¢ or $0.99; not .99¢ (2) It's "so MUCH fun" not "so fun"