How To Bypass VPN For Certain Websites and IPs on Windows

Last updated on

September 30, 2021

by
Denis Graur

Follow this step-by-step guide to learn how to bypass VPN for specific websites and IP addresses on Windows.

For this we will use Static Routing. Static routing uses a manually configured parameter rather than the default information from the dynamic routing protocol.

Let's configure static routing:

To allow some IP addresses (like the IP addresses of some sites) to access your real IP address (bypassing VPN), you need to create some special rules using the route.exe tool from Windows.

It is located in C:\Windows\System32, but you can run it from anywhere.

  1. Open a command prompt:

    Hold WIN + R then Type:

    cmd 

    and click OK.

    How To Bypass VPN For Certain Websites: Step 1

    Note! In some cases, you may need to run cmd as administrator. To do this, simply follow these steps:

    Go to Start -> All Programs -> Accessories.

    Right-click Command prompt, and click Run as administrator.

    If the User Account Control dialog box appears, verify that the displayed action matches your desire, and then click Continue.

    How To Bypass VPN For Certain Websites: Step 2
  2. Now we need to find the IP address of the website that we want to bypass the VPN. To do this, just write in the command window:

    ping website_name

    As a result, you will get the site’s IP address. Let’s call it yyy.yyy.yyy.yyy

    How To Bypass VPN For Certain Websites: Step 3
  3. Now you need to find the IP address of your gateway. This is the IP address of your router that you use to access the Internet. This is usually something like 192.168.x.x.

    You can find it by typing at the command line:

    ipconfig 

    You will get the result of your network information, your Default Gateway IP will be there.

    How To Bypass VPN For Certain Websites: Step 4
  4. Now let's create a routing rule. Just write:

    route add -p yyy.yyy.yyy.yyy 192.168.x.x 

    where yyy.yyy.yyy.yyy is the IP address of the website and 192.168.x.x is your gateway. This will create a temporary rule.

    If you want to create a permanent rule, the command would look like this:

    route –p add yyy.yyy.yyy.yyy 192.168.88.x
    How To Bypass VPN For Certain Websites: Step 5
  5. You can check if a route has been added by typing:

    route print -4 

    and find the line with the IP address of the website.

    How To Bypass VPN For Certain Websites: Step 6
  6. To remove a static route, enter:

    route delete yyy.yyy.yyy.yyy 192.168.x.x
    How To Bypass VPN For Certain Websites: Step 7