Windows 7 — SkyHi @ Wednesday, February 27, 2013
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), clickProperties, 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.