solved Question on setting 'banned' IP addresses

Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
In my Banned items module, I have various Chinese ip addresses of nefarious lurkers I see when I check my "who's online".
Over the period of days, I might see them with slightly changing ips, such as:
123.125.71.110
123.125.71.140
123.125.71.165
In the Help (?) for the Banned module, it says I can set 'partial' IP addresses.
So I added into the banned list: 123.125.
and I also put in one with the asterisk: 123.125.*

Then I punched in a 'test' for ip: 123.125.71.190
and I got the results that it did NOT fall under the banned category.
Is this a glitch?

Thanks



--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 04/05/15 01:21:13AM
michael
@michael
9 years ago
7,715 posts
Just checked, as it looks correct, but the actual format for partial is without the *

So I've added this to the ? for that field
Quote: For Partial format, use the format 123.125 to ban 123.125.71.190 and all numbers like it.

Does that make it easier to understand, or could the wording be clearer still?
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Hi Michael.
After some testing, I've found that not only should one not use an asterisk at the end of a partial IP, but also it won't work correctly if I used a period. That's where it was going wrong for me.
So for example, when dealing with an IP of 123.125.71.110, it would NOT work if I used the partials of either: 123.125. or 123.125* or 123.125.*
but it DOES work correctly by using a partial of simply: 123.125
(with no periods or asterisks at the end at all).
Putting in the decimal point at the end of my partials was messing me up.
So you might want to word it to include: "Do not put a decimal point or asterisk at the end of your partial IP submitted." Just a thought.

Anyway, it's nopw working great, thanks! :)
Thanks!


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Ah, one last quick question-
A couple hours ago I banned 220.181 as the beginning of various Chinese IP addresses I often see lurking in my "Who's Online" list. Now I see another one there with the same first part of their ip address.
So, am I to understand that the Banned IP list onlny stops them fromjoining or logging in? and does not stop them from merely browsing the site online, right? Thus I can expect to still see them in the Who's Online list even after being on the Banned list, right?
Thanks for any clarification.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
michael
@michael
9 years ago
7,715 posts
It works like this:
* Whatever you put in there will be checked against the first part of the string.

So don't do what I just did and put '1' in there because it will ban everyone including you. :)

To recover if you are locked out of jamroom....... :) ....... Go to the servers database interface and remove your self from the banned list.

So it will check for the first part of the string vs the ip address.

If you put:
123. it will block every ipaddress that starts like that. Using a dot is fine either way. The dot is checked for too.

Addresses to be careful of not blocking:
127.0 (anything here) is the local address, its what the server uses to talk to itself, don't block that.
192.168 (anything here) seams to be the normal address when your computer is on a network, don't block that.
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
I'm assuming you mean putting "1" in there all by itself...not to do that. Gotcha. lol

Do you know the answer to this? :
am I to understand that the Banned IP list only stops them from joining or logging in? and does not stop them from merely browsing the site online, right? THUS- I can still expect to see them in the Who's Online list even after being on the Banned list, right?

Thanks!


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
9 years ago
10,148 posts
Strumelia:
I'm assuming you mean putting "1" in there all by itself...not to do that. Gotcha. lol

Do you know the answer to this? :
am I to understand that the Banned IP list only stops them from joining or logging in? and does not stop them from merely browsing the site online, right? THUS- I can still expect to see them in the Who's Online list even after being on the Banned list, right?

Thanks!

That is correct - if you want to completely "ban" then from your site, you have to exclude them by adding:

Deny from 1.1.1.1

at the top of your .htaccess file.

We could actually update the banned item to block ALL requests, but it would be a bit of overhead on EVERY request, which the web server is better at handling.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 03/04/15 11:59:46AM
michael
@michael
9 years ago
7,715 posts
Strumelia:...and does not stop them from merely browsing the site online, right?
All they get to see is one page and it looks like this:
Quote: error: you do not have permission to access this server
jpg
 •  31KB


updated by @michael: 03/04/15 01:47:04PM
brian
@brian
9 years ago
10,148 posts
Michael is correct - forget what I said above :)

Support was already there and I forgot about it ... lol


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Awesome!

Case closed. :)


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
hammondegs
@hammondegs
9 years ago
80 posts
That be Baidu Spider scoping your site.
If you want to specifically ban just them, add this to your .htaccess
Deny from 123.125.71.0/24
Deny from 220.181.0.0/16
That will cover their entire IP range.
Or add 123.125.71 and 220.181 to banned items.
updated by @hammondegs: 03/05/15 05:50:12AM
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Yes, I'm just adding partial IPs to my banned list, like 123.125 and 220.181
that seems to then blanket-cover all IP addresses from those ranges.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
SteveX
SteveX
@ultrajam
9 years ago
2,584 posts
http://webmasters.stackexchange.com/questions/31837/how-to-block-baidu-spiders

http://www.sitepoint.com/baidu-chinese-google/


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)