HostOnNet Blog

fail2ban-client

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
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:   220.148.129.169 92.80.140.151 202.43.121.132 1.179.244.169 203.106.159.29 
   `- Total banned: 5
#

To view value of a setting, run

# fail2ban-client get http-dos maxretry
130
#

To change a value in run time, use

# fail2ban-client set http-dos maxretry 100
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.