Compare commits
No commits in common. "47b398a778543be4c7fd91adb7a3a0cc8cbeb206" and "c40ff90434c35e895190db7f1216c1dcd42d86c5" have entirely different histories.
47b398a778
...
c40ff90434
|
@ -101,9 +101,6 @@ chmod 644 fail2ban/*.local
|
||||||
chmod 644 fail2ban/*/*.conf
|
chmod 644 fail2ban/*/*.conf
|
||||||
cp -a fail2ban/* /etc/fail2ban/
|
cp -a fail2ban/* /etc/fail2ban/
|
||||||
echo "destemail = $WEBMASTER" >> /etc/fail2ban/jail.local
|
echo "destemail = $WEBMASTER" >> /etc/fail2ban/jail.local
|
||||||
echo "bantime = 24h" >> /etc/fail2ban/jail.d/defaults-debian.conf
|
|
||||||
echo "maxretry = 3" >> /etc/fail2ban/jail.d/defaults-debian.conf
|
|
||||||
echo "logpath = /var/log/auth.log tail" >> /etc/fail2ban/jail.d/defaults-debian.conf
|
|
||||||
systemctl enable fail2ban
|
systemctl enable fail2ban
|
||||||
systemctl start fail2ban
|
systemctl start fail2ban
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ `firewall-cmd --ipset=blacklist --query-entry $IP` = "yes" ]]; then
|
if [[ firewall-cmd --ipset=blacklist --query-entry $IP >/dev/null ]]; then
|
||||||
|
|
||||||
echo "IP $IP already in blacklist. Doing nothing."
|
echo "IP $IP already in blacklist. Doing nothing."
|
||||||
|
|
|
@ -8,7 +8,7 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ `firewall-cmd --ipset=blacklist --query-entry $IP` = "yes" ]]; then
|
if [[ firewall-cmd --ipset=blacklist --query-entry $IP >/dev/null ]]; then
|
||||||
|
|
||||||
firewall-cmd --ipset=blacklist --remove-entry=$IP
|
firewall-cmd --ipset=blacklist --remove-entry=$IP
|
||||||
firewall-cmd --permanent --ipset=blacklist --remove-entry=$IP
|
firewall-cmd --permanent --ipset=blacklist --remove-entry=$IP
|
Loading…
Reference in New Issue
Block a user