· 6 years ago · Mar 25, 2020, 12:28 AM
1# _ _ ____ _ _____ _
2# /\ | | (_) _ \ | | | __ \ | |
3# / \ _ __ | |_ _| |_) | ___ | |_| | | | ___| |_ ___ _____
4# / /\ \ | '_ \| __| | _ < / _ \| __| | | |/ _ \ | | | \ \/ / _ \
5# / ____ \| | | | |_| | |_) | (_) | |_| |__| | __/ | |_| |> < __/
6# /_/ \_\_| |_|\__|_|____/ \___/ \__|_____/ \___|_|\__,_/_/\_\___|
7#
8# Authors: FusionCoding & Jouii
9# Version: 10.1
10# State: RELEASE
11# Anonymous statistics are sent to bStats.
12
13# Thank you for using AntiBotDeluxe
14# The default config requires very little to no configuration to make it fit your setup.
15
16# Version of configuration file
17# - Do not touch this number!
18version: 1.0.4
19
20###############################
21## General ##
22###############################
23
24# General configuration of the plugin
25general:
26 # The prefix for AntiBotDeluxe
27 prefix: "&7AntiBot&bDeluxe &8» &7"
28
29 # Enable or disable logging. Due to asynchronous logging this should be kept on.
30 log: true
31
32 # If enabled, AntiBotDeluxe will stop logging new connections
33 # if the server is under attack. This will increase the I/O
34 # performance and will reduce CPU usage.
35 light-logging: true
36
37 # Enable or disable debug messages. Can be useful for troubleshooting.
38 debug: false
39
40 # Set the default language which the plugin should use.
41 # Following codes can be used: EN, DE, FR, IT, ES ...
42 locale: EN
43
44 # Storage configuration
45 # Available options: File, SQL
46 storage:
47 type: File
48
49 # Console configuration
50 console-filter:
51 enabled: true
52
53 filter:
54 - "InitialHandler is pinging"
55 - "InitialHandler has connected"
56 - "Connection reset by peer"
57 - "Unexpected packet received"
58 - "read timed out"
59 - "to process!"
60 - "Empty Packet!"
61 - "bad packet ID"
62 - "InitialHandler - encountered exception"
63 - "com.mojang.authlib.GameProfile@"
64 - "lost connection: Timed out"
65 - "lost connection: Disconnected"
66 - "Took too long to log in"
67
68 # Configuration for automatic whitelisting
69 auto-whitelist:
70 enabled: true
71
72 # Time in minutes the player has to play until whitelisted.
73 # Default: 10
74 time: 10
75
76 # MySQL configuration
77 mysql-data:
78
79 # - Possible options:
80 # - mysql
81 # - mariadb
82 database-type: mysql
83
84 # Set the address and port for the database server.
85 # If no port is specified the default port is used.
86 # Specify as "address:port" if it's different.
87 address: localhost
88
89 # Set the name of the database for data to be stored in.
90 # The database has to be created already.
91 database: antibotdeluxe
92
93 # Credentials for the database.
94 username: root
95 password: ''
96
97 hikari-settings:
98 # Sets the maximum size of the MySQL connection pool.
99 # - Basically this value will determine the maximum number of actual
100 # connections to the database backend.
101 # - More information about determining the size of connection pools can be found here:
102 # https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
103 maximum-pool-size: 10
104
105 # Sets the minimum number of idle connections that the pool will try to maintain.
106 # - For maximum performance and responsiveness to spike demands, it is recommended to not set
107 # this value and instead allow the pool to act as a fixed size connection pool.
108 # (set this value to the same as 'maximum-pool-size')
109 minimum-idle: 10
110
111 # This setting controls the maximum lifetime of a connection in the pool in milliseconds.
112 # - The value should be at least 30 seconds less than any database or infrastructure imposed
113 # connection time limit.
114 maximum-lifetime: 1800000 # 30 minutes
115
116 # This setting controls the maximum number of milliseconds that the plugin will wait for a
117 # connection from the pool, before timing out.
118 connection-timeout: 5000 # 5 seconds
119
120# General configuration for caching
121cache:
122
123 # Configuration for proxy detection result caching.
124 proxy-results:
125 # Time the result will be cached in seconds
126 # Default: 86400
127 expires-after: 86400 # 24 hours
128
129 # Configuration for blacklist caching
130 blacklist:
131 # Time the result will be cached in seconds
132 # Default: 86400
133 expires-after: 86400 # 24 hours
134
135 # Configuration for pinging
136 ping:
137 # Time the result will be cached in seconds
138 # Default: 15
139 expires-after: 15
140
141 # Configuration for connections per IP
142 connections-per-ip:
143 # Time the result will be cached in seconds
144 # Default: 21600
145 expires-after: 21600 # 6 hours
146
147 # Configuration for analyze result caching
148 analyze:
149 # Time the result will be cached in seconds
150 # Default: 3600
151 expires-after: 3600 # 60 minutes
152
153 # Should all connections be cached?
154 # Enable this to only cache when there is no attack running.
155 lightweight-caching: false
156
157# General configuration for geolocation settings.
158geolocation:
159 # Should the plugin check for connection origin locations?
160 enabled: false
161
162
163# General configuration for connection analyzing
164analysis:
165
166 # Configure the order in which checks are ran
167 order:
168 - ConnectionsPerIP
169 - Blacklist
170 - MOTDPingDetection
171 - DeluxeCaptcha
172 - ForceRejoin
173 - ProxyDetection
174# - GeoDetection
175
176 # Whitelist configuration
177 whitelist:
178 # Should the whitelist be enabled?
179 enabled: true
180
181 checks:
182 # ForceRejoin - This check forces a player to rejoin once.
183 forcerejoin:
184
185 # Time in seconds the player has to wait before he attempts again
186 # - this will prevent bots from spam joining
187 # Default: 10
188 time: 10
189
190 # Set the conditions which have to be fired for this check to be run
191 # Available options: STANDARD, STANDARD_NO_PING, STANDARD_SLOW, STANDARD_BYPASS
192 # Recommended: x x x
193 conditions:
194 - STANDARD
195 - STANDARD_SLOW
196 - STANDARD_NO_PING
197
198 # Blacklist - This check compares the connection with the blacklist
199 blacklist:
200
201 # Set the conditions which have to be fired for this check to be run
202 # Available options: STANDARD, STANDARD_NO_PING, STANDARD_SLOW, STANDARD_BYPASS
203 # Recommended: - always executed
204 conditions: []
205
206 # ProxyDetection - This check detects Proxies & VPN's
207 proxydetection:
208
209 # Set the conditions which have to be fired for this check to be run
210 # Available options: STANDARD, STANDARD_NO_PING, STANDARD_SLOW, STANDARD_BYPASS
211 # Recommended: - always executed
212 conditions: []
213
214 # MOTDPingDetection - This check detects if a player has pinged the server
215 motdpingdetection:
216
217 # Set the conditions which have to be fired for this check to be run
218 # Available options: STANDARD, STANDARD_NO_PING, STANDARD_SLOW, STANDARD_BYPASS
219 # Recommended: x
220 conditions:
221 - STANDARD_NO_PING
222
223 # DeluxeCaptcha - This check forces the player to manually verify himself
224 deluxecaptcha:
225
226 # Set the conditions which have to be fired for this check to be run
227 # Available options: STANDARD, STANDARD_NO_PING, STANDARD_SLOW, STANDARD_BYPASS
228 # Recommended: x
229 conditions:
230 - STANDARD_BYPASS
231
232 # ConnectionsPerIP - This check detects fast joining bots.
233 connectionsperip:
234
235 # Amount of how many players per IP are allowed to connect within a specific time
236 # - this will prevent attacks with a low proxy amount
237 amount: 2
238
239 # Set the conditions which have to be fired for this check to be run
240 # Available options: STANDARD, STANDARD_NO_PING, STANDARD_SLOW, STANDARD_BYPASS
241 # Recommended: - always executed
242 conditions: []
243
244 # GeoDetection - Detects the country of the connection.
245 geodetection:
246
247 # Specify which countries you want to allow or disallow.
248 # - The mode specifies in which way the countries should be handled
249 # If set to BLACKLIST all the following countries will be disallowed.
250 # If set to WHITELIST only the following countries will be allowed.
251 country-list:
252 mode: BLACKLIST
253 list:
254 - Brazil
255 - Russia
256
257 # Set the conditions which have to be fired for this check to be run
258 # Available options: STANDARD, STANDARD_NO_PING, STANDARD_SLOW, STANDARD_BYPASS
259 # Recommended: - always executed
260 conditions: []
261
262 # Configure the different conditions that can be triggered.
263 # - This is needed for checks to be ran dependent on each situation
264 conditions:
265
266 # This condition is configurated to be triggered whenever a normal attack is detected
267 # - this means that there are multiple pings and connections per second
268 # - enum name: STANDARD
269 standard-attack:
270 # Amount of pings per second to trigger this condition.
271 # Default: 5
272 pings: 5
273
274 # Amount of connections per second to trigger this condition.
275 # Default: 35
276 connections: 35
277
278 # Time in seconds this condition will be triggered after fired.
279 # Default: 30
280 time: 30
281
282 # This condition is configurated to be triggered whenever a normal attack without pings is detected
283 # - this means that there are multiple connections, but not many pings per second.
284 # - enum name: STANDARD_NO_PING
285 standard-no-ping:
286 # Amount of pings per second to trigger this condition. <- reverted
287 # - reverted means, that this value only triggers if its below the number
288 # Default: 5
289 pings: 5
290
291 # Amount of connections per second to trigger this condition.
292 # Default: 35
293 connections: 35
294
295 # Time in seconds this condition will be triggered after fired.
296 # Default: 30
297 time: 30
298
299 # This condition is configurated to be triggered as a backup for small attacks
300 # - this means that this condition is also likely to be triggered without attacks
301 # - enum name: STANDARD_SLOW
302 standard-slow:
303 # Amount of pings per second to trigger this condition.
304 # Default: 0
305 pings: 0
306
307 # Amount of connections per second to trigger this condition.
308 # Default: 5
309 connections: 5
310
311 # Time in seconds this condition will be triggered after fired.
312 # Default: 30
313 time: 30
314
315 # This condition is configurated to be triggered whenever a bypassing attack is detected
316 # - this means that there are many connections, but no detections.
317 # - enum name: STANDARD_BYPASS
318 standard-bypass:
319 # Detection rate in %, this is a prediction of how many bots are detected.
320 # - If the rate drops below the set number, this condition will be fired.
321 # Default: 96(%)
322 detection-rate: 96
323
324 # Amount of connections per second to trigger this condition.
325 # Default: 50
326 connections: 50
327
328 # Time in seconds this condition will be triggered after fired.
329 # Default: 15
330 time: 45
331
332# General configuration for DeluxeCaptcha
333# - This system is the first public available captcha system
334# outside of the game. This system has been designed to
335# work with any kind of server. You can also use your
336# own domain for the system.
337deluxecaptcha:
338 # Should DeluxeCaptcha be enabled?
339 enabled: false
340
341 # Here you can configure the connection variables
342 # used to connect to DeluxeCaptcha.
343 connection:
344
345 # Here you can set the preferred api server
346 # - The default server used is satellite.antibotdeluxe.com.
347 # This will use our redundant API system to select the best
348 # server for you.
349 # - If you want to force an api server you can use the following syntax:
350 # country.node.satellite.antibotdeluxe.com
351 #
352 # - Available options:
353 # - us-01.satellite.antibotdeluxe.com
354 address: satellite.antibotdeluxe.com
355 port: 8080
356
357 # The standard URL that will be used is https://deluxecaptcha.com
358 # If you want to use a custom URL you will have to do a few basic steps
359 #
360 # Step 1: Go to your domains DNS area and create a new record.
361 # Step 2: Create a CNAME record with your wished domain pointing to whitelabel.deluxecaptcha.com
362 # Step 3: Enter your domain that you want to use here.
363 # Example: captcha.myserver.com
364 custom-url:
365 # Do you want to use a custom domain?
366 enabled: false
367 # Enter the URL that you want to use.
368 # WARNING: This will only work if the record exists!!!
369 url: captcha.myserver.com
370
371
372# General configuration for the Layer-7 protection
373layer-7-protection:
374 # Should the Layer-7 protection be enabled?
375 enabled: true
376
377 # Limit the amount of pings per second allowed per IP.
378 refresh-limit:
379 seconds: 5
380 limit: 7
381
382 # Configuration for server icon limits
383 server-icon:
384 # Should the server icon only be sent once per IP?
385 # - This would prevent attacks towards the icon file
386 send-only-once: true
387
388
389# General configuration for firewall integration.
390firewall-hook:
391 # Should the general firewall be enabled?
392 enabled: true
393
394 # Configuration for hooks with the machine to allow network level mitigation
395 hooks:
396 '1':
397 # Name of the hook
398 name: "IPTables & IPSet"
399 enabled: true
400 # Requires software for the hook to run
401 required-software:
402 '1':
403 name: "IPTables"
404 validation-command: "sudo iptables --version" # Requires sudo to allow non users (https://superuser.com/questions/1041621/how-to-enable-user-to-change-iptables-rules)
405 validation-response: "iptables v"
406
407 '2':
408 name: "IPSet"
409 validation-command: "sudo ipset --version" # Requires sudo to allow non users (https://superuser.com/questions/1041621/how-to-enable-user-to-change-iptables-rules)
410 validation-response: "ipset v"
411 # Commands which are ran while the server is booting.
412 firewall-commands:
413 '1':
414 command: "sudo ipset flush antibotdeluxe"
415 '2':
416 # Creates the set and sets the timeout.
417 command: "sudo ipset -N -! antibotdeluxe hash:net maxelem 150000 timeout 86400" # <- 24 hours
418 '3':
419 command: "sudo iptables -N AntiBotDeluxe"
420 '4':
421 command: "sudo iptables -F AntiBotDeluxe"
422 '5':
423 command: "sudo iptables -A AntiBotDeluxe -p tcp -m set --match-set antibotdeluxe src -j DROP"
424 '6':
425 command: "sudo iptables -D INPUT -p tcp -j AntiBotDeluxe"
426 '7':
427 command: "sudo iptables -A INPUT -p tcp -j AntiBotDeluxe"
428
429 # Commands that are run to perform action
430 action-commands:
431 add-to-firewall:
432 command: "sudo ipset -A antibotdeluxe %ip%"
433
434 remove-from-firewall:
435 command: "sudo ipset -D antibotdeluxe %ip%"
436
437
438# General configuration for proxy and VPN detection
439ip-scoring:
440 external-services:
441 '1':
442 name: "proxycheck.io"
443 action: BLACKLIST
444 enabled: true
445 connection:
446 url: "http://proxycheck.io/v2/%ip%?key=%key%&vpn=1"
447 detection-trigger: "yes"
448 automatic-placeholders:
449 key: "111111-222222-333333-444444"
450 '2':
451 name: "getipintel.net"
452 action: BLACKLIST
453 enabled: true
454 connection:
455 url: "http://check.getipintel.net/check.php?ip=%ip%&contact=%email%%flags%"
456 detection-trigger: "1"
457 automatic-placeholders:
458 email: "put.your@email.adress"
459 flags: "&flags=m"
460 '3':
461 name: "vpnblocker.net"
462 enabled: true
463 action: BLACKLIST
464 connection:
465 url: "http://api.vpnblocker.net/v2/json/%ip%"
466 detection-trigger: "\"host-ip\": true"
467 '4':
468 name: "stopforumspam.com"
469 enabled: true
470 action: KICK
471 connection:
472 url: "http://www.stopforumspam.com/api?ip=%ip%"
473 detection-trigger: "<appears>yes</appears>"
474 '5':
475 name: "teoh.io"
476 enabled: false
477 action: KICK
478 connection:
479 url: "https://ip.teoh.io/api/vpn/%ip%"
480 detection-trigger: "\"vpn_or_proxy\": \"yes\""
481 '6':
482 name: "IPQualityScore"
483 enabled: false
484 action: BLACKLIST
485 connection:
486 url: "https://www.ipqualityscore.com/api/json/ip/%key%/%ip%?strictness=%strictness%"
487 detection-trigger: "\"proxy\":true"
488 automatic-placeholders:
489 key: "111111-222222-333333-444444"
490 strictness: "1"