Blogsphere Mod for download - blocking comments by IP address...
Category Blogging
Like many other bloggers (both Blogsphere and non-Blogsphere alike), I got spammed in my comments area by someone pushing links of, um... "questionable content". It was easy to see the IP address of the comments, but there wasn't much I could do about it. I don't host my own blog, so I couldn't set up my firewall to block out content. What to do, what to do?
Enhance Blogsphere!
Attached is a zipped .NSF file that contains new/changed design elements that will allow you to block comments to your blog based on one or more IP addresses. There's a new form that will accept an address (or you can use asterisks as wild cards) that should be blocked. When a new comment is added via the web, there's a lookup to those addresses. If there's a match, the comment will show as blocked in your blog. The readers won't see who submitted the entry or any of the content, but they will see that address xxx.xxx.xxx.xxx was blocked. On the Notes client, you will be able to review the comment and determine if you want to delete the comment or remove the block.
Check out the About document in the file in order to see what elements are new and which ones have changed (yes, I actually documented my work!)
I've forwarded this to Declan for inclusion in the next version of Blogsphere. I'm pretty happy with the first iteration of this change. If you have any questions or comments, please let me know...
IP Address Blocking
Like many other bloggers (both Blogsphere and non-Blogsphere alike), I got spammed in my comments area by someone pushing links of, um... "questionable content". It was easy to see the IP address of the comments, but there wasn't much I could do about it. I don't host my own blog, so I couldn't set up my firewall to block out content. What to do, what to do?
Enhance Blogsphere!
Attached is a zipped .NSF file that contains new/changed design elements that will allow you to block comments to your blog based on one or more IP addresses. There's a new form that will accept an address (or you can use asterisks as wild cards) that should be blocked. When a new comment is added via the web, there's a lookup to those addresses. If there's a match, the comment will show as blocked in your blog. The readers won't see who submitted the entry or any of the content, but they will see that address xxx.xxx.xxx.xxx was blocked. On the Notes client, you will be able to review the comment and determine if you want to delete the comment or remove the block.
Check out the About document in the file in order to see what elements are new and which ones have changed (yes, I actually documented my work!)
I've forwarded this to Declan for inclusion in the next version of Blogsphere. I'm pretty happy with the first iteration of this change. If you have any questions or comments, please let me know...
IP Address Blocking




Comments
If the first octet (say) doesn't match, you know you won't have a match at all and can exit without having to do the rest of the lookups. That way if your most common case is to accept a post, then you incur less overhead, and you only pay more for actual matches.
(I know that in a low-traffic situation it won't make much difference... but I'm just mulling over the best way to handle IP lookups/matching in other potentially higher-traffic situations...)
Posted by Colin Pretorius At 11:21:35 On 13/09/2003 | - Website - |
When you first suggested it, I was thinking I'd have to have three additional views that showed IP addresses by 1st octet, 1st/2nd octet, and 1st/2nd/3rd octet. I'd then do a search on the 1st octet view to see if I matched the IP of the response to any block records. If no match, you're done. If you do have a match on the first octet, then you'd search on 1st/2nd for a match on either the first two octets of the IP or the first octet followed by an asterisk... Repeat as necessary...
I'm lazy... I like my method better...
Posted by Thomas Duff At 20:40:15 On 13/09/2003 | - Website - |
Colin: Welcome to the blog... You make a good point there. Since I was doing a lookup to actual entries in the blocked address view, I didn't break out the address by octet for lookup purposes. I'll have to rethink that idea and see what I come up with. Thanks for the input.
Posted by Thomas Duff At 13:42:51 On 13/09/2003 | - Website - |
A pre-built document/data structure that gets updated each time a new IP address/range is added might be more efficient, but the complexity is even higher.
Further to Ben's recent optimisation thread, I wonder if the additional effort would really be worth it. I know it's going to bug me silly, though
Posted by Colin Pretorius At 17:47:09 On 13/09/2003 | - Website - |
Posted by Ben Poole At 00:12:21 On 13/09/2003 | - Website - |