fluxionary / minetest-verbana

Verification/Banning mod for minetest
Other
6 stars 0 forks source link

Verbana: Verification and banning mod for Minetest

Copyright flux 2021 AGPLv3

Name

A portmanteau of "verification", "ban", and the herb verbena.

Terminology

The terms network and ASN are used interchangeably in this document.

The terms player and account are also used interchangeably in most contexts; sometimes player will refer to a physical person, however.

Motivation

This mod is a response to sban, an IP-aware banning mod derived from xban, and BillyS's verification mod for Blocky Survival. Both of these mods have problems that I've long wanted to resolve, and it seemed the best resolution to those problems was to create a new integrating the features of both.

Sban is a good first attempt at IP-aware bans, but it has several major flaws:

  1. Multiple users may be associated with an IP, and banning one often bans them all.
  2. Banned IPs can still "hack" into existing accounts of other players by brute-forcing weak passwords.
  3. For many trolls, getting access to a new IP is far too easy, and there is no effective way to keep them off the server.

BillyS's verification mod was created to deal with one particular troll on the BlockySurvival server, who repeatedly got around sban by getting new IPs from VPNs and his regular mobile service provider. When enabled, it requires all new players to be verified by a player with moderator privileges before they can interact with the server or communicate with non-moderator players.

The flaws in the verification mod are

  1. Verification is all-or-nothing; either all new players require verification, or none of them do.
  2. Moderators are not always online to verify new players.
  3. New players come from all over the world, and may not be able to communicate with the moderator.
  4. New players are of all ages, and may not be able to communicate in chat at all.

Verbana aims to provide name-based banning, as well as ip and network based blocking and verification.

  1. IPs and Networks may be marked as "untrusted" - all new players from untrusted IPs/networks must go through verification, while other new players may join at will.
  2. A "verification jail" can optionally be specified, which prevents unverified players from getting loose on the server.
  3. IPs and Networks may be blocked or temporarily blocked, should the need arise.

Some features of sban that the first release of Verbana will likely lack:

Requirements

Optional Dependencies

Verbana can make use of the stock IRC mod, as well as the "IRC2" mod that is used on the Blocky Survival server to connect to a second IRC server.

Sban and verification are also listed as optional dependencies, but this is primarily in order for verbana to detect their presence. By default, verbana will run in "debug mode" if these mods are detected. If you wish to use verbana as intended, you do *not* want these mods installed.

Installation

If you don't know the basics of installing a minetest mod, please see

Trust the mod

Verbana must be marked as a trusted mod, with a line like the following added to minetest.conf:

secure.trusted_mods = verbana

The only "trusted" thing verbana does is load lsqlite so that it can interact with its database. To our knowledge, verbana cannot leak the insecure environment, but it can leak the lsqlite interface in minetest 5.0.1 and development versions before commit ecd20de.

Download ASN tables

Once you have put the verbana mod in the correct place, you will need to download the ASN tables that verbana uses to correlate IP numbers with networks. On Linux systems, you should just be able to run the script update_tables.sh. On other systems, you will need to find another way to download those files, and convert the data-used-autnums file from ths ISO-8859-1 encoding to utf8.

The ASN tables update regularly, though for the most part nothing major changes. You should put a process in place that updates these automatically (or manually) some period between daily and monthly.

Configuration

The following configuration options are available, and can be set in your minetest.conf file.

Functionality

Verbana assigns a "status" to all players, IPs, and networks that determines in what cases players can connect to the server.

Player Status

IP status

ASN status

Master accounts and alts

It is possible to link accounts together in a master/alt account relationship. In such a relationship, changes in the status to one account will be reflected by them all. This can be used to associate new accounts w/ existing accounts that are banned, to quickly ban those accounts.

An account can have only one master. A master account cannot have another account as its master; you can't chain the master/alt relationship.

Flagged accounts

Accounts that have been banned, kicked, unverified, or marked as suspicious retain a separate "flagged" status, which is used to restrict the output of certain other commands.

Commands

Arguments in angle brackets "\<player_name>" are mandatory. Arguments in square brackets are optional e.g. "[\<filename>]". Some optional arguments have default values e.g. [\<timespan>=1w].

Administration

These commands are available only to administrators.

Available to all players

These commands are available to all players

General status

General query commands for verbana staff.

Player inspection

Commands for looking up info about a player or players. All queries involving a player name are case-insensitive.

Player management

Commands to change the status of a player.

Managing account clusters

IP inspection

IP management

ASN inspection

ASN management