MyBB Community Forums

Full Version: Wildcards (asterisks) don't work in IP Search?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This seems to be a pretty simple problem, so I hope it has a simple solution. Basically, the IP search doesn't seem to work if you use any asterisks. It returns results only if you type in a full address (e.g. "123.45.67.8" works, but not "123.* "). This may be a problem because I've just banned a large number of IP ranges in hopes of cutting down on Russian spambot accounts, and I want to search through those ranges to make sure I haven't accidentally banned any legitimate members in doing so.

Here's an example. When I search for a full IP address (I blacked out some of the numbers and part of the member's username for privacy), I get a result like this:

[Image: ipsearch1.png]

That's good, but let's say I just want to search for any members whose IP's match just the first two numbers, 66.190.* -- in this case, it doesn't find any results, even though, because the asterisk should function as a wildcard, it should return at least the one member it found before. Instead, it returns no results:

[Image: ipsearch2.png]

As far as I'm aware, this has been a problem ever since we began using the board, so I don't think it's a bad plugin causing it. I'm also not sure if this problem is specific to our board or if it's a MyBB glitch in general. I've searched and the only relevant result I found was this thread, which is identical to the problem we're having, but that applies to an old version of MyBB.

I should point out that this problem occurs regardless of the number of asterisks used. For example, 66.90.*.*, 66.90.*, and 66.90 all return the same "Sorry, there were no results found with the criteria you selected." message.

Any help is appreciated. Cool


Board URL, if needed: http://board404.c6h12o6.co.uk/index.php


Can't help much with your issue, but just in case you have been fiddling with banned ip's, I'm getting a banned message and i'm from the UK.

Quote:I'm sorry, but you are banned. You may not post, read threads, or access the forum. Please contact your forum administrator should you have any questions.
They have never worked properly.

Oh and easiest way to block countries is to use Cloudflare free service and use htaccess to block by country code. It's very easy. You can then block Russia, China, Brazil, Latvia, Korea, Taiwan, Hong Kong, and more.
(2011-11-13, 10:43 PM)david42 Wrote: [ -> ]Can't help much with your issue, but just in case you have been fiddling with banned ip's, I'm getting a banned message and i'm from the UK.

Quote:I'm sorry, but you are banned. You may not post, read threads, or access the forum. Please contact your forum administrator should you have any questions.

Sorry about that. :-X We've had a lot of casualties today, including one staff member. I'm thinking my "ban all these IP ranges" approach might not be the best way to solve this problem, haha.

(2011-11-14, 12:40 AM)labrocca Wrote: [ -> ]They have never worked properly.

Oh and easiest way to block countries is to use Cloudflare free service and use htaccess to block by country code. It's very easy. You can then block Russia, China, Brazil, Latvia, Korea, Taiwan, Hong Kong, and more.

I'll check out the service. Thanks Big Grin
(2011-11-14, 12:40 AM)labrocca Wrote: [ -> ]They have never worked properly.

Oh and easiest way to block countries is to use Cloudflare free service and use htaccess to block by country code. It's very easy. You can then block Russia, China, Brazil, Latvia, Korea, Taiwan, Hong Kong, and more.


Just a quick note that blocking in CloudFlare by country is possible, but it means visitors are only challenged (captcha page). The logic here is that you may want some visitors to access your site.

But we would also honor the rules you have set in .htacess, if you set the blocks there.
http://www.cloudflare.com/wiki/How_to_Bl...Site_Basis

Quote:SetEnvIf CF-IPCountry YY UnwantedCountry=1

Order allow,deny

Allow from all

Deny from env=UnwantedCountry

With CF giving you a SERVER country variable you can BLOCK with htaccess very effectively.
(2011-11-15, 07:03 AM)labrocca Wrote: [ -> ]http://www.cloudflare.com/wiki/How_to_Bl...Site_Basis

Quote:SetEnvIf CF-IPCountry YY UnwantedCountry=1

Order allow,deny

Allow from all

Deny from env=UnwantedCountry

With CF giving you a SERVER country variable you can BLOCK with htaccess very effectively.

I'm addressing how blocking by country in CloudFlare's Threat Control panel works, not how it works at the server level. Blocking by country in CloudFlare's threat control = a challenge for those visitors.

You should not use "69.60.*" to find all addresses starting with this, but instead use "69.60.*.*".

It have always worked for me, using an asterisk for each missing values.

So if it is not working for you, it must be related with your own installation and/or plugins...