One of the (many) great strengths of VPN is that it encrypts a computer’s entire internet connection. This is great for security, but it can also be inconvenient at times, such when individual websites refuse to play ball with known VPN IPs (for example Hulu), or which block foreign IP addresses.
So wouldn’t it be great if we could bypass our VPN connection for specific websites? Well, fortunately we can, using static IP routing!
Unfortunately, bypassing complex websites that use multiple IP addresses is difficult using IP routing (our attempts to bypass VPN when running BBC iPlayer failed), but for simpler sites it works very well.
Windows manual method
1. Run cmd.exe:
- Windows XP – Start -> Run -> type ‘command’
- Windows Vista / 7 – Start -> All Programs -> Accessories -> right-click Command Prompt and choose ‘Run as Administrator’
- Windows 8 – in Metro mode (Start Screen) click on ‘Apps’ -> type ‘cmd’ in the search box press enter -> when you see the cmd icon, right click on it, then right-click on ‘Advanced’ at the bottom right, and select ‘Run as administrator)
- Windows 8.1 – Right-click Start -> Command Prompt (Admin)
2. Find out your gateway IP address (this is usually the IP address of your router).
- Type ‘route print’ at the prompt and hit enter
- Look under ‘Active Routes: Network Destination / Gateway for your gateway IP
3. Find out the IP address of the website you want to bypass. As a test we will use http://ipaddress.com, so visit it with your VPN enabled (it sgould show your VPN server’s IP address and location), then either:
- Type ‘Ping ipaddress.com’ at the command prompt
- visit http://websiteipaddress.com/Site/ipaddress.com (or similar)
4. At the command prompt type ‘route add [website IP] [gateway IP]’
e.g. ‘route add 184.108.40.206 192.168.1.0’
If you refresh/revisit http://ipaddress.com you should now see your real IP address!
Windows UNrouting utility
VPN provider HideMyAss (HMA) provides a simple tool that does exactly the same as above, but without the need of a command prompt. You will still need to establish your gateway IP address, however (see Steps 1 & 2 above).
The utility should be run as an administrator (right-click desktop icon and select ‘Run as administrator’). Note that this tool is a simple graphic interface (GUI) for performing the actions discussed above, and should therefore work with all VPN connections (not just HMA).
OSX manual method
This is very similar to the Windows manual method.
1. Open Terminal – Applications -> Utilities -> Terminal.
2. Type ‘netstat-r’ to see routing tables and establish gateway IP address (as Step 2 for Windows above).
3. Type ‘ping ipaddress.com’ (for example) to find the target website’s IP address.
4. Type ‘sudo route -nv add [destinationIP] [gatewayIP] to add a routing rule
e.g. ‘sudo route -nv add 220.127.116.11 192.168.1.0.
There are too many Linux distributions to cover here, but this article goes into detail on configuring static routes in Debian and Red Hat Enterprise Linux.
Type ‘su’ to get root privileges, and ‘ip route’ to show current routing rules. The article on Linux above explains how to set your own rules.
Our thanks to HideMyAss for providing the UNrouting utility, and much of the raw information in this article.