GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How to block access from proxy sites? (https://gfy.com/showthread.php?t=1107614)

donb 04-24-2013 11:30 PM

How to block access from proxy sites?
 
I want to block a country which brings just hackers or thieves to my site and no real sales. I know they will try to use proxies - how can I block them or at least make it as difficult as possible to access my sites?

Nasty 04-24-2013 11:54 PM

you would lose legit traffic as well by blocking proxies, use geoip to block bad countries or a free cloudflare account to block known bad users

Fetish Gimp 04-25-2013 12:02 AM

http://www.wpreads.com/2013/03/block...ess-sites.html

Basically you add this to your .htaccess file

Code:

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{HTTP:VIA}                !^$ [OR]
 RewriteCond %{HTTP:FORWARDED}          !^$ [OR]
 RewriteCond %{HTTP:USERAGENT_VIA}      !^$ [OR]
 RewriteCond %{HTTP:X_FORWARDED_FOR}    !^$ [OR]
 RewriteCond %{HTTP:PROXY_CONNECTION}    !^$ [OR]
 RewriteCond %{HTTP:XPROXY_CONNECTION}  !^$ [OR]
 RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
 RewriteCond %{HTTP:HTTP_CLIENT_IP}      !^$
 RewriteRule .* - [F]
</IfModule>

And if you're using Wordpress you add this as the first line in your header file

Code:

<?php if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1)) die("Proxy access not allowed"); ?>
Haven't tested it myself but you might want to give that a shot

BNMedia 04-25-2013 02:09 AM

I use geoip and strongbox to block countries where a high level of fraud and file sharing originated.
Losing a handful of possible legit sales is worth it for less headache!


All times are GMT -7. The time now is 08:36 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123