Docs / Multiplayer / Dedicated server
Machine bans
A ban by name or address does not say who somebody is, so the lasting ban is by machine.
The game sends a hardware identifier when it joins, made for this host's owner: the host
answers the first hello with its realm (a random key kept in the owner's list, see below), and
the game sends SHA-256 over a fixed text, the machine's own id (Windows MachineGuid, Linux
/etc/machine-id, macOS IOPlatformUUID; on a system with none, a random number kept in
~/.openomsi/hardware-id) and that realm, cut to 128 bits.
The id itself never leaves the machine and cannot be got back from the hash; no disk or board serial number is read. Every session of one owner list gets the same identifier from a machine; another owner gets another.
The host pins the identifier to the connection at its first hello (a later hello of the same
connection cannot change it), shows it to nobody (the panels list bans by name, reason and
time only), and turns a joining machine away if a ban holds it:
you are banned from this session: <reason>.
Who bans. The host of a game started by code, and a server's admins and moderators, from the game menu's Player list -> a player -> Ban this machine... (with a reason, for a day, a week or for good), or the web panel, or
POST /api/admin/ops.A moderator bans for the session and cannot ban an admin; the owner's list and lifting a ban are the admin's. The ban sends the player away at once and is in the audit log. A host cannot ban its own machine.
Scope, and what "my sessions" means. This session: the list of the session -
bans.jsonbesideserver.cfgfor a dedicated server (kept across restarts);for a game hosting by code only while that game runs. All my sessions: the owner's list,
~/.openomsi/bans-owner.jsonof the account the host runs as, read by every game and server started from that account on that machine, running ones within a second of the change.To share one list between servers (or machines), point
owner_bansat a file in a synced folder. A ban may end (hours), else it holds until lifted. Lifting one (game menu: Player list -> Banned machines; web panel;unban) takes it out of whichever list it is in, for the other sessions too.- Files. JSON, written whole to a temporary file and moved over the old one; a file that
cannot be read gives no bans (the log says so, and a
.bakcopy is kept) and is never silently emptied. Limits, honestly. The identifier is a claim of the game, not a proof of the machine: a changed game can send any value, and a reinstalled system, a new machine id, a virtual machine or another computer is another machine.
A game before this feature, and a player who switched it off (
OMSI_NO_HARDWARE_ID=1), send none: such a player cannot be banned by machine -require_hardware_id = 1turns them away, and a ban bybanstill holds the run. Players switch it off in the launcher (Send servers an identifier for bans) or withOMSI_NO_HARDWARE_ID=1.Two hosts with different owner lists get different identifiers and cannot compare who joined them, unless they share the list (
owner_bans) on purpose. Bans made before LAN protocol 16 name identifiers no game sends any more (the server's log says so at the start): ban those players again.- Wire. The
HELLOends with|<hardware id>: empty until the host'sREALM|<realm>came,-when the player sends none. A host with a ban list answers an empty one withREALMand lets the player in only after the next hello.
Something wrong or missing? Fix it on GitHub or open an issue.