Created
February 20, 2017 14:30
-
-
Save Hotfirenet/acd59a8c31de631220afe42cb4025a19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#Automation script By Hotfirenet to install ufw (firewall) | |
#NEED ROOT | |
#Use curl -sSL https://gist.githubusercontent.com/Hotfirenet/acd59a8c31de631220afe42cb4025a19/raw/05698e1a230783a9894b2df330296f91e9240d67/ufw-firewall.sh | bash | |
#installation | |
apt-get update | |
apt-get -y install ufw | |
#block input output | |
ufw default deny incoming | |
ufw default allow outgoing | |
#Allow SSH | |
ufw allow 22/tcp | |
#Allow 80 and 443 | |
ufw allow "WWW Full" | |
#enable firewall | |
ufw enable | |
#need to reload ? | |
#ufw reload | |
#Todo ufw allow from myIP to any port 22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment