Skip to content
Security

Security

Security Overview

The security features cover the connection itself: where it comes from, what client is on the other end, and whether the account behind it is somebody you already banned. These features work together to create multiple layers of defense.

VPN / Proxy / Datacenter Blocking

XBans can detect and block connections from VPNs, proxies, datacenters, and mobile/carrier networks using the GeoIP provider set in geoip.provider (ip-api by default). When a player connects, their IP is looked up to determine the connection type.

Connection types

TypeDescriptionExample
VPNVirtual Private Network servicesNordVPN, ExpressVPN, Surfshark
ProxyHTTP/SOCKS proxy serversPublic proxy lists, residential proxies
DatacenterHosted/cloud server IPsAWS, OVH, Hetzner
MobileCarrier/mobile network IPsCellular data connections

Setup

  1. Pick a provider in geoip.provider. The default ip-api needs no key but answers over plain HTTP; ip-api-pro, proxycheck and ipinfo answer over HTTPS and take a key (see GeoIP Country Blocking for what each one reports).
  2. Put the key in geoip.api-key (or in secrets.yml) and configure blocking in the consolidated ip-security section:
    geoip:
      provider: "ip-api-pro"
      api-key: "your-key-here"
    
    ip-security:
      vpn:
        enabled: true
      hosting:
        enabled: true
      mobile:
        enabled: false
  3. Reload with /xbans reload.

Results are cached for six hours (five minutes for a failed lookup), and outbound requests are capped at 40 a minute to stay under ip-api's free-tier quota.

Be careful with ip-security.mobile.enabled: true. Many legitimate players connect from mobile data, especially in regions where mobile internet is the primary connection type.

ISP Blocking

ISP blocking allows you to deny connections from specific Internet Service Providers. This is useful for blocking hosting providers commonly used for bot attacks or specific ISPs known for abuse.

ISP blocking is configured under the consolidated ip-security section:

ip-security:
  isp:
    enabled: true
    blocked-isps:
      - "OVH SAS"
      - "Hetzner Online GmbH"
      - "DigitalOcean LLC"

The ISP name, organisation and AS number come from the GeoIP lookup, which runs whenever ISP blocking is on. An entry matches when it appears in the ISP or organisation name the provider returns, whatever the case, so part of a name is enough; an AS number such as AS12345 is compared whole.

CIDR Range Blocking

CIDR blocking lets you block entire IP ranges using standard CIDR notation. This is a powerful tool for blocking known malicious networks at the network level.

IP range blocking is configured under the consolidated ip-security section:

ip-security:
  ip-range:
    enabled: true
    blocked-ranges:
      - "192.168.0.0/16"
      - "10.0.0.0/8"
      - "203.0.113.0/24"

CIDR checks are performed before any API calls, making them very fast. Use this for known bot networks or hosting ranges you want to block without consuming API quota.

CIDR notation works as follows: 203.0.113.0/24 blocks all IPs from 203.0.113.0 to 203.0.113.255. The number after the slash indicates how many bits of the IP are fixed.

Client Brand Control

Minecraft clients send a "brand" string on connection (e.g., "vanilla", "fabric", "forge", "lunar"). XBans can block or whitelist specific client brands to prevent unauthorized clients from joining.

client-security:
  enabled: true
  blocked-brands:
    - "wurst"
    - "meteor"
    - "impact"
  allowed-brands-only: []   # whitelist mode when not empty

Brands in blocked-brands are denied. When allowed-brands-only is not empty, only the brands it lists are allowed. Matching ignores case, and part of the brand is enough.

Client brand strings are sent by the client and can be spoofed. This feature is a deterrent, not a guarantee. Sophisticated cheat clients may report themselves as "vanilla". Use this alongside other security measures.

Protocol Version Control

Protocol version control allows you to restrict which Minecraft client versions can connect to your server. Each Minecraft version has a unique protocol number, and XBans can enforce minimum and maximum protocol versions.

client-security:
  enabled: true
  min-protocol-version: 767   # 1.21.1
  max-protocol-version: 769   # 1.21.4
  blocked-versions: []        # specific protocol numbers to refuse

Players connecting with a client version outside the allowed range are kicked with a configurable message. This prevents outdated or unreleased client versions from joining.

Alt-Account Detection

The alt-account detection weighs thirteen risk factors to score how likely it is that a new player is an alternate account of a banned player. This goes far beyond simple IP matching.

Risk Factors

#FactorDescription
1Shared addressAn address both accounts have used, weighted by what it is and how many accounts use it
2Several shared addressesEach further address the two accounts have in common
3Same subnetSame /24 (IPv4) or /64 (IPv6) without the same address
4Client brandSame client brand
5Protocol versionSame protocol version
6Language and view distanceSame client language and same view distance
7CountrySame country
8ISPSame internet provider
9Network operatorSame AS number when the ISP name differs
10Login proximityThe two logins were minutes apart
11Name similarityThe same name without separators, a number added, one name inside the other, or a close Levenshtein distance
12Client settingsUnusual options.txt values in common (below)
13Linked accounts' recordThe linked account is banned or warned, capped

Each factor contributes a weighted score. When the total score exceeds the configured threshold, staff are notified and the account can be automatically blocked or flagged for review.

Client settings

The strongest signal of the lot, and the one an alt never thinks about. An address is shared by a household, a school and a VPN exit; skin layers, main hand, chat preferences and the answer to the resource pack come out of options.txt — they belong to the installation, not to the account. A second account is a new name and a new password; it is not a new options.txt.

Only a match on an unusual value scores. Almost everybody runs the defaults, so "both players use their right hand" describes most of the server and is worth nothing. "Both play left-handed with the cape hidden and coloured chat off" describes very few people.

MatchDefault scoreCounted when
Skin-layer mask15Identical and not the default (all seven on)
Main hand10Both left-handed — roughly a tenth of players
Chat setting8 eachVisibility, colours off, text filtering on, server listings off
Resource pack8Both declined the server pack

The whole block is capped (max-score, default 35) so it can never trigger an action on its own, and a disagreement is never counted against a player: reconfiguring one install between two sessions is ordinary.

Alt-detection runs asynchronously on player join to avoid impacting connection times. Results are cached and available in the player's profile GUI.

Address history

The addresses a player has connected from live in xbans_player_ips, one row per (player, address). They used to be a semicolon-separated VARCHAR(2048) column inside XCore's shared players table — two kilobytes carried on every player load and rewritten on every cache write, for every addon on the server.

The move happens by itself on the first start after updating, and writes a CSV backup next to the configuration before the old column is dropped. Looking a player up by address is now an exact match on an index: the old search matched 1.2.3.4 inside 11.2.3.40, and read every player row to do it.

Reviewing a case

/alts <player> opens the linked accounts straight away, each with its score and the evidence the engine actually weighed, rather than only the fact that an address was shared. Nothing is printed to chat. From the console, where there is no inventory to open, the same command prints the list instead.

CommandWhat it doesPermission
/alts <player>Opens the linked accounts with their evidencexbans.command.alts
/alts <player> ban <reason>Bans the whole cluster in one go, offline accounts included. A link scoring under alert-threshold and an account protected by its rank or an exemption are left alone, and both are namedxbans.command.alts.ban
/alts <player> link <other>Records a link the engine cannot seexbans.command.alts.link
/alts <player> unlink <other>Removes a link recorded by handxbans.command.alts.link

A link recorded by hand outranks anything the engine scores afterwards, so a case you have already judged stays judged.

Weighting the evidence

Every weight lives in alt-detection.risk-scoring, and the risk levels follow the thresholds you set. A shared address is weighted by what it is: a VPN exit, a datacentre or a mobile carrier is not a household, and an address used by forty accounts is a school. Evidence also loses weight as it ages, on the half-life set in risk-scoring.decay.

Rank immunity

A moderator cannot sanction someone above them. Give each rank a level through xbans.immunity.<level> — the highest node a player holds is their level — and an attempt against an equal or higher level is refused with a message rather than silently working.

Console has no level and is never refused.