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

clear all blocklist with fail2ban #208

Closed
doramir opened this issue Nov 18, 2016 · 10 comments
Closed

clear all blocklist with fail2ban #208

doramir opened this issue Nov 18, 2016 · 10 comments

Comments

@doramir
Copy link

doramir commented Nov 18, 2016

Is there a way to release all everyone in the blocklist?
this command Rack::Attack.clear! is not releasing the blocklist.
I want to release everyone from blocklist

@alexvco
Copy link

alexvco commented Mar 23, 2017

Were you able to figure this one out?

@aishbuilds
Copy link

aishbuilds commented Aug 18, 2017

Rack::Attack.clear! does not release the users in the blocklist.
Rather, it clears the the configuration for throttle, blacklist, safelist and track.

Although I am not very sure how to release everyone from the blocklist, it's maybe clearing from the cache?

@amirdor
Copy link

amirdor commented Aug 18, 2017

I created a hack to solve it.
I used dynamic prefix for the key and when I wanted to clear I just change the prefix key

@aishbuilds
Copy link

Similar issue also discussed here: #113

email = "[email protected]"
epoch_time = Time.now.to_i
Rack::Attack.cache.store.delete "#{Rack::Attack.cache.prefix}:#{epoch_time / 30.minutes}:logins/email:#{email}"

@amirdor
Copy link

amirdor commented Sep 20, 2017

We don't want specific, I want to clear all the blacklist

@grzuy grzuy modified the milestones: Next, 5.2.0 Mar 22, 2018
@grzuy grzuy removed this from the Next milestone Jul 2, 2018
@grzuy
Copy link
Collaborator

grzuy commented Oct 9, 2019

Rack::Attack.clear! method name was misleading and changed to Rack::Attack.clear_configuration in #344.

@grzuy
Copy link
Collaborator

grzuy commented Oct 9, 2019

FWIW we're considering adding a Rack::Attack.reset! method to reset Rack::Attack's state in other issues (#389 (comment), #249 (comment)).

@jtoy
Copy link

jtoy commented Mar 27, 2020

adding it?

@grzuy
Copy link
Collaborator

grzuy commented Apr 26, 2020

Rack::Attack.reset! was released in v6.3.0. Be aware it resets all Rack::Attack state, no only fail2ban.

@grzuy grzuy closed this as completed Apr 26, 2020
@sekmo
Copy link

sekmo commented Oct 1, 2020

When you say Rack::Attack state, are you talking about the cache and/or the rules?
In case, Is there a way to reset the rules? I'm doing some debugging on a staging console and I'm still searching for a way of redefining rules :)

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

No branches or pull requests

7 participants