• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Proxy IP Blocker Request

mattie005

New Member
I need a script that blocks all IPs from proxies on the internet. Obviously i dont know all the IPs from proxies on the internet, so if anyone knows of a script that could block IPs from a proxy that would be great!

Thank You!

I need this script for security.

(PHP Script)
 
Last edited by a moderator:
you can block ips using cpanel, that'd prolly be easiest.......or is there a paricular script that you want to stop ppl from using ?

also be careful where this is concerned, you may end up blocking legitimate visitors.
 
i know, thats why i needed a script that will block the people using proxies. Because it isnt really that good when you block someones IP for breaking the rules and they come back on a Proxy.
 
so one part or whole site ?

also, it's easy enough, the only hinderance is as you say that we don't have a list of proxy addresses, plus there are new ones everyday, for instance I built one yesterday .....maybe you could block everyone with a referrer, forcing them to type your address in the browser ... but that won't always work.... proxies can hide referrers ...
 
god sake, i hate proxies!!! I just need a list of websites like hidemyass and ones like that - which people use to surf the net.
 
google it, that'll surely give you some results......then nslookup the hostnames and block the ips from cPanel
 
heres a possibility....if you're too lazy to manually enter all this stuff into cpanel or busy, or both.......

I haven't really though this through very much, I'm thinking it up as I go....it started with....you could read each of the lists you find on the net into an array, search the array for things that match the format of an ip address ..... then store the ips in a database .... this could be done on a daily basis, say just after the proxy lists are updated ( you'd have to find out when that is ) on a cron job, or manually with a web based interface of somesort ......

if anyone sees a massive flaw in that plan, please do tell.....
 
i saw a script about blocking proxies sumwere but i cant find the tut anymore if i find it ill pm you
 
not full prove

You can create a script that checks for these ENV variables:
X-FORWARDED-FOR
VIA

If they are not null then person is using a proxy.
 
no need for curl, you'll just be using unecessary resources
PHP:
<?
// Proxy IP Collecter
// J Watkins 4 matty005

// Ignore me.....don't change me
function extract_ips_from($string){
  preg_match_all("/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]/i", $string, $matches);
  return $matches[0];
}
// Proxy Pages
$proxypages = array (
'http://www.proxy4free.com/page1.html',
'http://www.proxy4free.com/page2.html',
'http://www.proxy4free.com/page3.html',
'http://www.proxy4free.com/page4.html',
'http://www.proxy4free.com/page5.html'
);
// Loop over html pages in array, and collect data
foreach ($proxypages as $value) {
$proxylist .= file_get_contents($value);
}
// Extract ips
$ips = extract_ips_from($proxylist);
// Remove duplicate entries
$ips = array_keys(array_flip($ips));
// And there you have it $ips is full of nasty proxy addresses
echo '<pre>';
print_r($ips);

?>

so what you want to do with all these ips now ? or is that enough ?
 
Last edited:
Back
Top