Skip to content
Snippets Groups Projects
Verified Commit b9be0883 authored by David Beniamine's avatar David Beniamine
Browse files

Set ignoreip for tetrix and servermon

parent 838845f2
No related branches found
No related tags found
No related merge requests found
......@@ -158,9 +158,6 @@ enabled = true
[recidive]
enabled = true
EOF
# Ignore servermonitor IP
sed -i "s/^#\(ignoreip.*\)/\1 $(dig +short servermon.tetras-libre.fr | tail -n 1)/" /etc/fail2ban/jail.conf
fail2ban-client reload
if [ ! -e "/var/log/auth.log" ]; then
# No auth.log fail2ban must be using systemd
......
......@@ -34,3 +34,10 @@ highlight ColorColumn ctermbg=darkgrey
syntax on
filetype plugin indent on
EOF
cat <<EOF > /etc/fail2ban/jail.local
[DEFAULT]
ignoreip = $(dig +short servermon.tetras-libre.fr | tail -n 1) $(dig +short tetrix.tetras-libre.fr | tail -n 1)
EOF
fail2ban-client reload
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment