How do I setup Ubuntu/Linux's Network manager to selectively route network traffic through the VPN?
For my Cisco Compatible VPN in Ubuntu 9.04 (VPNC), there is a check box to select.
Edit your connections, go to the VPN tab, and edit the VPN configuration.
Go to the IPv4 Settings tab, and in the bottom right is a button "Routes".
Click the button and check the box "Use this connection only for resources on its network"
As others have mentioned, there are text based configuration files one can alter instead of using the GUI. One nice thing about GUIs is that you don't have to memorize all the possible values or worry about spelling
With the advice in the above answers and a bit of searching on my own, I was able to find the answer to my own question.
First, I determined what IP address ranges were being used on the VPN, in my case 192.168.32.*
and 192.168.16.*
. Then I connected to my VPN normally and SSH'ed to a server on the network. I ran route on that machine and got the gateway address and metric being used. Then I added routes for the two IP address ranges to the routes field in the IPv4 settings tab and clicked on "Use this connection only for resources on its network" and "Ignore automatically obtained routes". Then poof like magic it worked.
If you want to do a block edit, export or simply a backup the details are in this folder /etc/NetworkManager/system-connections/
To apply changes if any you should do
sudo NetworkManager stop
sudo NetworkManager start