Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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

 
discard

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