Specific worked example of multiple routes

Got a problem with Viscosity or need help? Ask here!

randykahle

Posts: 2
Joined: Sat Jan 10, 2009 5:27 am

Post by randykahle » Sat Jan 10, 2009 5:41 am
I need some help setting up my computer to work with Viscosity.

What I want is to have traffic going to 192.168.100.0/255.255.255.0 to use the VPN tunnel to a remote network and all other traffic (I'm 192.168.0.100 on 192.168.0.0/255.255.255.0 with gateway at 192.168.0.2) to go out through my normal gateway.

Right now I have the VPN working fine - but ALL traffic goes over it. And when the VPN is disconnected, all is fine - all traffic goes through 192.168.0.2.

Thank you!

-- Randy

James

User avatar
Posts: 1915
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Mon Jan 12, 2009 10:58 pm
Hi Randy,

By default all traffic should be using your normal gateway (i.e. the default route shouldn't change when you connect). Check to see if your OpenVPN server is pushing out the "redirect-gateway" command. If it is, then this command is responsible for redirecting all traffic through the VPN connection. If you are in control of the OpenVPN server, simply comment out this command from the config file and you should be good to go. It's also possible to tell Viscosity to ignore pushed commands (by un-ticking the "Pull Options" checkbox under the Options tab), however there may be some other pushed commands that you require.

You should also check to make sure "Send all traffic over VPN connection" (under the Networking tab) is un-ticked at Viscosity's end.

Besides that, you'll need to add the 192.168.100.0/255.255.255.0 route to the routing table (also under the Networking tab), with a gateway of "vpn_gateway".

At worst you could try and override the default gateway when connecting by also adding an additional route of 0.0.0.0/0.0.0.0 to the routing table, with the gateway set to "net_gateway". However before attempting this you should ensure that the "redirect-gateway" command isn't causing your problem.

Cheers
James
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
2 posts Page 1 of 1