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

AI 生成的摘要

cpradio initiated a discussion requesting a feature to automatically purge blocked IP addresses that have not matched any activity for a set period, citing an urgent need to clear 1,700 stale blocks that were inadvertently blocking legitimate users. They proposed a default setting of six months, though they personally preferred two to three months. Mittineague supported the six-month compromise, noting that most problematic sub-net blocks fall out of use within that timeframe. cpradio clarified that while they didn’t know if registration attempts updated the match timestamp, the existing data showed many IPs had zero matches dating back to the previous year. codinghorror revealed that this feature already exists, likely implemented by @zogstrip, and cpradio realized they had missed it while searching for “delete.” After Mittineague admitted to manually entering some old IPs for suspended accounts (which cpradio noted included entries from April 2015), codinghorror provided a screenshot of the relevant settings. cpradio confirmed they had configured the setting to a shorter timeframe to test its effectiveness and requested the topic be closed, promising to open a bug report if the feature failed to operate as expected.

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.

9 个赞

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.

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.

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

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)

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.

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

Might they be Roll-ups?

Some yes, but not all of them.

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

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

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.

3 个赞