VPN Killswitch is a simple bash script that prevents your real IP address and Internet activities from being revealed if you lose connection to your VPN.
VPN Killswitch uses nmcli
to check the status of your VPN connection. In the event that connection is lost, ifconfig down
is used to disconnect your ethernet adapter.
nmcli
libnotify
device=eth0
(If you're not sure what to use, run ifconfig
and use whichever device shows your external IP)
sudo chmod +x vpnkillswitch.sh
sudo vpnkillswitch
VPN Killswitch needs to be run as root
so it can disable your ethernet adapter.
To restore your internet connection run VPN Killswitch with the up
parameter:
sudo vpnkillswitch up