Portal Home > Knowledgebase > Articles Database > Blocking IPs from a specific US state?
Blocking IPs from a specific US state?
Posted by AngelX, 07-19-2010, 07:05 PM |
Hey guys,
I was wondering if it was possible to block IPs from a specific US state (for example Iowa) from accessing my website.
I've searched on Google for ip blocking, but the results only seem to relate to blocking an entire country, not a specific state or region.
blockacountry.com is pretty much the exact thing I'm looking for, but again state specific. Something relatively simple and easy to implement.
Thank you for your time
|
Posted by aleb, 07-19-2010, 07:13 PM |
GeoIP
maxmind.com
|
Posted by AngelX, 07-19-2010, 07:19 PM |
Thanks but this seems a rather expensive and high end way of doing it.
I'm pretty much just looking for a list of IP ranges that correspond to a specific state, and then generating a .htaccess file based on those.
For example that site I mentioned in the original post generates a file like this:
order allow,deny
deny from 60.254.128.0/18
deny from 163.60.0.0/16
deny from 192.103.43.0/24
allow from all
The problem is I don't know which of those are from states I want to allow (the list is well bigger than that, I just cropped it)
|
Posted by HostMantis, 07-19-2010, 07:45 PM |
Just out of curiosity, why are you wanting to block an entire state?
|
Posted by aleb, 07-19-2010, 07:49 PM |
The problem is that you do not create yourself a database (address list).
Over $150 exactly.
Take a free version GeoLite City.
|
Posted by AngelX, 07-19-2010, 07:51 PM |
Security issues relating to 1 specific state, the other 49 are fine
|
Posted by HostMantis, 07-19-2010, 07:56 PM |
Ok. That's weird.
|
Posted by AngelX, 07-19-2010, 07:58 PM |
Not really. People block entire countries due to security issues, so why not 1 state?
Everyone thinks that the majority of online fraud and hacking comes from China or Russia, when in fact it's the US
|
Posted by HostMantis, 07-19-2010, 08:00 PM |
I don't really agree with that, but that's a whole new thread.
|
Posted by AngelX, 07-19-2010, 08:02 PM |
Sorry I don't quite follow what you mean. Are saying I should make my own list of IP ranges based on the free GeoLite database?
I tried just now downloading that but couldn't make heads or tails or the data they provide.
If someone would be willing to create a list like the one I posted above specific to a state I specify, I'd be willing to pay
|
Posted by AngelX, 07-19-2010, 08:05 PM |
Yeah indeed it is
I've seen numerous reports that state the US as the number 1 hot spot for fraud and hacking. Couldn't find the site I was looking for on Google just now, but this is the type of thing I mean:
http://www.consumerfraudreporting.or...statistics.htm
|
Posted by aleb, 07-19-2010, 10:35 PM |
Did I have such a program.
That's the conclusion one locID. State = "CA ', country =" US'
One locId calculate about 2 minutes.
A total of 3500 LocId => 3500 * 2 = 7000 minutes = 5 days.
One file 1550 rows.
cat test.txt:
Total: US CA 3551
id: 608 | region: CA
-----
12.7.83.0/255.255.255.240
12.7.83.8/255.255.255.248
12.7.83.12/255.255.255.252
12.7.83.14/255.255.255.254
12.7.83.15/255.255.255.255
12.28.92.136/255.255.255.248
...
Send the file?
|
Posted by aleb, 07-19-2010, 11:18 PM |
Sorry!
Of course this way:
Total: US CA 3551
id: 608 | region: CA
-----
12.7.83.0/255.255.255.240
12.28.92.136/255.255.255.248
12.153.240.24/255.255.255.248
12.153.242.0/255.255.254.0
12.153.252.40/255.255.255.248
12.183.94.224/255.255.255.248
12.197.84.48/255.255.255.248
12.220.106.248/255.255.255.248
12.222.167.152/255.255.255.248
12.232.194.128/255.255.255.128
12.234.190.120/255.255.255.248
12.235.41.16/255.255.255.248
12.235.41.160/255.255.255.248
...
|
Posted by AngelX, 07-19-2010, 11:29 PM |
Thank you for helping me out with this.
You have PM
|
Posted by AngelX, 07-20-2010, 02:23 AM |
Still seeking a viable solution if anyone can be of help. Thanks!
|
Add to Favourites Print this Article
Also Read