Purge Blocked IP Addresses that haven't had a match for n months


(cpradio) #1

I haven’t found a setting for this, so I’m assuming it doesn’t exist (pardon me, if my assumption is incorrect).

Sitepoint is in the process of removing 1700 blocks on IPs because a good majority of them haven’t had a recent match and a few of these are blocking users who seem legit (as they email our support team asking why they can’t register/login).

So I’d like to see a setting that would auto-purge blocked entries if they fail to have a match in the last n months.

Mockup:

Default would be 6 months (or longer) – I feel that may be a safe default.


(Mittineague) #2

I’m curious, does a Registration attempt update the last_match ?

From past experience I’d say most problem IPs* fall out of use within 3 months, a large several persist for around 6 months, and only an extremely rare few for a year or more.
* I’m talking sub-net blocks, not individual IPs

6 months sounds like a good compromise IMHO, not like they can’t be added again if they return.


(cpradio) #3

I don’t know the answer to that, I just know it gets updated.

Yes, it is likely longer than necessary, 2-3 months would be ideal from my standpoint, but I figured more people would be happier with 6 months.


(Jeff Atwood) #4

This feature already exists. I believe @zogstrip worked on it?


(cpradio) #5

What is the criteria, as we have 1700 IPs many do not have a match in the past 6 months, some don’t have a match as far as September of last year. Also, several do not have any matches (they have a 0 count)


(Mittineague) #6

So as to prevent any confusion, those would likely be my doing.
When we were working out how to do things I manually entered a few IPs for accounts that were 99999 Suspended

But they would all be fairly old by now - early Autumn-ish - and should be OK to prune out.


(cpradio) #7

I’m not certain on that, several were created in April of 2015 (29 to be exact).


(Mittineague) #8

Might they be Roll-ups?


(cpradio) #9

Some yes, but not all of them.


(Jeff Atwood) #10

If it’s not working, that’s something @zogstrip should check into…


Look at created_at when deleting IPs if last_match_at is NULL
(cpradio) #11

Ah, I tried searching for delete, that’s why I never found it. I’ll look into it.


(cpradio) #12

Okay, we set it to a shorter time frame, will look at the results over the next few days to see if it is operating as expected. Go ahead and close. I’ll open a bug if it isn’t working as expected.


(Jeff Atwood) #13