Kill switch: what it is and why you need it

A kill switch is protection for the moment the VPN drops. While it's on, not a single request goes to the internet past the tunnel: better to be offline for a second than to open a site with your real address.

Updated

On this page

How it works

While the VPN is on or reconnecting, the system firewall lets traffic through the tunnel only. If the link drops, sites go silent until the VPN is back up. Turn the VPN off yourself and the internet comes back.

There are two kinds of kill switches. One closes chosen apps when the VPN drops. The other works at the system level: it forbids any traffic except to the VPN server itself, so nothing slips out, not even background updates. The second kind is more reliable, because it doesn't depend on the app noticing the drop in time.

When it triggers

  • You switch from one Wi-Fi to another or from Wi-Fi to mobile data.
  • The computer wakes up after sleep and the tunnel hasn't come back yet.
  • The VPN server restarts or stops answering.
  • The network starts cutting the protocol in the middle of a session.
  • The VPN app closes or crashes while connected.

When you need it

  • On open networks: in a café, an airport, a hotel.
  • When sites must not see your real address even for a second.
  • During long downloads that shouldn't go direct after a drop.

What you see and why

  • No internet for a few seconds after pressing Connect

    WhyThe tunnel is coming up, the kill switch holds traffic

    What to doWait for the status to turn green

  • No internet, the VPN is reconnecting

    WhyThe link dropped, the kill switch doesn't let traffic go direct

    What to doWait, or pick another server

  • The printer, network drive or TV disappeared

    WhyThe kill switch closed the local network too

    What to doAllow the local network

  • The app closed, and there's still no internet

    WhyThe protection didn't get to turn off

    What to doStart the app again: it opens the internet by itself

  • In "only selected through the VPN" mode other apps work

    WhyThat's by design: the kill switch covers what goes through the VPN

    What to doNothing, everything is right

How to check that it works

Run a command that asks for your address once a second, and then break the link: turn off Wi-Fi for a few seconds or switch networks. While the VPN reconnects, the lines should be empty or show the server's address. Your own address should not appear even once. Stop the command with Ctrl+C.

Windows: PowerShell
while ($true) { curl.exe -s -m 3 https://api.ipify.org; Write-Host; Start-Sleep 1 }
macOS and Linux: Terminal
while true; do curl -s -m 3 https://api.ipify.org; echo; sleep 1; done

Android has its own

On Android the system itself can keep traffic from going past the VPN. Settings → Network & internet → VPN → the gear next to the app: turn on "Always-on VPN" and "Block connections without VPN". The names differ a little between phone brands. With it on, the phone doesn't go to the internet while the VPN is down, even right after a reboot.

In Veli

On by default

In Veli the kill switch is on Home and in Settings → Security. “Allow the local network” keeps printers and the router reachable.

If the app closed in the middle of connecting, it opens the internet by itself on the next start, and if it can't, Home shows an “Open the internet” button. In “Through the VPN only…” mode with the kill switch on, the app keeps trying to reconnect until you press Cancel: otherwise the chosen sites would go around the VPN.

FAQ

Do I need a kill switch if my VPN doesn't drop?

Any VPN drops sometimes: a Wi-Fi switch, the computer sleeping, a network glitch. The kill switch is for exactly those seconds.

Why doesn't my printer work with the kill switch?

It closes the local network too. Allow it separately: the printer and router come back.

What happens if I turn the VPN off?

The internet comes back at once: the kill switch only works while the VPN is on or reconnecting.

The app crashed and there's no internet. What do I do?

Start the app again: it removes the protection by itself. If it can't, Home shows an “Open the internet” button.

Does a kill switch slow down the internet?

No. It only decides which traffic may go out, it doesn't touch the traffic in the tunnel.

The kill switch in Veli is one switch away

It is off after install: turn it on on Home or in Settings → Security, and “Allow the local network” keeps the printer and router reachable.