Im sure it can be done somehow... I just havent figured it out yet...
I want to build a batch file that acts as a
VPN kill switch at the kernel level for Windows. I dont feel safe using someone else's coded program or just by using a firewall kill switch...
In Linux it's as easy as opening up a terminal and droppin' a set of iptables rules...
sudo iptables -F
sudo iptables -P INPUT DROP
sudo iptables -P FORWARD DROP
sudo iptables -P OUTPUT DROP
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A INPUT -s 55.55.55.55 -j ACCEPT
sudo iptables -A INPUT -i tun0 -j ACCEPT
sudo iptables -A INPUT -i vpn_vpn -j ACCEPT
sudo iptables -A INPUT -j DROP
sudo iptables -A OUTPUT -o lo -j ACCEPT
sudo iptables -A OUTPUT -d 55.55.55.55 -j ACCEPT
sudo iptables -A OUTPUT -o tun0 -j ACCEPT
sudo iptables -A OUTPUT -o vpn_vpn -j ACCEPT
sudo iptables -A OUTPUT -j DROP
sudo ip6tables -F
Where 55.55.55.55 is the public IP of the
VPN server.
Mine are for both OpenVPN client=tun0 and SoftEther Client=vpn_vpn (those are the network adapters)
But besides my own personal experience... I don't think you can do much of anything with windows you can do with Kali Linux.
If you knew every Linux command to every package for Linux I believe you could rule the world.
Windows has a habit of changing settings without asking.
It happened to my mining rig the other day. Windows Defender took my mining software out of the exclusions list and quarantined it. I was out of town and only had my Galaxy Edge Plus to remote into it with Teamviewer to figure out what the issue was when my miner went offline. Ever try and trouble shoot Windows while only being able to see a 1/4 of the screen at a time... Nightmare...