1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-24 19:07:23 +01:00

Add rate limiting of SSH in the firewall (#1770)

See #1767.
This commit is contained in:
Marcus Bointon
2020-06-07 15:47:51 +02:00
committed by GitHub
parent bc1be9d70a
commit cfc8fb484c
3 changed files with 16 additions and 5 deletions

View File

@@ -136,7 +136,14 @@ function get_default_privateip {
function ufw_allow {
if [ -z "${DISABLE_FIREWALL:-}" ]; then
# ufw has completely unhelpful output
ufw allow $1 > /dev/null;
ufw allow "$1" > /dev/null;
fi
}
function ufw_limit {
if [ -z "${DISABLE_FIREWALL:-}" ]; then
# ufw has completely unhelpful output
ufw limit "$1" > /dev/null;
fi
}