All articles
Security Setup
2026-03-295 min read

What Is a VPN Kill Switch? How It Works

Understand what a VPN kill switch does, what it does not do, how client-level and firewall-level blocking differ, and why the reconnect window matters.

What it does

A kill switch blocks network traffic when the VPN disconnects so your device does not quietly fall back to the regular internet path.

Without it, applications keep sending traffic during brief reconnect windows and expose your real network identity. Nothing warns you while this is happening, because from the operating system point of view nothing has gone wrong.

The name suggests a switch you throw once. In practice it is a standing rule that only becomes visible on the day something fails. A correctly configured kill switch is uneventful for months and then does its entire job in the seconds after a dropped tunnel.

How the block is actually enforced

Nothing about a kill switch is exotic. It is a default-deny rule on outbound traffic with a short list of exceptions.

The exceptions are the tunnel interface, the loopback interface, and the address and port of the VPN server so the tunnel can be rebuilt. Everything else is dropped. That is the whole mechanism, and it is the same mechanism whether a vendor calls it a kill switch, network lock, or block untunneled traffic.

The interesting question is not what the rule says. It is where the rule lives, because that decides what happens when the component holding it stops running.

Client-level and firewall-level kill switches

A client-level kill switch is a setting inside the VPN application, such as Block untunneled traffic in the WireGuard client for Windows. The application installs the block, watches the tunnel, and removes the block when you disconnect deliberately.

A firewall-level kill switch is a rule you write into the operating system firewall yourself. It knows nothing about the VPN application and does not care whether that application is still running.

The difference matters in one scenario, and it is the scenario that produces leaks. If the VPN process crashes, is killed by a low-memory handler, or fails to start after a reboot, the client-level block goes with it. The firewall rule stays.

  • Client-level blocking is reversible in one click and disappears with the client
  • Firewall-level blocking survives a client crash, a driver reset, and a reboot
  • Client-level blocking already understands your tunnel and needs no manual exceptions
  • Firewall-level blocking needs a local network exception written by hand or your printer stops working

The reconnect window is where leaks happen

A VPN that is down for an hour is not the threat. You notice that, and so does every application on the device.

The dangerous state is the gap between a dropped tunnel and a re-established one, because nothing in the interface changes and traffic keeps flowing. Waking a laptop from sleep produces that state. So does moving from Wi-Fi to a wired connection, and so does a phone handing off between networks.

A kill switch is a control for that window specifically. Testing it during a long deliberate disconnect proves that a rule exists and proves very little about the moment it was bought for.

What a kill switch does to DNS

DNS is where most of the confusion sits. A firewall-level kill switch blocks name lookups along with everything else, because a lookup is just traffic and the rule does not read protocols.

So it does prevent a DNS leak during an outage. It does nothing about a DNS leak while the tunnel is up and healthy, which is the far more common case. If your resolver is wrong, it is wrong on a working connection, and no amount of blocking during failure corrects it.

Configure DNS inside the tunnel first. Then add the kill switch to cover the window where that configuration cannot apply.

What a DNS leak is and how to test for oneDNS leak protection setup

What it does not do

A kill switch does not make a weak provider trustworthy, and it does not fix bad DNS settings by itself.

It is a failure control rather than a privacy control. It changes what happens when your setup breaks, and it changes nothing about what your setup reveals while it is working correctly. You still need a sound configuration, trustworthy DNS handling, and a provider whose operational practices you have some reason to accept.

  • It does not hide the fact that you are using a VPN
  • It does not protect traffic once that traffic is inside the tunnel
  • It does not stop a browser resolving names through its own encrypted DNS
  • It does not tell you whether it is currently enforcing anything at all

What a real test proves

Most testing advice stops at disconnecting the VPN and seeing whether the internet stops. That confirms one thing and leaves two unmeasured.

An IP leak and a DNS leak are separate failures with separate fixes, and a test that returns one result cannot tell them apart. A useful test drops the tunnel at the interface rather than in the client, requests something by raw address, requests something by name, and reads those as two answers.

Then it repeats the whole thing during a reconnect instead of a deliberate shutdown. A setting that reports itself as enabled is not the same as a rule that is enforcing, and only the second one is worth anything.

Where to find the setup steps

The procedure differs enough between operating systems that it lives on its own page rather than here.

That guide covers WireGuard and OpenVPN on Windows, UFW and nftables on Linux, Packet Filter on macOS, and IPv6. It also carries the verification method described above, and the teardown commands for when the rules outlive the client.

Kill switch setup for Windows, macOS and Linux

Quick answers

What is a VPN kill switch?
It is a standing rule that blocks traffic which is not going through the VPN tunnel. It permits the tunnel interface, loopback, and the VPN server endpoint, and drops everything else. Its only job is to decide what your device does when the tunnel stops working.
Do VPN kill switches actually work?
They work when they are enforced at the right layer and tested at the right moment. A client-held switch cannot act once its own process is gone, and a firewall rule can. Most reported failures are either a client setting that was never actually enforcing, or a test run during a deliberate disconnect rather than a reconnect.
How does a VPN kill switch work?
It sets outbound traffic to deny by default, then allows the tunnel interface, loopback, and the VPN server address and port. Everything else is dropped by the same rule that would drop it if the tunnel were healthy. There is no detection step and no timer involved.
Does a kill switch stop DNS leaks?
Not by itself. A firewall-level kill switch blocks lookups during an outage because it blocks everything. It has no effect on a leak that happens while the tunnel is up, which is the common case. Setting DNS inside the tunnel is what fixes that.
Is a kill switch the same as an always-on VPN?
No. Always-on reconnects the tunnel, and a kill switch blocks traffic while there is no tunnel. Always-on without blocking still leaves the reconnect window open. The two are complementary, and they get confused because some clients present them as a single setting.
How do I turn a VPN kill switch off?
In a client, clear the setting that blocks untunneled traffic and reconnect once. If you built it in the firewall, the client cannot remove it and you have to undo the policy yourself. That means restoring the outbound default and deleting the rules you added by name.
Put it into practice

A 24-hour PulseVPN trial takes about a minute to set up and asks for no card, no email, and no name.

Start free trial

Related reading