Linux/fail2ban: Difference between revisions
< Linux
mNo edit summary |
m (→Status) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<pre> | <pre> | ||
apt install fail2ban | apt install fail2ban | ||
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local | |||
systemctl enable fail2ban.service | systemctl enable fail2ban.service | ||
systemctl restart fail2ban.service | systemctl restart fail2ban.service | ||
systemctl status fail2ban.service | systemctl status fail2ban.service | ||
</pre> | </pre> | ||
Line 14: | Line 15: | ||
</pre> | </pre> | ||
== Status == | |||
<pre> | |||
fail2ban-client status | |||
fail2ban-client status sshd | |||
</pre> | |||
== Unban == | |||
<pre> | |||
fail2ban-client set sshd unbanip x.x.x.x | |||
</pre> | |||
[[Category:Linux/Network]] | [[Category:Linux/Network]] | ||
[[Category:Linux]] | [[Category:Linux]] |
Latest revision as of 11:42, 23 March 2024
Installation
apt install fail2ban cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local systemctl enable fail2ban.service systemctl restart fail2ban.service systemctl status fail2ban.service
Config
Status
fail2ban-client status fail2ban-client status sshd
Unban
fail2ban-client set sshd unbanip x.x.x.x