Created
March 6, 2017 05:04
-
-
Save nicekiwi/ba8562c5a3c0933e57439c33252de279 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
apt-get -y update | |
# install the firewall | |
echo 'Installing UFW' | |
apt-get install -y ufw | |
echo 'Configuring UFW' | |
# disable IPv6 | |
# sed -i "s/IPV6=yes/IPV6=no/" /etc/default/ufw | |
# deny all incoming and outgoing connections | |
ufw default deny incoming | |
ufw default allow outgoing | |
# allow HTTP and HTTPS, and ssh | |
ufw allow 80/tcp | |
ufw allow 443/tcp | |
ufw allow 2280/tcp | |
# allow SMTP, Submission and IMAPS | |
ufw allow smtp | |
ufw allow submission | |
ufw allow imaps | |
# enable ufw | |
ufw enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment