Block Proxies

by 6 replies
10
Hello Warriors,
I am looking for a way to block proxy servers from browsing my website, I have tried adding this code to my .htaccess but it wont block open proxies. I am using apache2 with Joomla 1.5 all help are much appreciated.

RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ - [F]
#programming #block #proxies
  • Well. I don't think my ideas are good, but I was trying

    1) You can use a script to determine IP address and try to connect to [IP]:80,88,8080,8888,3128 if it connects - then it's a proxy

    2) You can also download fresh proxy list every day and scan it when user gets to your page. But that's a big pressure on your DB

    3) You can use SSL and this will not work with some types of open proxies.
    • [1] reply
    • Definitely not Port 80 that's just normal web browsing. Also some Proxys now can terminate the SSL connection.

      You could have a look at using a Custom .htaccess file that blocks certain ranges.
  • Thank you for your idea Daniel. I am trying to find a php script to do that.
    • [1] reply
    • I have had a similar problem once when a client asked me to "secure" their website from people using proxies. I have to give you the same answer as I did back than: there is no way to block all proxies. thats simply not possible.

      You can, however, block a majority of public, open, transparent or web proxies by using some proxy dectection script.

      I personally have worked with the XIP class from phpclasses.org , but, as I said, it wont really block all proxies and there is no way, I know of, that would allow you to do so.
      • [ 1 ] Thanks
      • [2] replies

Next Topics on Trending Feed

  • 10

    Hello Warriors, I am looking for a way to block proxy servers from browsing my website, I have tried adding this code to my .htaccess but it wont block open proxies. I am using apache2 with Joomla 1.5 all help are much appreciated.