HostOnNet Blog


Looking for Linux Server Admin or WordPress Expert? We can help.

fail2ban-client can be used to interact with fail2ban jails.

To see help, run

fail2ban-client --help

To see status of jails, run

# fail2ban-client status
|- Number of jail:  1
`- Jail list:       http-dos

To see status of a jail, run

# fail2ban-client status http-dos
Status for the jail: http-dos
|- filter
|  |- File list:    /var/log/apache2/access_log.log 
|  |- Currently failed: 24
|  `- Total failed: 2606
`- action
   |- Currently banned: 5
   |  `- IP list: 
   `- Total banned: 5

To view value of a setting, run

# fail2ban-client get http-dos maxretry

To change a value in run time, use

# fail2ban-client set http-dos maxretry 100

Posted in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.