dslreports logo
    All Forums Hot Topics Gallery


how-to block ads

Search Topic:
share rss forum feed



OpenVPN: Routing Question

I have two linux machines connected to each other over an OpenVPN connection. Box1 VPN IP, Box2 VPN IP I use TAP.

Both linux machines site behind standard SOHO routers. Site1 ( connected to Fios, Site2 ( 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 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"




Thanks. Unfortunately, this isn't working for me.


reply to eibgrad
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 (whatismyipaddress.com) from the VPN server to the VPN client.

the correct route command is:

route add -net netmask gw dev tap0

where is the destination network
where is the netmask for the dest network range
where 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"