Message Board

Bugs & Development

Older Posts ]   [ Newer Posts ]
 PHP Reverse Proxy / Load Balancing
Author: R.Schwoebel   (25 Aug 11 11:34am)
Hi!

We have the honeypot working on our big download site and we are serving all content via our own reverse proxies (squid)... Now the honeypot script is not taking this setup in account!

You might want to add these lines:

---------------------------------------------------------------
if (getenv(HTTP_X_FORWARDED_FOR))
{
$ipaddress = getenv(HTTP_X_FORWARDED_FOR);
$ipaddress = str_replace(",","|",$ipaddress)."|".getenv(REMOTE_ADDR);
$ipaddress = str_replace(" ","",$ipaddress);
}
else
{
$ipaddress = getenv(REMOTE_ADDR);
}

$myiparr=explode("|",$ipaddress);
$therealip=$myiparr[0];
---------------------------------------------------------------

To get proxies, chained together out of the equation!

Cheers,
Ralf



do not follow this link

Privacy Policy | Terms of Use | About Project Honey Pot | FAQ | Cloudflare Site Protection | Contact Us

Copyright © 2004–24, Unspam Technologies, Inc. All rights reserved.

contact | wiki | email