Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to block a site & all proxy?

Discussion in 'Security' started by H4CK3R, Feb 20, 2012.

  1. H4CK3R

    H4CK3R Well-Known Member

    Joined:
    Oct 14, 2011
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    56
    cPanel Access Level:
    Website Owner
    Hi,
    I want to block all proxy site through htaccess, is it possible?
    If yes, then how?
    Also, i want to block a site from accessing my site(They are using a bot).
    They have a large number of servers and they are changing their server IP at rapid rate. Is it possible to block site not by IP, i.e. by adding deny from www[dot]helloworld[dot]com instead of deny from 123.456.789.000?
    Please help in detail.
    Thanks.
     
  2. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    India
    cPanel Access Level:
    Root Administrator
    hi,

    You can implement these by installing a proxy servers on your own servers and use the mode_security rules for blocking domain names.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    For blocking proxy servers, you might try the following:

    How to Block Proxy Servers via htaccess

    Basically, using this in the .htaccess file:

    Code:
    # block proxy servers from site access
    # http://perishablepress.com/press/2008/04/20/how-to-block-proxy-servers-via-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]
    As for denying a domain to access the site, you can use the following:

    Code:
    <Files *>
    Order Allow,Deny
    Allow from all
    Deny from domain.com
    </Files>
    Please replace domain.com with the domain name that keeps hitting the site.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Samet Chan likes this.
  4. qwertyguy

    qwertyguy Registered

    Joined:
    Jun 28, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Will blocking all proxy servers have any negative effects on google or other search engines rankings or crawling of your website?
     
  5. Serra

    Serra Well-Known Member

    Joined:
    Oct 27, 2005
    Messages:
    258
    Likes Received:
    17
    Trophy Points:
    168
    Location:
    Florida
    No, Google doesn't proxy. They just show up. The only thing I've seen that can kill Google is a connection limit that is set too low.
     
    Ion Robert likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice