Only route a couple of IPs through VISCOSITY

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

cjedj

Posts: 2
Joined: Mon Sep 07, 2009 11:55 pm

Post by cjedj » Tue Sep 08, 2009 12:01 am
Hi there

I'm using a commercial VPN solution, and have just successfully set this up with Viscosity. However, all my traffic is currently being routed through my Viscosity connection. Ideally, I'd like to only have one or two IPs going through the VPN, and everything else going through my normal internet connection. I've unchecked "Send all traffic over network connection" in the networking tab.

I've tried entering Route (ip address), Mask (255.255.255.0) and vpn_gateway in the Networking tab, but all my traffic still gets routed through Viscosity, not just the IP address

Sorry for the noob question, but can anyone tell me what else I need to do to just route selected IPs through the VPN?

I'm using 1.0.5 and Leopard 10.5.8

Thanks :)

James

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

Post by James » Wed Sep 09, 2009 4:42 pm
I've tried entering Route (ip address), Mask (255.255.255.0) and vpn_gateway in the Networking tab, but all my traffic still gets routed through Viscosity, not just the IP address
The OpenVPN server you are connected to would be sending out the "Send all traffic through the VPN" command. So even though you don't have this ticked under Viscosity, the OpenVPN server is still turning it on.

There are two ways around this: (1) to ignore the command being sent by the server, or (2) write your own up script script to override it.

(1) This option is easy to achieve - simply untick the "Pull Options" checkbox under the Options tab when editing your connection. However this means Viscosity/OpenVPN will ignore ALL settings sent by the server. So if your IP address, DNS server, etc comes from the server, then you'll also lose all this. Instead you can try leaving the option ticked and add the command "route-nopull" (no quotes) on a new line under the Advanced tab, and see if that does the trick.

(2) You can write your own up script to override the default route to be through your normal Internet connection. However this involves knowing how to write your own up scripts (see the OpenVPN man page for information about the up command), and editing the Mac OS X routing table.

Cheers,
James
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

cjedj

Posts: 2
Joined: Mon Sep 07, 2009 11:55 pm

Post by cjedj » Wed Sep 09, 2009 4:48 pm
Thanks for the suggestions, option 2 is beyond my grasp I think, but I'll give option 1 a try. Fantastic app by the way, I've been playing with some Applescripts with it, loads of possibilities!
3 posts Page 1 of 1