The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Oct 28, 2009 5:12 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Apr 08, 2009 6:07 am
Posts: 4
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.


Top
 Profile  
 
PostPosted: Wed Oct 28, 2009 2:55 pm 
Joomla! Guru
Joomla! Guru

Joined: Wed Aug 05, 2009 1:42 pm
Posts: 577
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.


Top
 Profile  
 
PostPosted: Wed Oct 28, 2009 2:59 pm 
Joomla! Guru
Joomla! Guru

Joined: Wed Aug 05, 2009 1:42 pm
Posts: 577
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.


Top
 Profile  
 
PostPosted: Wed Oct 28, 2009 3:11 pm 
Joomla! Guru
Joomla! Guru

Joined: Wed Aug 05, 2009 1:42 pm
Posts: 577
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.


Top
 Profile  
 
PostPosted: Wed Oct 28, 2009 10:50 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Apr 23, 2007 12:04 pm
Posts: 177
Location: Bukarest, Rumänien
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/


Top
 Profile  
 
PostPosted: Thu Oct 29, 2009 4:22 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Apr 08, 2009 6:07 am
Posts: 4
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.


Top
 Profile  
 
PostPosted: Thu Oct 29, 2009 1:28 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Sep 06, 2005 11:18 am
Posts: 1365
Location: Germany
well, i would recommend to switch to a host which have apache mod_security installed and your problems are gone...

_________________
http://www.schrammen.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 



Who is online

Users browsing this forum: Stonewall61 and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group