Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Block VPN/Proxy/Socks access
#1
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:

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]
Reply
#2
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).

(04-29-2015, 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).
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply
#3
(04-29-2015, 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:


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]

The above script doesn't help much. You can block all proxies and VPNs with http://www.blocked.com software. I've been using it on my forum for years love it.
Reply
#4
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
Reply
#5
@Hyperspace can u help me install the blocked script?

i installed it but it dosnt work 

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

Installing just the plugin won't work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)