To stay connected while I’m out of the office or travelling, I use a VPN connection from my laptop to a Windows Server. And while the benefit of being able to quickly and securely access my documents and other files on the server over any Internet connection is nice, the drawback is that all Internet traffic gets routed through the default gateway on the remote network – meaning that surfing the Web or accessing other Internet resources outside of the VPN is usually slower than just using the local connection.
In cases where I know that the local connection is secure (at home or at a remote office), I still want to be able to use mapped drives and securely access the files on my server via the VPN, but I want to use the local connection to do all other Internet surfing.
The secret lies in the default gateway. If you use the local default gateway, Internet traffic will be routed via the local connection. If you use the remote default gateway, Internet traffic goes through the remote connection. By default, Windows VPN connections use the remote gateway – but changing the default is very easy.
Open your local network connections (on Vista or Windows 7, just click the network icon in the tray), find your VPN connection, right-click it, and select Properties. Click the Networking tab, select Internet Protocol Version 4 (TCP/IPv4), click Properties, click Advanced, then uncheck Use default gateway on remote network. Press OK until all the dialog boxes are closed. That’s it!
Connect to your VPN, and verify that you’re using the local connection to access the Web by using the IP Address Lookup Tool at WhatIsMyIp.com.
In situations where you aren’t sure of the local network’s security, you can re-enable the remote default gateway and surf using the gateway connected to your VPN server. It may be slower, but it could be worth it in scenarios where security is more important than speed.
Related posts:
- How to set up two NICs on different subnets with static routes and separate default gateways that remain after a reboot
- Set up VNC from Windows to Fedora 12 Over the Internet
- How to Set Up VNC from Windows to Fedora 14 Over the Internet
- Using Windows Live Family Safety with a Windows Domain
- Migrating an Active Directory Domain Controller from Windows 2000 to Windows 2008 R2
Another useful tidbit regarding VPN configuration: While traveling outside your home country, you will find yourself routed to the host country gateway, DNS, etc. So while traveling in France, you will be presented with Yahoo in French, and while traveling in Germany, you will be presented with Google results preferring German websites. Yes, you can always click the British flag if you want English on many of the websites, and you can specifically ask for google.com rather than google.de, but you can also just use your VPN connection to see the Internet as you do while you’re home.
Good point, James. Always nice to have the input of a seasoned world business traveler like yourself.