block spammers, block many ip's
#1
Posted 14 May 2006 - 07:43 AM
let's say a guy have this ip from 0 to 255, how do i block them all?
It should be a way instead for typing 0 to 255, that would like lots of resource and load time on a website
#2
Posted 14 May 2006 - 07:47 AM
http://www.pixel2life.com/tutorials/All/Al...cess%20ip%20ban
I am not sure about ranges with .htaccess but I am sure it still uses the regex system. So you could do like:
deny from 000.000.000.(0-9+)
I am not sure if that would work, but it is worth a try.
Also, pelase don't post people's ip address on the forum, you are opening them to attacks!
Edited by Chaos King, 14 May 2006 - 07:50 AM.
#3
Posted 14 May 2006 - 08:08 AM
# -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit>
this is my .htaccess
found this site
http://www.clockwatc...cess_block.html
You can also block an entire IP block/range. Here we will not specify the last octet in the .htaccess file. deny from 127.0.0
where do i add this? just simply replace after
order deny,allow deny from all?
Edited by Annihilator, 14 May 2006 - 08:21 AM.
#4
Posted 14 May 2006 - 09:27 AM
but how to ban whole country? or ISP
#5
Posted 14 May 2006 - 10:02 AM
#6
Posted 14 May 2006 - 10:19 AM
Annihilator, on May 15 2006, 02:27 AM, said:
but how to ban whole country? or ISP
You would need the full IP range and you have to becareful doing it as some IP ranges can be in 4-5 countries
re: australia, new zealand, thailand and vietnam are all within the same IP range, even if you do manage to get a country blocked they can still access your site via proxy and with new proxies released daily it's almost impossible.
#7
Posted 14 May 2006 - 10:48 AM
http://www.phpclasse...ckage/2363.html
I agree with what donna says as well. Some proxys can be caught though however any type of creditable proxy will hide the users real IP. Its almost not worth bothering about it.
#8
Posted 14 May 2006 - 11:53 AM
how about block ISP?
Edited by Annihilator, 14 May 2006 - 12:02 PM.
#9
Posted 14 May 2006 - 12:24 PM
I know when ever i reset my modem i get a completely different IP each time, and i've yet to find any kind of pattern to any of the IP's i've had.
#10
Posted 14 May 2006 - 01:24 PM
http://www.experts-exchange.com/Web/Web_La...Q_21810715.html
(scroll down to the code)
Edited by .Matt, 14 May 2006 - 01:24 PM.
#11
Posted 14 May 2006 - 09:15 PM
#12
Posted 15 May 2006 - 07:12 AM
.Matt, on May 14 2006, 06:23 PM, said:
http://www.experts-exchange.com/Web/Web_La...Q_21810715.html
(scroll down to the code)
"You Need to Subscribe to View This Solution"
#13
Posted 15 May 2006 - 12:04 PM
Note i didnt write this code, if i did i would go burry my head in the sand as its poor lol.
<?php
$ip_address = $_SERVER["REMOTE_ADDR"];
$content = file_get_contents("http://ws.arin.net/cgi-bin/whois.pl?queryinput=$ip_address");
$pos = strpos($content, "<pre") + 4;
$content = substr($content,$pos);
$pos = strpos($content, "OrgName:") + 8;
$content = substr($content,$pos);
$pos = strpos($content, "\n");
$isp_name = trim(substr($content,0,$pos));
$content = substr($content,$pos);
$pos = strpos($content, "City:") + 5;
$content = substr($content,$pos);
$pos = strpos($content, "\n");
$city = trim(substr($content,0,$pos));
$content = substr($content,$pos);
$pos = strpos($content, "StateProv:") + 10;
$content = substr($content,$pos);
$pos = strpos($content, "\n");
$state = trim(substr($content,0,$pos));
$content = substr($content,$pos);
echo "ISP: $isp_name\n";
echo "City: $city\n";
echo "State: $state\n";
?>
I would also suggest checking this out for a better soloution. http://thejunglebugs...ace.com/CIPATC/
Edited by .Matt, 15 May 2006 - 12:06 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
