News:

Wondering if this will always be free?  See why free is better.

Main Menu

Replacing/Redefining "REMOTE_ADDR" | Sucuri

Started by Klajdi, September 19, 2017, 12:35:03 PM

Previous topic - Next topic

Klajdi

Hello,
Long short story, our forums were getting ddosed and we got sucuri. Now, every member has the same IP (which isn't odd). However sucuri passes the client ip in another header (if i'm correct) which is "HTTP_X_SUCURI_CLIENTIP".
I was thinking which would be the ideal place to put this piece of code:

if(isset($_SERVER['HTTP_X_SUCURI_CLIENTIP']))
{
    $_SERVER["REMOTE_ADDR"] = $_SERVER['HTTP_X_SUCURI_CLIENTIP'];
}

Thanks

Arantor

You'd want to do this in QueryString.php, there's already a chunk of code around $_SERVER['REMOTE_ADDR'] where you'd want to put that first.

Advertisement: