AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [ANY] VPN Block (https://forums.alliedmods.net/showthread.php?t=312792)

PwnK 12-16-2018 04:53

[ANY] VPN Block
 
Description
This plugin's purpose is to kick anyone who tries to join your server with a VPN. It does it by checking from this website whether the client who is joining your server is using a VPN or not.
It then saves the ip and whether it's a proxy to a database so it doesn't need to check the same ip many times.
You can use either mysql or sqlite database with this plugin.

The plugin creates a log file to sourcemod/logs/VPNBlock_Log.txt and logs everyone who tries to join the server with a VPN.

Admin commands (require flag z)
PHP Code:

sm_vbwhitelist "<SteamID>" Whitelists a steamid which is allowed to join even with a VPN.
sm_vbunwhitelist "<SteamID>" Removes a steamid from whitelist

CVars
CVars are saved to your cfg/sourcemod/VPNBlock.cfg file.

PHP Code:

// 1 = Kick and log client when he tries to join with a VPN 0 = only log
vpnblock_kickclients "1"

// If the response contains this it means the player is using a VPN.
vpnblock_response "Y"

// The url used to check proxies.
vpnblock_url "http://proxy.mind-media.com/block/proxycheck.php?ip={IP}" 

Required extensions
Installation
  • Make sure you have Steamworks installed.
  • Upload smx and translation file to your server
  • (Optional) Add a new entry called "VPNBlock" to your databases.cfg. If this entry is not found the default entry is used.

Changelog
Code:

1.1.0 (17-Jan-2019)
    - Made the plugin use steamworks instead of system2 for http requests.
    - Added option to change the url which is used to check for vpns.
    - Added option to only log users who join with VPN instead of kicking them.

1.0.0 (16-Dec-2018)
    - Initial release.

Github repo
Direct download

Lubricant Jam 12-16-2018 12:22

Re: [ANY] VPN Block
 
https://cidr-blocker.github.io/#/

What's the difference may I ask?

PwnK 12-16-2018 12:59

Re: [ANY] VPN Block
 
Quote:

Originally Posted by Lubricant Jam (Post 2629425)
https://cidr-blocker.github.io/#/

What's the difference may I ask?

I have never used that plugin so I'm not sure actually. At least that it uses a different database for the proxies which might be a good or a bad thing. I have used this on my server for couple of weeks now and I haven't yet found a single vpn that gets past it so it has worked well for me.

LaGgLs 12-17-2018 13:21

Re: [ANY] VPN Block
 
Great plugin just some small problem but its not the plugins problem it can give a false positives but other wise really good plugin:)

PwnK 12-17-2018 16:27

Re: [ANY] VPN Block
 
Quote:

Originally Posted by LaGgLs (Post 2629625)
Great plugin just some small problem but its not the plugins problem it can give a false positives but other wise really good plugin:)

I have checked pretty much everyone's ip who this plugin has blocked and I haven't yet found any false positives. Of course if you get those you can just change that ip's proxy column to 0 from mysql or sqlite so it doesn't block them. I don't know how many false positives does this plugin detect but that can of course only be fixed by changing the database.

DarkDeviL 12-18-2018 00:18

Re: [ANY] VPN Block
 
Quote:

Originally Posted by Lubricant Jam (Post 2629425)
https://cidr-blocker.github.io/#/

What's the difference may I ask?

You need to spend time to create the list of bad IP addresses with CIDR-Blocker yourself.

With this one, your server is calling a third party every time, to ask whether or not the IP is a proxy/VPN, and if it claims it is, it will act accordingly - and automated, without your you need to get your hands on the job with generating the list of bad IP addresses.

Lubricant Jam 12-18-2018 04:30

Re: [ANY] VPN Block
 
Quote:

Originally Posted by arne1288 (Post 2629684)
You need to spend time to create the list of bad IP addresses with CIDR-Blocker yourself.

With this one, your server is calling a third party every time, to ask whether or not the IP is a proxy/VPN, and if it claims it is, it will act accordingly - and automated, without your you need to get your hands on the job with generating the list of bad IP addresses.

Thought as much, thanks for the clarification. I'll make a switch shortly :)

Lubricant Jam 12-21-2018 10:54

Re: [ANY] VPN Block
 
I seem to be getting a fair few false positives.

virusking 12-22-2018 03:57

Re: [ANY] VPN Block
 
Quote:

Originally Posted by Lubricant Jam (Post 2630364)
I seem to be getting a fair few false positives.

Define false positives? The plugin simply redirects all checks through a third-party, you can double check the IPs through other third-party websites such as ipqualityscore, some services have larger databases.

Lubricant Jam 12-22-2018 09:29

Re: [ANY] VPN Block
 
Quote:

Originally Posted by virusking (Post 2630477)
Define false positives? The plugin simply redirects all checks through a third-party, you can double check the IPs through other third-party websites such as ipqualityscore, some services have larger databases.

Budget ISPs detecting as a proxy, shortly put. I am aware it's a third party service I just thought I'd mention that source doesn't seem to be as reliable as put.

EDIT: I definitely think that there should be two checks put in place as I'm having a fair few people a day come to me asking to be unblocked and I'm checking their IPs and they're valid ISPs.

LaGgLs 12-22-2018 12:47

Re: [ANY] VPN Block
 
Quote:

Originally Posted by PwnK (Post 2629650)
I have checked pretty much everyone's ip who this plugin has blocked and I haven't yet found any false positives. Of course if you get those you can just change that ip's proxy column to 0 from mysql or sqlite so it doesn't block them. I don't know how many false positives does this plugin detect but that can of course only be fixed by changing the database.

Just change the proxy to 0 instead of 1 and he can connect to the server heres the quote of the owner of the plugin:)


Quote:

Originally Posted by Lubricant Jam (Post 2630512)
Budget ISPs detecting as a proxy, shortly put. I am aware it's a third party service I just thought I'd mention that source doesn't seem to be as reliable as put.

EDIT: I definitely think that there should be two checks put in place as I'm having a fair few people a day come to me asking to be unblocked and I'm checking their IPs and they're valid ISPs.


PwnK 12-22-2018 13:02

Re: [ANY] VPN Block
 
Quote:

Originally Posted by LaGgLs (Post 2630538)
Just change the proxy to 0 instead of 1 and he can connect to the server heres the quote of the owner of the plugin:)

That doesn't fix the problem with the false positives though. If you get a lot of those I image it would be a big pain in the ass to fix all manually also you could lose players because of that.
I don't have this problem myself because I think that 3rd party website detects all isps from my coutry as not proxy but I'll probably change the default site to something else and maybe provide a config from which you can easily change it yourself.

Lubricant Jam 12-22-2018 18:34

Re: [ANY] VPN Block
 
Quote:

Originally Posted by PwnK (Post 2630540)
That doesn't fix the problem with the false positives though. If you get a lot of those I image it would be a big pain in the ass to fix all manually also you could lose players because of that.
I don't have this problem myself because I think that 3rd party website detects all isps from my coutry as not proxy but I'll probably change the default site to something else and maybe provide a config from which you can easily change it yourself.

That sounds good, can you recommend any other URLs I can replace with in your plugin currently?

Sarin 01-08-2019 02:48

Re: [ANY] VPN Block
 
L 01/08/2019 - 18:26:01: [SM] Exception reported: Databases don't work
L 01/08/2019 - 18:26:01: [SM] Blaming: VPNBlock.smx
L 01/08/2019 - 18:26:01: [SM] Call stack trace:
L 01/08/2019 - 18:26:01: [SM] [0] SetFailState
L 01/08/2019 - 18:26:01: [SM] [1] Line 36, VPNBlock.sp::OnSqlConnect

sneaK 01-09-2019 16:19

Re: [ANY] VPN Block
 
Any particular reason you decided on using System2 vs SteamWorks for the http requests? Just curious, as SteamWorks definitely is more widely used, and I'm sure I speak for others when I say the less dependencies, the better. :)

_GamerX 01-09-2019 18:03

Re: [ANY] VPN Block
 
Quote:

Originally Posted by sneaK (Post 2633887)
Any particular reason you decided on using System2 vs SteamWorks for the http requests? Just curious, as SteamWorks definitely is more widely used, and I'm sure I speak for others when I say the less dependencies, the better. :)

Me personally using system2 too because it is more reliable :wink:

napster_10 01-09-2019 18:58

Re: [ANY] VPN Block
 
2 Attachment(s)
no block/kick version just logging..

DarkDeviL 01-10-2019 23:29

Re: [ANY] VPN Block
 
Quote:

Originally Posted by _GamerX (Post 2633898)
Me personally using system2 too because it is more reliable :wink:

Could you please explain, in which way is it more reliable, ... for you?

PwnK 01-17-2019 09:21

Re: [ANY] VPN Block
 
You are right, steamworks definitely is more widely used extension and I changed the http requests to use it instead and made some other changes aswell.

Code:

1.1.0 (17-Jan-2019)
    - Made the plugin use steamworks instead of system2 for http requests.
    - Added option to change the url which is used to check for vpns.
    - Added option to only log users who join with VPN instead of kicking them.


KasperH 01-18-2019 11:09

Re: [ANY] VPN Block
 
1 Attachment(s)
Added Hungarian phrases. :)

PwnK 01-19-2019 15:42

Re: [ANY] VPN Block
 
Quote:

Originally Posted by KasperH (Post 2635316)
Added Hungarian phrases. :)

Thank you I added those to github :up:

KasperH 01-20-2019 11:05

Re: [ANY] VPN Block
 
Quote:

Originally Posted by PwnK (Post 2635521)
Thank you I added those to github :up:

Your welcome and thanks! :)

johi999 01-22-2019 09:27

Re: [ANY] VPN Block
 
Works really good. :) Thank you so much Pwnk!

Ythan 02-02-2019 20:10

Re: [ANY] VPN Block
 
Quote:

Originally Posted by Lubricant Jam (Post 2630512)
Budget ISPs detecting as a proxy, shortly put. I am aware it's a third party service I just thought I'd mention that source doesn't seem to be as reliable as put.

EDIT: I definitely think that there should be two checks put in place as I'm having a fair few people a day come to me asking to be unblocked and I'm checking their IPs and they're valid ISPs.

Hey, I'm sorry for bumping this older thread, but I'm the maintainer of the Black Block Proxy Block service. Maybe I can help with the problems you're experiencing with false positives? If this is a recurring issue it sounds like there may be entire ranges which are incorrectly blacklisted. It would really help if you could send me a PM or e-mail me at [email protected] and let me know the IPs which are false positives, and I'll investigate how they got into our database and make sure it doesn't happen again.

I'm really sorry if our inaccurate information has affected anyone who relies on this service!

eyal282 04-16-2019 11:57

Re: [ANY] VPN Block
 
1 Attachment(s)
Here's the same plugin but with SQLite.

SirDoodleSnap 04-22-2019 09:13

Re: [ANY] VPN Block
 
How do you install with Steamworks running correctly? I get this when I launch my tf2 server
L 04/22/2019 - 23:11:36: [SM] Exception reported: Databases don't work
L 04/22/2019 - 23:11:36: [SM] Blaming: VPNBlock.smx
L 04/22/2019 - 23:11:36: [SM] Call stack trace:
L 04/22/2019 - 23:11:36: [SM] [0] SetFailState
L 04/22/2019 - 23:11:36: [SM] [1] Line 44, VPNBlock.sp::OnSqlConnect

Plz Help.

eyal282 04-22-2019 10:04

Re: [ANY] VPN Block
 
Quote:

Originally Posted by SirDoodleSnap (Post 2648494)
How do you install with Steamworks running correctly? I get this when I launch my tf2 server
L 04/22/2019 - 23:11:36: [SM] Exception reported: Databases don't work
L 04/22/2019 - 23:11:36: [SM] Blaming: VPNBlock.smx
L 04/22/2019 - 23:11:36: [SM] Call stack trace:
L 04/22/2019 - 23:11:36: [SM] [0] SetFailState
L 04/22/2019 - 23:11:36: [SM] [1] Line 44, VPNBlock.sp::OnSqlConnect

Plz Help.

Maybe take the post I made above yours and use the SQLite?

Anzulia 05-29-2019 17:48

Re: [ANY] VPN Block
 
I am pretty new to stuff like this with codes n stuff, but I am trying to get my things right but I am pretty lost at this point.

Where do I whitelist an user so he can join with his VPN service on?

Best Regards,
Anzulia.

eyal282 05-29-2019 22:57

Re: [ANY] VPN Block
 
Quote:

Originally Posted by Anzulia (Post 2653630)
I am pretty new to stuff like this with codes n stuff, but I am trying to get my things right but I am pretty lost at this point.

Where do I whitelist an user so he can join with his VPN service on?

Best Regards,
Anzulia.

There's literally a command !vbwhitelist "STEAM_0:1:495837593'

Bad Cold Man 06-22-2019 10:46

Re: [ANY] VPN Block
 
It's does blocking even players without VPN.

freak.exe_uLow 07-10-2019 10:48

Re: [ANY] VPN Block
 
the URL to check proxies is down :3

DarkDeviL 07-10-2019 13:26

Re: [ANY] VPN Block
 
Quote:

Originally Posted by freak.exe_uLow (Post 2658613)
the URL to check proxies is down :3

Works fine here, so:

a) temporary issues on your end (e.g. your provider having connectivity issues)

b) permanent issues on your end (e.g. your provider blocking it)

freak.exe_uLow 07-10-2019 16:55

Re: [ANY] VPN Block
 
Quote:

Originally Posted by DarkDeviL (Post 2658638)
Works fine here, so:

a) temporary issues on your end (e.g. your provider having connectivity issues)

b) permanent issues on your end (e.g. your provider blocking it)

i know and now it works but it was a problem before on hes site :3

Mekz 07-21-2019 08:20

Re: [ANY] VPN Block
 
L 07/21/2019 - 14:05:25: [SM] Exception reported: Invalid database Handle 0 (error: 4)
L 07/21/2019 - 14:05:25: [SM] Blaming: VPNBlock.smx
L 07/21/2019 - 14:05:25: [SM] Call stack trace:
L 07/21/2019 - 14:05:25: [SM] [0] SQL_EscapeString
L 07/21/2019 - 14:05:25: [SM] [1] Line 233, VPNBlock.sp::WhiteList
L 07/21/2019 - 14:05:25: [SM] [2] Line 207, VPNBlock.sp::CommandWhiteList

my sql server version is :
mysql Ver 15.1 Distrib 10.4.6-MariaDB, for Linux (x86_64) using readline 5.1

how i fix this?

djded 07-22-2019 12:43

Re: [ANY] VPN Block
 
1 Attachment(s)
Quote:

Originally Posted by Ythan (Post 2637874)
Hey, I'm sorry for bumping this older thread, but I'm the maintainer of the Black Block Proxy Block service. Maybe I can help with the problems you're experiencing with false positives? If this is a recurring issue it sounds like there may be entire ranges which are incorrectly blacklisted. It would really help if you could send me a PM or e-mail me at [email protected] and let me know the IPs which are false positives, and I'll investigate how they got into our database and make sure it doesn't happen again.

I'm really sorry if our inaccurate information has affected anyone who relies on this service!

Your server is down:(

Guys, help me please, how can I change the proxy check address on this one? That site have less false positives, when I check the same ip's on mind-media.com and proxycheck.io
What I need to write in VPNBlock URL? (see on Screenshot)
https://proxycheck.io

sneaK 07-22-2019 15:25

Re: [ANY] VPN Block
 
Quote:

Originally Posted by djded (Post 2660215)
Your server is down:(

Guys, help me please, how can I change the proxy check address on this one? That site have less false positives, when I check the same ip's on mind-media.com and proxycheck.io
What I need to write in VPNBlock URL? (see on Screenshot)
https://proxycheck.io

Use this instead: https://forums.alliedmods.net/showthread.php?p=2634786

djded 07-22-2019 17:20

Re: [ANY] VPN Block
 
Quote:

Originally Posted by sneaK (Post 2660235)

Thank you, I'll try that one

djded 07-26-2019 21:01

Re: [ANY] VPN Block
 
Quote:

Originally Posted by sneaK (Post 2660235)

Is not working for me:((
Erors

07/27/2019 - 02:47:27: SourceMod error session started
L 07/27/2019 - 02:47:27: Info (map "de_dust2_night_fix") (file "errors_20190727.log")
L 07/27/2019 - 02:47:27: [SM] Exception reported: Invalid query Handle 0 (error: 4)
L 07/27/2019 - 02:47:27: [SM] Blaming: ProxyKiller-latest.smx
L 07/27/2019 - 02:47:27: [SM] Call stack trace:
L 07/27/2019 - 02:47:27: [SM] [0] DBResultSet.HasResults.get
L 07/27/2019 - 02:47:27: [SM] [1] Line 25, ProxyKiller/cache.sp::OnCache

djded 07-26-2019 21:09

Re: [ANY] VPN Block
 
Quote:

Originally Posted by Ythan (Post 2637874)
Hey, I'm sorry for bumping this older thread, but I'm the maintainer of the Black Block Proxy Block service. Maybe I can help with the problems you're experiencing with false positives? If this is a recurring issue it sounds like there may be entire ranges which are incorrectly blacklisted. It would really help if you could send me a PM or e-mail me at [email protected] and let me know the IPs which are false positives, and I'll investigate how they got into our database and make sure it doesn't happen again.

I'm really sorry if our inaccurate information has affected anyone who relies on this service!

your server is down? http://proxy.mind-media.com/block/ is not working

djded 07-28-2019 07:48

Re: [ANY] VPN Block
 
I'm find out how to connect this plugin to Proxycheck.io :)


All times are GMT -4. The time now is 10:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.