Skip to content

Instantly share code, notes, and snippets.

@Swipe650
Last active April 26, 2020 20:12
Show Gist options
  • Save Swipe650/ffc3b4af8118d62dbcf8d44284589ebe to your computer and use it in GitHub Desktop.
Save Swipe650/ffc3b4af8118d62dbcf8d44284589ebe to your computer and use it in GitHub Desktop.
Enable VPN kill switch
#!/bin/bash
sudo ufw reset
sudo ufw default deny incoming
sudo ufw default deny outgoing
sudo ufw allow 1714:1764/udp
sudo ufw allow 1714:1764/tcp
sudo ufw allow 22/tcp
sudo ufw allow 5556/tcp
sudo ufw allow 5558/tcp
sudo ufw allow out on tun0 from any to any
sudo ufw allow in on tun0 from any to any
sudo ufw enable
if [ -e /home/swipe/.conky/fwoff.png ]
then
mv /home/swipe/.conky/fwoff.png /home/swipe/.conky/fwon.png
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment