on windows 7, vpn'ing to work, how to force all traffic to use VPN?

right now when I connect to my VPN, my internet is served from my home router, but any requests for xxx.xxx.xxx.xxx i.e. my works ip range are served via the vpn connection I believe.

How can I force all traffic to the vpn?


On Windows XP (not what you're asking, but no 7 here), there's an option "Use default gateway on remote network" (see the settings of your VPN network, tab "Networking", "Internet Protocol (TCP/IP)", "Properties" again, and finally "Advanced").

Enabling that (which is the default) will make all traffic go through the VPN.


Each time you connect you'd need to change your default route to the route to the VPN. You'd use the route command to do this:

route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 1.2.3.4

Replacing 1.2.3.4 with the gateway IP for the VPN. Just keep in mind that (obviously) your work can see all your traffic if you do that.