Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is possible to save and use _already banned IP's in fail2ban after restart (fail2ban or the whole server)?

share|improve this question

I scoured the net for hours trying to find a solid solution for this. This article was a godsend for me! Fail2Ban: Permanent SSH Bans

share|improve this answer

Not that I'm aware of. My recomendation is to either ban for a somewhat short amount of time, or perma-ban. I configure my servers to dump a list of the perma-banned IPs to a configuration file ever 6 hours and at shutdown; then auto load that file at startup.

I have my rules setup so the perma-ban jails are very touchy, for instance 2 different invalid usernames when logging into the webmail portal will trigger it. The jails for common things like correct username/wrong password get triggered after 10 and only bans for a short time.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.