VPN Poxies Blocking .htaccess configuration - Discussion on if it can be more accurate

Discussion in 'Technical' started by LAKSHA, Jul 1, 2022.

  1. LAKSHA

    LAKSHA Member

    Hello,
    I found a .htaccess config on website mentioned below
    https://perishablepress.com/how-to-block-proxy-servers-via-htaccess/
    Below are the content of .htaccess file
    Code:
    # block proxy servers from site access
    # https://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]
    My question is , Will this be helpful for individual sites ? could there be any improvements ?

    Also i found this article
    https://kb.smoothwall.com/hc/en-us/...se the Smoothwall,to certain types of content.

    Could there be any default functionality on ISP config3 to block VPN and Proxies ?
    Do participate and contribute.
    Regards,
     
  2. LAKSHA

    LAKSHA Member

    Hi @till could you enlighten further :)
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You can add this snippet to a custom vhost.conf.master so all sites use it, or just add it as Apache directive to the sites you want.
     

Share This Page