Install firewalld
sudo apt update
sudo apt install firewalld
Install Python requests module
pip3 install requests
Download vpn_block.py
https://pastebin.com/83DWqSJphttps://pastebin.com/raw/83DWqSJp <- download raw, i despise space indentation
Run script (at your own risk)
sudo python3 /path/to/vpn_block.py
disclaimer: haven't tested it yet lol. copilot, chatgpt and pylint (with style/pep warnings disabled) all say "looks good to me". made sure to ask them thoroughly about whether there could be any conflicts/issues with iptables and ufw, that this won't possibly leave junk behind, etc. they said nope.
Post too long. Click here to view the full text.