1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-21 03:02:09 +00:00

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

View File

@ -191,12 +191,6 @@ if [ -z "$DISABLE_FIREWALL" ]; then
modprobe ip6_tables modprobe ip6_tables
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
# Allow incoming connections to SSH. # Allow incoming connections to SSH.
ufw_allow ssh; ufw_allow ssh;
@ -213,6 +207,12 @@ if [ -z "$DISABLE_FIREWALL" ]; then
fi fi
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; ufw --force enable;
fi #NODOC fi #NODOC