VPN Internet Kill Switch

Where can I find the script that kills internet traffic if the VPN drops? I’d like to have a look and see what it’s doing - just to learn and understand better.
For you info, when I was running DD-Wrt on my old router I used:
iptables -I FORWARD ! -o tun+ -j DROP, which worked a treat.
I did manage to find the “Force DNS” script (Luci>Firewall>Custom Rules).



When vpn is enabled, forwarded to WAN rule is removed directly.

Is that belts and braces solution, as I found this on another VPN provider (NordVPN) site:


I think all achieve the same result. We changed in uci and it is same to do using iptables.

In the newer firmware (v3…) there doesn’t seem to be a setvpnfirewall script - is this located elsewhere now?

I dont know, if this is what you are looking for:

The setting are done directly inside the Start scripts