How to allow the browser to only connect via VPN? (Windows Firewall)

How can I allow an application to only connect via VPN IP addresses and block all regular connections?

I want the app to not be able to get a connection if you start it without the VPN client.

Basically a kill-switch for only one program. (regular kill-switch is useless for my problem)

The process listed below works, but quickly becomes a pain in the ass.

If you’re using only Windows Firewall, the easiest method is to download and install a free firewall manager, like Binisoft/Malwarebytes offers. The software is fairly straight forward. After installation, it defaults to deny access for all applications, until you permit access.

It won’t permit your browser access until you permit it (the first time). Once permitted, you can edit the local and remote addresses for the browser, changing those addresses to whatever the VPN connection address is set to; the browser won’t be able to access the Internet until the VPN is connected.

But here’s the problem: if you switch your VPN server, you have to switch the local and remote address in the manager each time. Hence, it becomes onerous, unless you consistently use only one VPN server/location.

Some VPN software permits you to deny or permit access on an application by application basis.

For others who are interested, I managed to do it this way:

I just blocked the program via windows firewall. This Guide shows how block a program.

You need to have a VPN network adapter in windows network settings. You set the VPN adapter to public and your regular LAN/wifi adapter to private(home).

When you block the specific program with the firewall as seen in the guide, check the box that it only applies to private networks.

That way the firewall blocks the connection except if you use ur VPN (public VPN adapter)

Thank you! I will look into that.

I only use one server so it would work well for me.