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.
Open a command prompt:
Hold WIN + R then Type:
and click OK.
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.
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:
As a result, you will get the site’s IP address. Let’s call it yyy.yyy.yyy.yyy
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:
You will get the result of your network information, your Default Gateway IP will be there.
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
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.
To remove a static route, enter:
route delete yyy.yyy.yyy.yyy 192.168.x.x