Difference between revisions of "Fail2ban"

From Freephile Wiki
Jump to navigation Jump to search
(add status help)
Line 56: Line 56:
 
  sudo fail2ban-client status
 
  sudo fail2ban-client status
 
  sudo fail2ban-client status apache-post
 
  sudo fail2ban-client status apache-post
 +
 +
== Status ==
 +
If you have many jails, and want to see the status of each of them, there is no built-in <code>--all</code> option for '''<code>fail2ban-client status</code>''' but you can just use a simple short script:
 +
<source lang="bash">
 +
fail2ban-client status | sed -n 's/,//g;s/.*Jail list://p' | xargs -n1 fail2ban-client status
 +
</source>
  
 
[[Category:Security]]
 
[[Category:Security]]

Revision as of 11:01, 20 June 2018