Skip to content

Instantly share code, notes, and snippets.

@nareshkr22
Created December 28, 2020 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nareshkr22/d21117cf37a6f5b42dccb5dcb8d5fb55 to your computer and use it in GitHub Desktop.
Save nareshkr22/d21117cf37a6f5b42dccb5dcb8d5fb55 to your computer and use it in GitHub Desktop.
UFW enable kill switch
#!/bin/bash
sudo ufw disable
sudo ufw reset
sudo ufw allow in to 192.168.43.245/24
sudo ufw allow out to 192.168.43.245/24
sudo ufw default deny outgoing
sudo ufw default deny incoming
sudo ufw allow out on tun0 from any to any
sudo ufw allow in on tun0 from any to any
sudo ufw enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment