Raised This Month: $12 Target: $400
 3% 

[ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc


Post New Thread Reply   
 
Thread Tools Display Modes
Javierko
AlliedModders Donor
Join Date: Sep 2017
Location: Czech republic
Old 06-26-2019 , 12:38   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #41

awesome, thanks
__________________
My Github & Sourcemod work.
If you like my work and if you want to support me, you can through PayPal.

Official SourceMod CZ/SK Discord: https://discord.gg/Qvar55a
Javierko is offline
Notifications
AlliedModders Donor
Join Date: Oct 2015
Old 06-27-2019 , 13:14   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #42

This doesn't work for most VPNs such as PrivateInternetAccess, Windscribe etc
Notifications is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 06-27-2019 , 14:02   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #43

Quote:
Originally Posted by Notifications View Post
So this doesn't seem to block IPs used by PrivateInternetAccess etc..
Quote:
Originally Posted by Notifications View Post
This doesn't work for most VPNs such as PrivateInternetAccess, Windscribe etc
So, add it yourself? The idea of this is to block CIDR; I merely provided a simple VPN import as an example. How you populate the database is for you to decide.
RumbleFrog is offline
Diegagiviz
New Member
Join Date: May 2019
Old 07-02-2019 , 13:16   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #44

Errors:
CIDR_Blocker.smx (CIDR Blocker): [2013]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111
Diegagiviz is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 07-05-2019 , 02:46   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #45

Quote:
Originally Posted by Diegagiviz View Post
Errors:
CIDR_Blocker.smx (CIDR Blocker): [2013]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111
The issue does not originate from the plugin.
RumbleFrog is offline
MUN
Senior Member
Join Date: Jan 2012
Location: Cali
Old 07-06-2019 , 14:33   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #46

Quote:
Originally Posted by Notifications View Post
So this doesn't seem to block IPs used by PrivateInternetAccess etc..
That is because they use many larger companies ASNs to hide behind.

For example, here is there us-east address. Note the IP.

Code:
Pinging us-east.privateinternetaccess.com [193.37.253.112] with 32 bytes of data:
Reply from 193.37.253.112: bytes=32 time=123ms TTL=47
Reply from 193.37.253.112: bytes=32 time=120ms TTL=47
Reply from 193.37.253.112: bytes=32 time=115ms TTL=47
Reply from 193.37.253.112: bytes=32 time=119ms TTL=47
When you query where this IP is hosted via a ip => asn tool. https://ip2asn.ipinfo.app/lookup/193.37.253.112 you get:

Code:
{
     "ipAddress": "193.37.253.112",
     "ipVersion": 4,
     "ipNumber": 3240492400,
     "count": 1,
     "status": "success",
     "error": null,
     "announcedBy": [
          {
               "asn": 9009,
               "name": "M247, GB"
          }
     ],
     "lookupTime": 1
}
Which is these guys: https://m247.com/ && https://asn.ipinfo.app/AS9009

Now, lets try another location....

Code:
 ping us-west.privateinternetaccess.com

Pinging us-west.privateinternetaccess.com [104.200.151.33] with 32 bytes of data:
Reply from 104.200.151.33: bytes=32 time=58ms TTL=44
Reply from 104.200.151.33: bytes=32 time=58ms TTL=44
Reply from 104.200.151.33: bytes=32 time=64ms TTL=44
Reply from 104.200.151.33: bytes=32 time=62ms TTL=44

https://ip2asn.ipinfo.app/lookup/104.200.151.33

Code:
{
     "ipAddress": "104.200.151.33",
     "ipVersion": 4,
     "ipNumber": 1757976353,
     "count": 1,
     "status": "success",
     "error": null,
     "announcedBy": [
          {
               "asn": 46562,
               "name": "TOTAL-SERVER-SOLUTIONS - Total Server Solutions L.L.C., US"
          }
     ],
     "lookupTime": 211
}
https://www.totalserversolutions.com/ && https://asn.ipinfo.app/AS46562


... and so on and so forth. PIA wouldn't be a very good VPN service is you knew what all there IPs were.
__________________
MUN is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 02-09-2020 , 19:09   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #47


v1.1.6
  • Fixed typo of the whitelist command (was actually committed back in 2018 but forgot to tag it, oops)
  • Updated toolchain to 1.10
__________________
RumbleFrog is offline
eliteroyal
AlliedModders Donor
Join Date: Dec 2016
Location: Moldova
Old 04-14-2020 , 08:49   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #48

Quote:
Originally Posted by RumbleFrog View Post

v1.1.6
  • Fixed typo of the whitelist command (was actually committed back in 2018 but forgot to tag it, oops)
  • Updated toolchain to 1.10
so how to whitelist an ip?

we mortal people dont know too much...
__________________
PEACE FROM MOLDOVA

Last edited by eliteroyal; 04-14-2020 at 09:17.
eliteroyal is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 04-14-2020 , 13:02   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #49

Quote:
Originally Posted by eliteroyal View Post
so how to whitelist an ip?
The absolutely best option will be to create your filters in a deaggregated way so that they only include the ones you actually want to ban.

To ban 1.2.0.0/20 (1.2.0.0 - 1.2.15.255), but to exclude the addresses in 1.2.3.0/24 (1.2.3.0 - 1.2.3.255), you would need to ban individually segments of e.g.:

1.2.0.0/23 (1.2.0.0 - 1.2.1.255)
1.2.2.0/24 (1.2.2.0 - 1.2.2.255)
1.2.4.0/22 (1.2.4.0 - 1.2.7.255)
1.2.8.0/21 (1.2.8.0 - 1.2.15.255)

Quote:
Originally Posted by eliteroyal View Post
we mortal people dont know too much...
Syntax of sm_cidr_whitelist command

Code:
sm_cidr_whitelist <steamid/ip> <comment>
sm_cidr_whitelist "STEAM_1:1:22334455"
sm_cidr_whitelist "STEAM_1:1:22334455" "Mr. Nice Guy aka. John Doe is a nice guy."
sm_cidr_whitelist "1.2.3.4"
sm_cidr_whitelist "1.2.3.4" "Mr. Nice Guy aka. John Doe, static IP since 2019-12-24"
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 12-18-2020 , 10:45   Re: [ANY] CIDR Blocker MySQL - Block VPNs, Countries and etc
Reply With Quote #50

There will soon be an alternative for large scale net ranges, implemented around a fast TCP-server-based IPv4 filter lookup server over minimal binary protocol, memory footprint (Treebitmap/compressed trees), and source auto-updating.

This alternative can handle millions of in-memory prefixes and worst-case lookup per second.
__________________
RumbleFrog is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:17.


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