Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ipset fails when fail2ban restarts #3589

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomers
Copy link
Contributor

@tomers tomers commented Oct 2, 2023

Fixes fail2ban fails when restarting, due to the ipset being persistent, and the actionstart command tries to recreate existing set, and fails since this set already exists.

Fix the case when fail2ban restarts, and the set already exist from
previous runs
@sebres
Copy link
Contributor

sebres commented Oct 9, 2023

Fixes fail2ban fails when restarting, due to the ipset being persistent

How so?
Where is it persistent?
It looks either like a misunderstanding or misconfiguration to me.
Because corresponding this:

ipset --destroy f2b-<name>

the set gets removed (actionstop will be invoked by restart too).

As for misconfiguration, for instance it may be mistakenly supplied common <name> for two different jails.
Or some error by stop that avoid the set removal.

@sebres sebres added the moreinfo label Oct 9, 2023
@Neustradamus
Copy link

@tomers: Have you seen @sebres comment?

@tomers
Copy link
Contributor Author

tomers commented Jan 18, 2024

I am pretty sure it happend to me. I have no time at the moment to recheck. However, just create a chain, and then restart the fail2ban service. If it works, then you can close this ticket.
Sorry for not being able to be more helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants