Skip to main content

Block Proxy Server's Traffic in Dedicated Server

Comments

2 comments

  • 24x7server
    Hello :), You can block proxy access for your site by using following code in .htaccess file.
    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]
    0
  • cPanelMichael
    Hello :) Keep in mind that you risk blocking some legitimate traffic if you decide to block all proxy access to your server. Thank you.
    0

Please sign in to leave a comment.