6 replies
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]
#block #proxies
  • Profile picture of the author danielharris
    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.
    {{ DiscussionBoard.errors[3886432].message }}
    • Profile picture of the author TG12
      Originally Posted by danielharris View Post

      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.
      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.
      Signature
      Vaoser Link Ninja Software
      DHV Delivery Systems FAILING at online dating???
      {{ DiscussionBoard.errors[3894721].message }}
  • Profile picture of the author Mahmoud Selman
    Thank you for your idea Daniel. I am trying to find a php script to do that.
    {{ DiscussionBoard.errors[3886542].message }}
    • Profile picture of the author andrejvasso
      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 (XIP Class (sip) - PHP Classes), 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.
      {{ DiscussionBoard.errors[3887591].message }}
      • Profile picture of the author Mahmoud Selman
        Thank you guys, I am trying to block the proxy sites manually now. It takes a lot of work, but it works.
        {{ DiscussionBoard.errors[3894594].message }}
      • Profile picture of the author TG12
        Originally Posted by andrejvasso View Post

        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 (XIP Class (sip) - PHP Classes), 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.
        This makes sense.
        Signature
        Vaoser Link Ninja Software
        DHV Delivery Systems FAILING at online dating???
        {{ DiscussionBoard.errors[3894725].message }}

Trending Topics