Enable ufw in the config after allowing SSH

This commit is contained in:
Michael Kroes 2016-03-13 09:03:00 +01:00
parent b79732ed1e
commit 4ad318063b
1 changed files with 6 additions and 6 deletions

View File

@ -191,12 +191,6 @@ if [ -z "$DISABLE_FIREWALL" ]; then
modprobe ip6_tables
fi
# Some default configurations disable the firewall in the settings (Scaleway)
# If this isn't set, enabling the firewall will fail with:
#
# ERROR: Could not load logging rules
sed -i "s/ENABLED.*/ENABLED=yes/" /etc/ufw/ufw.conf
# Allow incoming connections to SSH.
ufw_allow ssh;
@ -213,6 +207,12 @@ if [ -z "$DISABLE_FIREWALL" ]; then
fi
fi
# Some default configurations disable the firewall in the settings (Scaleway)
# If this isn't set, enabling the firewall will fail with:
#
# ERROR: Could not load logging rules
sed -i "s/ENABLED.*/ENABLED=yes/" /etc/ufw/ufw.conf
ufw --force enable;
fi #NODOC