Answer the question
In order to leave comments, you need to log in
How to open a website only through openvpn?
how to make the site that I want to visit on my computer function only through openvpn. if openvpn stops working and the site should also be down. windows os
Answer the question
In order to leave comments, you need to log in
Add two routes
1. route siteip openvpngwip metric 1
For example: route add 1.1.1.1 10.0.0.1 metric 1
2. route siteip nonreailip metric 255
For example: route add 1.1.1.1 8.8.8.8 metric 255
If VPN is connected, then traffic will go through 10.0 .0.1, if not connected, then
through 8.8.8.8 Naturally it will not work through 8.8.8.8, because 8.8.8.8 does not route
You only need to publish the site on the subnet from which the IP addresses of the VPN clients are assigned. I see two ways:
It is necessary to remove the site from the Internet and leave it for VPN.
This can be controlled by firewall rules. Plus, it is necessary that the external DNS does not know about your site, and the internal DNS (which is distributed when connecting the VPN) would return the internal address of the site.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question