mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-18 09:45:41 +02:00
Fail2Ban block behaviour (#1914)
* new default: block IP on all ports * introduce FAIL2BAN_BLOCKTYPE * fix test * tests added * test added * test blocktype drop * merged two tests
This commit is contained in:
parent
c6dd79dbca
commit
f7836c8b1a
8 changed files with 50 additions and 3 deletions
|
@ -1619,3 +1619,12 @@ function _setup_environment
|
|||
echo "VIRUSMAILS_DELETE_DELAY=${VIRUSMAILS_DELETE_DELAY}" >>/etc/environment
|
||||
fi
|
||||
}
|
||||
|
||||
function _setup_fail2ban
|
||||
{
|
||||
_notify 'task' 'Setting up fail2ban'
|
||||
if [[ ${FAIL2BAN_BLOCKTYPE} != "reject" ]]
|
||||
then
|
||||
echo -e "[Init]\nblocktype = DROP" > /etc/fail2ban/action.d/iptables-common.local
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue