MyBB Community Forums

Full Version: Proxy Denied
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello! I used several plugins to block proxies, but use cloudflare and blocks everything ... How can I block all proxies without cloudflare interfere?
If you use nginx, you'll be able to blocks tons of VPNs / Proxies.
Currently I have the following code that I want to detect proxies:

if ($_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_X_FORWARDED'] || $_SERVER['HTTP_FORWARDED_FOR'] || $_SERVER['HTTP_CLIENT_IP'] || $_SERVER['HTTP_VIA'] || @fsockopen( $_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1 ) || @fsockopen( $_SERVER['REMOTE_ADDR'], 443, $errstr, $errno, 1 )){
 error("Sorry, but you are not allowed to visit this website by using Proxy. If you feel this is an error, please email to the admin." , "Proxy Detected");
 }


The problem is that we use CLOUDFLARE and anyone who entered indicates that a proxy and is not. How should look like the code to the code works correctly?
Tbh, I'm not sure this is gonna work, but you can try enabling 'Scrutinize user's IP address' from AdminCP -> Server and optimization options
Let me know if it worked
(2016-01-16, 09:38 PM)Phrenetiick Wrote: [ -> ]Tbh, I'm not sure this is gonna work, but you can try enabling 'Scrutinize user's IP address' from AdminCP -> Server and optimization options
Let me know if it worked


I did not understand me and I do not know how to explain to you because I do not know English well or I would make you swear a lot.

I have installed and displays mod_cloudflare and IPS with REMOTE_ADDR, my question is how to cloudflare NOT detect real Ip as proxies code above ??????????????????????? ??????????????????????