MyBB Community Forums

Full Version: Block VPN/Proxy/Socks access
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What I want to do is extremely specific. I know it's not a MyBB issue, but maybe someone on here can relate to what I'm trying to do and can help. I've been looking for a solution for a while now.

I want to block most, if not all VPN, Proxy, and Socks traffic that connects to a website. I also want to add an exception so that Staff on a website can bypass that rule and still use a vpn, proxy, or socks.

I'm pretty sure the 2nd part of that is impossible.

I saw an article that included a script on blocking most proxies via htaccess.

Here's the script:

# 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]
There is no way to filter out all proxy-like services besides banning the exact IP addresses (only part of them include HTTP headers listed in the code).

(2015-04-29, 08:48 PM)Theminatar Wrote: [ -> ]I also want to add an exception so that Staff on a website can bypass that rule and still use a vpn, proxy, or socks.
You can allow certain proxies or allow bypassing the rule when a certain header is appended (e.g. containing a passphrase known to the staff, although they would need to set up their clients properly).
(2015-04-29, 08:48 PM)Theminatar Wrote: [ -> ]What I want to do is extremely specific. I know it's not a MyBB issue, but maybe someone on here can relate to what I'm trying to do and can help. I've been looking for a solution for a while now.

I want to block most, if not all VPN, Proxy, and Socks traffic that connects to a website. I also want to add an exception so that Staff on a website can bypass that rule and still use a vpn, proxy, or socks.

I'm pretty sure the 2nd part of that is impossible.

I saw an article that included a script on blocking most proxies via htaccess.

Here's the script:


# 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]

The above script doesn't help much. You can block all proxies and VPNs with www.blocked.com software. I've been using it on my forum for years love it.
You can filter this but you will need to query if the traffic is behind a proxy.
This article may give you some ideas.
http://www.phpclasses.org/blog/post/391-...Proxy.html
@Hyperspace can u help me install the blocked script?

i installed it but it dosnt work 

[Image: blocked_zps3lakxre9.jpg]
Did you follow the instructions at this link? https://www.blocked.com/install.php

Installing just the plugin won't work.