User Tools

Site Tools


ubuntu:fail2ban:check_the_fail2ban_status_of_a_specific_service

Ubuntu - Fail2Ban - Check the fail2ban status of a specific service

For example, to check the fail2ban status of the sshd service:

sudo fail2ban-client status sshd

returns:

Status for the jail: sshd
|- Filter
|  |- Currently failed:	0
|  |- Total failed:	0
|  `- Journal matches:	_SYSTEMD_UNIT=sshd.service + _COMM=sshd
`- Actions
   |- Currently banned:	0
   |- Total banned:	0
   `- Banned IP list:	

NOTE: Once actual banning starts, the totals and the Banned IP list will get updated.

The actual ban action is controlled by nftables.

  • Check the nft status with:
    sudo nft list ruleset

ubuntu/fail2ban/check_the_fail2ban_status_of_a_specific_service.txt · Last modified: 2025/05/30 21:03 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki