A VPN kill switch blocks your internet traffic if the VPN connection drops, so your real address is never exposed when the tunnel fails. Almost every VPN app advertises one. Very few people ever check that it works. This test takes about five minutes and uses nothing but a terminal and a free IP lookup.
What you are testing
You want to see what happens in the seconds after the VPN disconnects unexpectedly. A working kill switch means no traffic leaves your device and your real address never appears. A failing one lets traffic flow normally and your real address shows up.
Step 1: Know your real address
With the VPN off, open the home page or run the command below, and write down your real public address.
curl https://scanmyprivacy.com/api/ip
Step 2: Turn the kill switch on
Open your VPN app's settings and enable the kill switch, sometimes called "network lock" or "always-on VPN". Some apps have two modes (soft and strict), so pick the strict one for the test. Then connect to a server.
Step 3: Start a repeating check
Run a command that asks for your public address every second.
macOS or Linux:
while true; do date +%T; curl -s -m 2 https://scanmyprivacy.com/api/ip; echo; sleep 1; done
Windows PowerShell:
while ($true) { Get-Date -Format T; try { (Invoke-WebRequest -UseBasicParsing -TimeoutSec 2 https://scanmyprivacy.com/api/ip).Content } catch { "no connection" }; Start-Sleep 1 }
You should see the VPN server's address on every line.
Step 4: Break the connection
Do not click Disconnect in the VPN app, because that is an intentional disconnect and the kill switch is designed to let it through. Instead, simulate a failure: kill the VPN process in Task Manager or Activity Monitor, or block the VPN server with a firewall rule, or switch Wi-Fi off and on.
Step 5: Read the result
- "no connection" or timeouts, then the VPN address again after reconnect: the kill switch works.
- Your real address appears even once: it failed. Anything that leaks for a second is enough to be logged.
Stop the loop with Ctrl+C when you finish, and reconnect the VPN.
If the kill switch fails
- Check you enabled the strict or always-on mode, and that you have the latest app.
- Try another protocol, such as WireGuard or OpenVPN, as support differs.
- Use the VPN leak checklist to look for other leaks, including DNS.
- If it keeps failing, use a firewall rule that blocks all traffic except to the VPN server, or switch provider. Be cautious with free apps; see free VPN risks.