Skip to main content

⚙️ Configuration

Configuration templates

Main Configuration

Last updated: June 19, 2024

####################################################################################################
# +----------------------------------------------------------------------------------------------+ #
# | _ _ _ ___ _ | #
# | _ __ /_\ _ __ | |_(_) / __\ ___ | |_ | #
# | | '_ \ //_\\| '_ \| __| |/__\/// _ \| __| | #
# | | | | / _ \ | | | |_| / \/ \ (_) | |_ | #
# | |_| |_\_/ \_/_| |_|\__|_\_____/\___/ \__| | #
# | | #
# | A ready-to-use antibot plugin | #
# | | #
# | © 2024 - Powered by nickuc.com | #
# | | #
# | | #
# | For a better understanding of this file see our documentation: | #
# | ==> https://docs.nickuc.com/nantibot/ | #
# | | #
# | New options are not automatically added in this file. Default values are used | #
# | if an option is not found. | #
# +----------------------------------------------------------------------------------------------+ #
####################################################################################################

# Set the version of the file.
language-version: 2

# Sets the debugging mode.
# - This option is used to find problems in the plugin.
debug: false

# Set the language of the plugin
#
# - Available translations:
#
# |=> Portuguese: messages_br.yml
# |=> Chinese: messages_cn.yml
# |=> Czech: messages_cz.yml
# |=> English: messages_en.yml
# |=> Spanish: messages_es.yml
# |=> Hungarian: messages_hu.yml
# |=> Italian: messages_it.yml
# |=> Lithuanian: messages_lt.yml
# |=> Polish: messages_pl.yml
# |=> Romanian: messages_ro.yml
# |=> Russian: messages_ru.yml
# |=> Turkish: messages_tr.yml
# |=> Ukrainian: messages_ua.yml
# |=> Vietnamese: messages_vn.yml
#
# - When changing the language, the current file can be reset.
language-file: 'messages_en.yml'

# ___ _ _
# / __\ | ___ _ _ __| |
# / / | |/ _ \| | | |/ _` |
# / /___| | (_) | |_| | (_| |
# \____/|_|\___/ \__,_|\__,_|

# - Cloud verification.
cloud:
# Defines whether the antibot can collect extra data to improve the verification for everyone.
# - Extra information collected may include, but is not limited to, samples of: packets,
# messages and commands received from players.
#
# - Note that by disabling the option below, necessary information will NOT be disabled,
# as it completely affects the operation of the protection provided.
#
collect-data: true

direct-login:
# Sets the maximum wait time (in milliseconds) for the IP to be verified in the cloud.
# - By default, the server will wait for 1 second.
#
# - If the response is received, the player will log in directly to the server, i.e. without
# need to reconnect.
# - However, if the reply is not received, the player will need to reconnect to the server.
#
wait: 1000

# Defines the maximum number of players that can benefit from this feature at the same time.
# - Limiting this feature is intended to prevent the exhaustion of server computational
# resources in a bot attack.
max: 25

country:
# Sets whether country rules can be bypassed when performing online captcha.
# - It is recommended to turn this option on to avoid country detection failures
# and to prevent foreign players from being prevented from accessing the server.
skip-via-captcha: true

# Sets whether country rules will only be applied if the server is under attack.
# - It is recommended to enable this option to avoid players being loose.
only-check-during-attacks: true

# Defines the mode of operation of the country rule.
#
# - Valid modes:
# |=> 0: disables country rules. [not recommended]
# |=> 1: allows the countries included in the rules.
# |=> 2: blocks the countries included in the rules.
mode: 1

# Defines the countries that will respect the rule set above.
# - You need to enter the country code, according to ISO 3166.
#
# - Country codes:
# => https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
list:
- "AR"
- "AT"
- "BA"
- "BR"
- "CZ"
- "DE"
- "FR"
- "GB"
- "HR"
- "HU"
- "IL"
- "IT"
- "MK"
- "PT"
- "RO"
- "RS"
- "SK"
- "TR"
- "US"
- "UY"

captcha:
# Defines the URL used by the online captcha.
# - This feature is only available for paid (premium) versions.
# - If you are not using the premium version, the value set below will be ignored.
url: "ab.nickuc.com"

# Defines the language used by the online captcha.
# - If you leave this option as "", the language will be detected
# by the country of the IP connection (recommended).
lang: ""

# ___ _ _ _
# / __(_)_ __ _____ ____ _| | |
# / _\ | | '__/ _ \ \ /\ / / _` | | |
# / / | | | | __/\ V V / (_| | | |
# \/ |_|_| \___| \_/\_/ \__,_|_|_|

# - Firewall settings.
firewall:
# Sets the blocking duration (in seconds) of the firewall.
# - IP blocking is only done on extremely suspicious and
# insistent TCP clients during a bot attack.
# - The block list is always reset when restarting the server.
duration: 90

throttle:
# Sets the lifetime (in milliseconds) of the connection counter.
duration: 2000

# Sets the maximum number of connections for the IP to be rejected.
# - The IP will be allowed to reconnect once the connection counter expires.
# The lifetime of the counter can be set in the option above.
refuse: 3

# Sets the maximum number of connections for the IP to be temporarily blocked.
#
# (!) Blocking will only happen if an attack is in progress.
#
block: 10

os:
# Defines whether the operating system firewall should be used if available.
#
# - Exclusive for nAntiBot Premium ⭐
#
# - Limitations:
# * You need to have super-user access.
# * You need to run your server on a Linux-based system.
# * Shared hosts are incompatible for the time being.
#
enable-if-available: true

commands:
# Defines the name of the chain used by the firewall rules.
# - This will replace the "{chain}" placeholder in the commands.
chain-name: "nantibot"

# Sets the command to install the required programs.
install: "sudo apt-get install -y iptables ipset"

# Defines the startup commands.
start:
- "sudo ipset create {chain} hash:ip timeout {time} maxelem 4294967295" # create set
- "sudo iptables -t raw -I PREROUTING -m set --match-set {chain} src -j DROP" # add jump

# Defines the shutdown commands.
# - It is recommended to always delete all rules added during the "start" option.
stop:
- "sudo iptables -t raw -D PREROUTING -m set --match-set {chain} src -j DROP" # del jump
- "sudo ipset x {chain}" # delete set

# Defines the commands when blocking an ip.
block:
- "sudo ipset add {chain} {address}"

# _ __ _ _ _
# /\ /\___ _ __(_)/ _(_) ___ __ _| |_(_) ___ _ __
# \ \ / / _ \ '__| | |_| |/ __/ _` | __| |/ _ \| '_ \
# \ V / __/ | | | _| | (_| (_| | |_| | (_) | | | |
# \_/ \___|_| |_|_| |_|\___\__,_|\__|_|\___/|_| |_|

# - Offline scan settings.
verification:
delay:
# Set the delay (in milliseconds) for ip joins.
join: 1500

# Sets the delay (in milliseconds) for ip pings.
ping: 1000

limit:
# Sets the minimum amount of new connections per second.
# - When this limit is reached, the protection system will be activated.
connection: 30

# Sets minimum number of handshakes per second.
# - When this limit is reached the protection system will be activated.
handshake: 20

# Sets the minimum number of logins per second.
# - When this limit is reached the protection system will be activated.
join: 5

# Sets the minimum amount of pings per second.
# - When this limit is reached, the protection system will be activated.
ping: 15

# Sets the maximum number of accounts per ip.
# - When this limit is reached, the player will be logged out.
account-per-ip: 3

duration:
# Sets the time (in milliseconds) for the JOIN attack mode to remain active.
join: 10000

# Sets the time (in milliseconds) for the PING attack mode to remain active.
ping: 5000

# Sets the time (in milliseconds) for the punishment.
# - The punishments are only valid during attacks.
punishment: 45000

type:
nickname:
# Defines the regex of valid nicknames.
# - If a player's nickname is not valid, the plugin may temporarily block it.
valid-regex: "([a-zA-Z0-9_]{3,16})"

# Sets the regex of strange nicknames.
# - The default regex prohibits players from using names known to be suspicious,
# including those included in botnet services and/or botters' JARs.
strange-regex: "^(?i)(MC)(_)?(Storm|Down|Spam).*|(?i).*(FLEX)(_)?(BOT|OK).*|(Craft|Beach|Actor|Games|Tower|Elder|Mine|Nitro|Worms|Build|Plays|Hyper|Crazy|Super|_Itz|Slime)(Craft|Beach|Actor|Games|Tower|Elder|Mine|Nitro|Worms|Build|Plays|Hyper|Crazy|Super|_Itz|Slime)(11|50|69|99|88|HD|LP|XD|YT)"

captcha:
# Defines under which conditions the captcha should be requested.
#
# - Valid modes:
# |=> 0: request only during attacks.
# |=> 1: always request.
# |=> 2: request during attacks or if recommended.
#
mode: 2

map:
# Defines whether the map captcha should be used if available.
# - In certain scenarios (for example, with many bots per second)
# the captcha may not be available.
# - If this option is disabled, the online captcha will be used instead.
enable-if-available: true

# Sets the timeout (in seconds) for completing the captcha.
timeout: 15

# Sets the maximum number of connections that can be scanned at the same time.
# - The online captcha will be used if this limit is reached.
max-sessions: 2000

# Sets whether the online captcha should be used if the map captcha verification fails.
# - This feature is useful to prevent bots from occupying
# captcha session slots.
# If this option is disabled, previously failed connections will continue
# to be added to the session list.
#
# (!) Online verification will only be used during attacks.
#
cloud-after-fail: true

# _ _ _
# /_\ __| |_ ____ _ _ __ ___ ___ __| |
# //_\\ / _` \ \ / / _` | '_ \ / __/ _ \/ _` |
# / _ \ (_| |\ V / (_| | | | | (_| __/ (_| |
# \_/ \_/\__,_| \_/ \__,_|_| |_|\___\___|\__,_|

# - Advanced settings.
advanced:
# Sets the amount of actionbar updates (per second).
# - Valid values: all the maximum common divisors of the number 20 (1, 2, 4, 5, 10 and 20).
update-ticks: 10

address:
# Defines whether local ips should skip antibot checks.
# - Local IPs, such as 127.0.0.1 will be allowed.
local-unrestricted: true

# Defines ips which will skip any antibot checks.
# - Recommended option if you use some remote service which fails with nAntiBot installed.
#
# (!) In some panels, information about players online is provided by a ping.
# In this case it is recommended to add the IP of your machine in case
# the feature does not work properly. However, this may open breaches
# to attacks from the same IP configured (e.g. on shared hosts).
#
unrestricted: []

adapters:
handshake-data-passthrough:
# Defines whether data will be transmitted via handshake.
enabled: false

# Sets the limit (in bytes) on the data transmitted over the handshake.
# - The value "-1" disables the byte limit.
limit: 400

haproxy:
# Defines whether HAProxy is being used.
# - This resource is used internally to identify
# the actual IP of the TCP client.
#
# => Don't forget to correctly configure the source IPs in the `trusted` field below.
enabled: false

# Defines whether untrusted IPs can access the server.
# - It is recommended to enable this option to prevent the real IP of
# your server from being discovered.
deny-untrusted: true

# Defines the list of trusted IPs.
# - Only HAProxy messages sent by these IPs will be processed.
#
# - Valid values:
# * IPs (e.g. 192.0.2.146)
# * CIDR (e.g. 172.16.0.0/24)
# * URLs (e.g. https://tcpshield.com/v4/)
#
trusted:
#- "https://tcpshield.com/v4/" # for TCPShield

geyser:
# Defines whether standalone Geyser is being used.
# - Only enable this feature if you are using
# the standalone version of Geyser.
#
# => Don't forget to correctly configure the source IPs in the `trusted` field below.
enabled: false

# Defines the list of trusted IPs.
# - Only Geyser connections from these IPs will be processed.
#
# - Valid values:
# * IPs (e.g. 192.0.2.146)
# * CIDR (e.g. 172.16.0.0/24)
# * URLs (e.g. https://tcpshield.com/v4/)
#
trusted:
- "10.0.0.0/8"
- "172.16.0.0/12"
- "192.168.0.0/16"