Hi Gunther,
What you are asking to do is a two step process: first you need to make sure all network traffic is not going through the VPN connection by default, and then you need to specify the routes you want to go through the VPN connection.
Stopping All Network Traffic Going Through The VPN ConnectionFirstly make sure that you have unticked the "Send all traffic over VPN connection" under the Networking tab like so:
1. Open Viscosity's Preferences window
2. Select your connection and click the Edit button
3. Click on the Networking tab and untick the "Send all traffic over VPN connection" checkbox
4. Click Save
If it appears all traffic is still being sent through the VPN connection, even with the above option unticked, it is probably being overridden by the VPN server. If you are in control of the OpenVPN server you should remove the appropriate option. If not, 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.
Specifying Routes To Go Through The VPN ConnectionLike the previous post, routes can be added under the networking tab as outlined below. However instead of using "net_gateway" as the Gateway, you use "vpn_gateway".
1. Edit your connection in Viscosity
2. Click on the Networking tab
3. Click the small "+" button to add a new route. Enter "my.server.com" as the Route/IP (obviously replacing the text with the actual DNS name or IP address of your server), "255.255.255.0" as the mask, "vpn_gateway" as the Gateway, and leave the Metric field blank. Click Add.
4. Repeat step 3 if you use multiple servers.
Cheers,
James