ProPrivacy is reader supported and sometimes receives a commission when you make purchases using links on this site.

How to bypass a VPN to access specific websites

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

 

windows manual 1

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

 

windows manual 2

or

 

ipaddress

4. At the command prompt type ‘route add [website IP] [gateway IP]’

e.g. ‘route add 91.250.85.234 192.168.1.0’

If you refresh/revisit http://ipaddress.com you should now see your real IP address!

Windows UNrouting utility

VPN provider 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).

 

unrouting

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 91.250.85.234 192.168.1.0.

Linux

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.

Android

An Android device needs to be rooted to set up static routing rules, after which this can be done with any terminal emulator.

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 HMA for providing the UNrouting utility, and much of the raw information in this article.

Written by: Douglas Crawford

Has worked for almost six years as senior staff writer and resident tech and VPN industry expert at ProPrivacy.com. Widely quoted on issues relating cybersecurity and digital privacy in the UK national press (The Independent & Daily Mail Online) and international technology publications such as Ars Technica.

7 Comments

sanjay kumar
on March 3, 2015
thnx for the info.. but it does not work in every website such as alldebrid.com i want to bypass this web while connected to vpn. but it detects every time. give me the solution sir.....
https://cdn.proprivacy.com/storage/images/2024/01/douglas-crawfordpng-avatar_image-small_webp.webp
Douglas Crawford replied to sanjay kumar
on March 4, 2015
Hi Sanjay, As I note in the article, this method works well on simple websites, but can be confounded by complex ones. The only other solution that I am aware of is to run most internet connections from inside Virtual Machine (VM) with VPN installed, which allows you to access websites without the VPN using your regular OS. This has the advantage that the VM is isolated from the rest of your computer when (usually) browsing the internet, which will help protect your computer from viruses etc. Another possibility is to use an encrypted SOCKS5 proxy instead of VPN. Similar to VPN, this encrypts your internet connection between your browser and the proxy server, which also serves to shield your real IP address from the internet. SOCKS proxies are configured on a per-program basis, so you could configure one browser (e.g. Firefox) for secure connections, while using a second browser (e.g. Chromium) for ‘straight’ connections. More information on the difference between VPN and proxies can be found here.
Sofia
on February 25, 2015
This does not unroute the survey's section of clixsense!
https://cdn.proprivacy.com/storage/images/2024/01/douglas-crawfordpng-avatar_image-small_webp.webp
Douglas Crawford replied to Sofia
on February 25, 2015
Hi Sofia, As I note in the article, '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.'
Matt
on February 23, 2015
Nice article , when is your next article going to be published?
https://cdn.proprivacy.com/storage/images/2024/01/douglas-crawfordpng-avatar_image-small_webp.webp
Douglas Crawford replied to Matt
on February 23, 2015
Hi Matt, I'm glad you like it! I have started writing a series of how-to guides focused on using a Raspberry Pi as a VPN router or Tor node, the first of which should be published in the next day or so...
Andrew Lee
on November 2, 2014
Thank you this is just want I needed!

Write Your Own Comment

Your comment has been sent to the queue. It will appear shortly.

Your comment has been sent to the queue. It will appear shortly.

Your comment has been sent to the queue. It will appear shortly.

  Your comment has been sent to the queue. It will appear shortly.

We recommend you check out one of these alternatives:

The fastest VPN we test, unblocks everything, with amazing service all round

A large brand offering great value at a cheap price

One of the largest VPNs, voted best VPN by Reddit

One of the cheapest VPNs out there, but an incredibly good service