Minecraft Whitelists and the Case for Allowlisting Your Apps
A friend of mine opened a Minecraft server for her nephew's class in the spring of 2022. Port 25565 forwarded, default settings, no whitelist.

A friend of mine opened a Minecraft server for her nephew's class in the spring of 2022. Port 25565 forwarded, default settings, no whitelist. Within four days a stranger had joined, flattened the spawn village with TNT and left a sign with a Discord invite on it. She had not posted the address anywhere. The stranger found it the way most strangers find self hosted things: an automated scan of the whole IPv4 range, which these days takes hours rather than weeks.
She asked me how to ban him. I told her the ban list was the wrong tool, and that the setting she actually needed was one line in server.properties. The conversation that followed is one I have had since with people running Nextcloud, Jellyfin, Gitea and Home Assistant, because the mistake is the same one in a different costume.
Ban lists are always one step behind
A ban list, whether it is Minecraft's banned-players.json, a fail2ban jail or a blocklist of bad IP ranges, reacts to something that already happened. Someone has to misbehave first. Then you add their name or address, and they come back with a new account or a new VPN exit.
In 2022 a group ran a project that scanned the internet for open Minecraft servers and sent griefers to the ones without protection. Reports at the time described hundreds of thousands of servers found. Banning individual accounts against that is hopeless. The servers that shrugged it off had flipped the logic around: nobody gets in unless they are on the list.
That is the whole idea of an allowlist. It is not clever. It is just a default of "no."
The three settings that do the real work
Minecraft Java makes the allowlist explicit, which is why I like it as a teaching example. Three lines in server.properties matter:
- online-mode=true makes the server check each login against Microsoft's session servers. With it off, anyone can type any username, including yours, and the whitelist becomes decoration.
- white-list=true turns the list on, and /whitelist add name fills it. The file stores each player's UUID, not only the name, so renaming an account does not slip past it.
- enforce-whitelist=true kicks anyone already online who is not on the list when it reloads. Without it, a person who joined before you turned the list on can stay.
Look at how those map onto a web app. Online mode is authentication: do you know who this is? The whitelist is authorization: is this person allowed? Enforcement is session handling: what happens to people who were already in when the rules changed? Most self hosted break-ins I have helped clean up skipped one of the three. The common one is a Gitea or Forgejo instance with open registration left on from the first afternoon of setup, so anyone could create an account, which is the web version of a whitelist with online mode turned off.
The port you forgot is the one that bites
Minecraft has a second door that people miss. RCON, the remote console, listens on port 25575 by default, and its password sits in plain text in server.properties. I have seen two servers in the past year with RCON enabled, forwarded through the router and protected by a password of six lowercase letters. Anyone who guesses it can run any server command, including op on themselves.
The self hosting equivalent is the admin panel on a second port. Portainer on 9443, the Proxmox web UI on 8006, the Pi-hole dashboard, an old phpMyAdmin you installed to fix one table in 2021. The main app sits behind a reverse proxy with a login, and the side door is wide open because nobody thought of it as public.
My habit now is to run ss -tlnp on the box and compare the listening ports against what the router forwards. Anything listening on 0.0.0.0 that I did not deliberately expose either gets bound to 127.0.0.1 or put behind the same allowlist as the main app.
When an allowlist is not enough
I would be overselling this if I left out Log4Shell. In December 2021, CVE-2021-44228 let an attacker run code on a vulnerable Minecraft server by typing a crafted string into chat. A whitelist helped here only in the sense that strangers could not reach the chat box. Anyone already on the list, or anyone who could get a message into a log, was still a risk. Mojang shipped a fix in 1.18.1 and published config flags for older versions, and the servers that patched within the first two or three days were mostly fine.
So the order I suggest is: allowlist who can connect, keep the software patched, then worry about bans and rate limits. Allowlisting shrinks the crowd that can try an exploit. It does not make the exploit go away.
An allowlist decides who gets to knock. Patching decides whether the lock holds when someone you let in turns out to be the problem.
Putting a whitelist in front of a web app
For a family Jellyfin or a small Nextcloud, the closest thing to a Minecraft whitelist is putting the app behind something that only lets known people reach the login page at all. In practice that means one of three things. A mesh VPN such as Tailscale or WireGuard, where only enrolled devices can see the service. An identity proxy such as Authelia or Cloudflare Access, which asks for a login before traffic ever reaches the app. Or, for a fixed set of locations, an IP allowlist in the reverse proxy, which in nginx is two lines: allow with your range and deny all.
The VPN route is the one I recommend to most people because it is closest to the whitelist model: a short list of devices, managed in one place, and nothing visible to a scanner. I wrote about the community side of this in how gaming communities run their own chat servers, and if you are starting from scratch, getting started running a game server covers the first-week setup where these choices get made.
One thing to do before Sunday
Pick the self hosted service you would be most upset to lose and answer three questions about it in writing. Can a stranger reach the login page? Can a stranger create an account? Is there a second port, an admin panel or a console, that is reachable from outside? If any answer is yes and you did not choose it on purpose, close it this week, the same way you would flip white-list=true before inviting a class of eleven year olds onto your server. For more on protecting the accounts themselves, see how game accounts stay safe from phishing emails.
More in Games
Games
How Online Draw Games Keep Results Fair at Scale
Online draw games feel like the simplest thing on the internet.
Games
How Online Game Webhooks Explain Automating Alerts for Your Own Server
If you have ever set a game to post your match results into a group chat, you have already used a webhook.
Games
How Online Game Lobbies Explain Load Balancing
When you join an online game you rarely think about which machine is actually hosting your match.