Connect to a VPN and keep normal Internet connections
Saturday, October 20th, 2007VPN is great for working from home or working remotely, however the VPN remote access in Windows XP (or maybe vista) will switch all traffic trough the VPN connection once VPN connection established, that sometimes create some trouble: Internet surf will be much slower, some corporate network setting may not allow access to Internet so normal Internet surf may not work.
This problem can be easily solved by config the route table by yourself. To get a help of “route” simply type “route”:
C:> route
To make things simple, you can dump the route table before connect to VPN:
C:>route print
And dump it again after VPN connection established, from the two route table, you will find out the differents. Here is an example after VPN established:
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 172.19.xxx.xx 172.19.xxx.xx 1
0.0.0.0 0.0.0.0 192.168.1.126 192.168.1.19 21… …
Please notice the first two lines, the metric number will decide the priority of the route selection. (smaller is higer priority)
My only VPN usage is connect to my working computer and using remote desktop, and I have no other requirement to connect to other computers inside the VPN directly. What I did is, add a new route entry for my working PC and make all other destination go through my home router:
c:> route add 65.xx.xxx.xx mask 255.255.255.255 172.19.xxx.xx
c:> route change 0.0.0.0 mask 0.0.0.0 192.168.1.126
65.xx.xx.xx is my working PC IP address, 172.19.xxx.xx is the default gateway of the VPN connection, 192.168.1.126 is my home router local address.
It can be done by a BAT script:
rasdial /disconnectroute add 65.xx.xxx.xx mask 255.255.255.255 172.19.xxx.xx
rasdial “My VPN Connection” “MYDOMAIN\myusername” *route change 0.0.0.0 mask 0.0.0.0 192.168.1.126
It’s always easy to change the route table as you wish to make the online line much easier, enjoying VPN without having to break the normal Intenet connection.
Popularity: 18% [?]
About