How to restrict all proxy servers for our joomla site

Discussion regarding Joomla! 1.5 security issues.
Joomla! Vulnerable Extensions: http://feeds.joomla.org/JoomlaSecurityV ... Extensions

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
krewapti
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Apr 08, 2009 6:07 am

How to restrict all proxy servers for our joomla site

Postby krewapti » Wed Oct 28, 2009 5:12 am

Hi all,
I am trying to restrict all proxy servers for one of my joomla site . I have set up one component to restrict specified IP Address ,But now we need Restriction for proxy servers also and I foud following
statements to put inside the .htaccess file:

# block proxy servers from site access
# http://perishablepress.com/press/2008/0 ... -htaccess/

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]

But when I try to access my website through one of the proxy site I easily access the site or anyone easily access. It means my .htaccess file isn't working for proxy restriction.
So Anyone can help me and can get me out of this problem.

dynamicnet
Joomla! Guru
Joomla! Guru
Posts: 577
Joined: Wed Aug 05, 2009 1:42 pm

Re: How to restrict all proxy servers for our joomla site

Postby dynamicnet » Wed Oct 28, 2009 2:55 pm

Greetings:

From reading http://perishablepress.com/press/2008/0 ... -htaccess/ they do state, "It may not be perfect, but compared to blacklisting a million proxy domains, it’s lightweight, concise, and very effective."

Does that mean you are searching for the perfect version?

From looking at the top results of http://www.google.com/search?q=.htacces ... xy+servers it appears they are all using the same thing.

Thank you.
Peter M. Abraham
http://www.dynamicnet.net/ - Dynamic Net, Inc. - in business since June 1995; a PCI Compliant, managed hosting provider.

dynamicnet
Joomla! Guru
Joomla! Guru
Posts: 577
Joined: Wed Aug 05, 2009 1:42 pm

Re: How to restrict all proxy servers for our joomla site

Postby dynamicnet » Wed Oct 28, 2009 2:59 pm

Greetings:

I found http://www.codingforums.com/showthread.php?t=165164 which after reading the second post makes sense as to there not being a perfect solution via .htaccess.

"The HTTP headers that code is testing are optional and are only set by legitimate proxy servers. A legitimate proxy server is one that wants you to know it is a proxy, such as a proxy at a large company that is used by all the client computers within that company. The code would basically block visitors to your site who's Internet connection happened to be using a proxy server at their point of connection to the Internet.

The kind of proxy servers you want to block are called anonymous proxy servers (they don't want you to know they are proxy servers) and they DON"T set those HTTP headers. The only real way to block these kind of proxy servers would be to learn the IP address of each of them (each will either have one fixed IP address or a fixed block (subnet) of IP addresses) and deny connections from those IP addresses or blocks of IP addresses."

Thank you.
Peter M. Abraham
http://www.dynamicnet.net/ - Dynamic Net, Inc. - in business since June 1995; a PCI Compliant, managed hosting provider.

dynamicnet
Joomla! Guru
Joomla! Guru
Posts: 577
Joined: Wed Aug 05, 2009 1:42 pm

Re: How to restrict all proxy servers for our joomla site

Postby dynamicnet » Wed Oct 28, 2009 3:11 pm

Greetings:

http://coding-talk.com/f14/htaccess-block-proxy-2903/ had an interesting warning.

"RewriteCond %{HTTP:FORWARDED} !^$ [OR] will ban most mobiles as well"

Thank you.
Peter M. Abraham
http://www.dynamicnet.net/ - Dynamic Net, Inc. - in business since June 1995; a PCI Compliant, managed hosting provider.

User avatar
thefactory
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 177
Joined: Mon Apr 23, 2007 12:04 pm
Location: Bukarest, Rumänien
Contact:

Re: How to restrict all proxy servers for our joomla site

Postby thefactory » Wed Oct 28, 2009 10:50 pm

it's pretty hard to make sure you ban ALL proxies. Some you will get through that rewrite, but there are a lot that won't send those kind of headers.
http://www.thephpfactory.com- home of Auction Factory,
Article Manager, Blogging
Yahoo Answers Clone and Classified Extensions
and the new Dating and Matchmaking Extension - http://lovefactory.thephpfactory.com/

krewapti
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Apr 08, 2009 6:07 am

Re: How to restrict all proxy servers for our joomla site

Postby krewapti » Thu Oct 29, 2009 4:22 am

dynamicnet wrote:Greetings:

From reading http://perishablepress.com/press/2008/0 ... -htaccess/ they do state, "It may not be perfect, but compared to blacklisting a million proxy domains, it’s lightweight, concise, and very effective."

Does that mean you are searching for the perfect version?

From looking at the top results of http://www.google.com/search?q=.htacces ... xy+servers it appears they are all using the same thing.

Thank you.


hello friend thatnks for your reply..
I have tried out all the things from this your provided "http://perishablepress.com" url but i am not getting success.

User avatar
fw116
Joomla! Ace
Joomla! Ace
Posts: 1365
Joined: Tue Sep 06, 2005 11:18 am
Location: Germany

Re: How to restrict all proxy servers for our joomla site

Postby fw116 » Thu Oct 29, 2009 1:28 pm

well, i would recommend to switch to a host which have apache mod_security installed and your problems are gone...


Return to “Security in Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 6 guests