Question | Unban after restart #3085
-
Why is the list of bans cleared when restarting and reloading in fail2ban-client? How can I disable this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
A restart is like a stop + start, when fail2ban stops it resets everything to leave behind a clean and tidy state (as would be that fail2ban has been not started). For other needs there is
One cannot disable this.
Just note that the banned entries in chains would be no more under control of fail2ban after restart, so they will never be unbanned anymore (so one would need to unban them manually using But I don't understand why it is necessary at all or else by which scenarios it is expected? |
Beta Was this translation helpful? Give feedback.
A restart is like a stop + start, when fail2ban stops it resets everything to leave behind a clean and tidy state (as would be that fail2ban has been not started).
Especially it is important If during restart something action-related is changed (like ports, protocols, or even whole action), so fail2ban will flush (unban) old state and reban with new state (e. g. using other banning actions/parameters).
Also there can be some time between stop and restart, so some banned tickets may be outdated (and will not be banned).
For other needs there is
?sudo? fail2ban-client reload
one can use instead of restart -r…