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

**URL:** <https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604>\
**Category:** Feature\
**Created:** [2015年六月3日 14:08 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604 "2015-06-03T14:08:58Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015年六月3日 14:08 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/1 "2015-06-03T14:08:59Z")

</div>

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:  
 ![](https://global.discourse-cdn.com/meta/original/3X/2/7/2756240a497ef9059dde99eacd60e116f4335043.png)

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

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [2015年六月3日 17:20 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/2 "2015-06-03T17:20:39Z")

</div>

> [@cpradio](#):
>
> haven’t had a recent match

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.

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015年六月3日 18:02 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/3 "2015-06-03T18:02:56Z")

</div>

> [@Mittineague](#):
>
> I’m curious, does a Registration attempt update the last\_match ?

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

> [@Mittineague](#):
>
> 6 months sounds like a good compromise IMHO, not like they can’t be added again if they return.

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.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2015年六月3日 23:41 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/4 "2015-06-03T23:41:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015年六月3日 23:45 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/5 "2015-06-03T23:45:48Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [2015年六月3日 23:53 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/6 "2015-06-03T23:53:46Z")

</div>

> [@cpradio](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015年六月4日 00:18 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/7 "2015-06-04T00:18:15Z")

</div>

> [@Mittineague](#):
>
> 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).

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [2015年六月4日 00:22 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/8 "2015-06-04T00:22:13Z")

</div>

> [@cpradio](#):
>
> I’m not certain on that, several were created in April of 2015 (29 to be exact).

Might they be Roll-ups?

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015年六月4日 00:26 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/9 "2015-06-04T00:26:09Z")

</div>

Some yes, but not all of them.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2015年六月4日 00:32 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/10 "2015-06-04T00:32:24Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/7/4/74f1c5bcd7ea31120cba57dee3b421151834e7e3.png) 

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

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015年六月4日 00:33 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/11 "2015-06-04T00:33:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015年六月4日 00:59 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/12 "2015-06-04T00:59:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2015年六月4日 01:40 UTC](https://meta.discourse.org/t/purge-blocked-ip-addresses-that-havent-had-a-match-for-n-months/29604/13 "2015-06-04T01:40:01Z")

</div>


