Block Proxy Server's Traffic in Dedicated Server
Hello,
i have whm/cPanel Server, and hosted website.
i have some forms in webportal, some visitors doing malicious activity with that, i have blocked there IP by CSF but, they can access my portal via proxy.
is there any way to block proxy traffic automatically in to my server ?
-
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 -
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.
Comments
2 comments