# Make VPN Killswitch for Tor in Firewall

**URL:** https://forum.torproject.org/t/make-vpn-killswitch-for-tor-in-firewall/13052
**Category:** Tor Browser Desktop
**Tags:** tor-browser
**Created:** [June 6, 2024, 2:24am UTC](https://forum.torproject.org/t/make-vpn-killswitch-for-tor-in-firewall/13052 "2024-06-06T02:24:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![torquestion](https://forum.torproject.org/letter_avatar_proxy/v4/letter/t/a3d4f5/32.png) [@torquestion](https://forum.torproject.org/u/torquestion)
#### Post date: [June 6, 2024, 2:24am UTC](https://forum.torproject.org/t/make-vpn-killswitch-for-tor-in-firewall/13052/1 "2024-06-06T02:24:08Z")

</div>

Hello,  
i use Tor on my Win 2019 Server.  
I use a VPN and normally i can do a killswitch for any program by firewall, when i do this:

example firefox.exe  
my main network is private  
my vpn network is public

Now i do in the windows firewall and restrict the internet connection for firefox.exe when no public network is connected.

If vpn (public network) disconnect = firefox no connection.

But when i do this for tor.exe and also firefox.exe inside the tor folder, it does not work.

Which .exe or process is responsible for the internet connection in tor browser?  
which process should i have to restrict the connectoin, so tor is getting blocked?

hope you can help me

best regards

---

<div class="post-metadata">

### Author: ![BobbyB](https://forum.torproject.org/user_avatar/forum.torproject.org/bobbyb/32/5456_2.png) [@BobbyB](https://forum.torproject.org/u/BobbyB)
#### Post date: [June 6, 2024, 2:53am UTC](https://forum.torproject.org/t/make-vpn-killswitch-for-tor-in-firewall/13052/2 "2024-06-06T02:53:34Z")

</div>

Tor.exe it the one which connects to the internet. Firefox connects to Tor.exe as a sock5h proxy. I don’t understand why it cannot be blocked by a firewall.

Which firewall? The standard one which is in Windows?

I don’t have a server to try it out.

**Edited 2024/06/06**  
OK, I tried this out on a vanilla Windows Pro and made a new rule applied in all profiles to block tor.exe in the desktop Tor Browser folder. This was using Windows Defender. Now a firewall is a firewall is a firewall and it would work with any.

Firefox starts and it just sits there waiting. I have logs. This is not really a kill switch.

To make a kill switch would require making some sort of script which would turn on/off this rule. I will leave this up to you to implement.

**Edited even later:**

> <https://superuser.com/questions/1099040/how-do-i-enable-or-disable-windows-firewall-rules-using-the-command-prompt>

There it is. Now make that into a script.

---

<div class="post-metadata">

### Author: ![torquestion](https://forum.torproject.org/letter_avatar_proxy/v4/letter/t/a3d4f5/32.png) [@torquestion](https://forum.torproject.org/u/torquestion)
#### Post date: [June 10, 2024, 2:49pm UTC](https://forum.torproject.org/t/make-vpn-killswitch-for-tor-in-firewall/13052/3 "2024-06-10T14:49:05Z")

</div>

Hello, yes i use windows firewall itself.  
I can block any other program without problems,

i will look into your link thx

---

<div class="post-metadata">

### Author: ![BobbyB](https://forum.torproject.org/user_avatar/forum.torproject.org/bobbyb/32/5456_2.png) [@BobbyB](https://forum.torproject.org/u/BobbyB)
#### Post date: [June 10, 2024, 3:29pm UTC](https://forum.torproject.org/t/make-vpn-killswitch-for-tor-in-firewall/13052/4 "2024-06-10T15:29:53Z")

</div>

Do it at the firewall rule place and not at the app rule place.
