NetworkLock
Minecraft plugin · part of the Minecraft familyPlayers can only join your game servers through your proxy. One jar for everything.
Without protection, anyone who finds a game server's address can skip the proxy and join as any player. NetworkLock signs every login on the proxy with a one-time pass, and the game server refuses any login without a valid one. The same jar goes on Velocity or BungeeCord and on every Paper, Spigot, Folia or Sponge server.
I keep every project as simple and as fast as I can: few resources, a quick install and a short setup.
What it does
- Blocks direct connections that skip the proxy
- Blocks fake players using another player's name or UUID
- One-time passes that cannot be reused
- Separate keys for several proxies
- Login limit per IP address
- A doctor command that finds setup mistakes
Latest release
v1.0.1
NetworkLock makes sure players can only join your game servers through your proxies. 1.0.1 brings it to every Minecraft version from 1.8.8 to 26.3, fixes the security issues found in two full audits, and includes everything from the 1.0.1-dev test build.
Runs on many more servers#
- Minecraft 1.8.8 to 26.3, one jar. Game servers can run it on Java 8.
- Spigot works now. 1.0.0 refused every player on Spigot. 1.0.1 checks players properly on Spigot, old Paper (before 1.12.2) and 1.8 forks like PandaSpigot, without ProtocolLib.
- Tested on 23 servers: Paper (1.8.8 to 26.3), Spigot, PandaSpigot, Purpur, Pufferfish, Leaf, Gale, Folia, Kaiiju, SpongeVanilla. All passed. See COMPATIBILITY-REPORT.md.
- CraftBukkit has no proxy forwarding, so NetworkLock lets nobody join there and
/networklock doctortells you why. - A 3-hour test on a network with two proxies (Velocity and Waterfall) and two backends (Paper and Folia), with reloads, a key change, backend restarts and constant attack traffic, accepted every valid login outside the restarts, let no forged login in, and showed no memory, thread or handle growth. See TEST-REPORT.md.
Security fixes#
| ID | Severity | Fix |
|---|---|---|
| NL-01 | Medium | Raising max-token-age-seconds with a reload could let an already-used signature through again. |
| NL-02 | Low | Player names are cleaned before they are logged, so a crafted name can't fake console lines. |
| NL-04 | Low | A login is still refused if building the kick message fails. |
| NL-05 | Low | A replayed signature is reported as a replay even when the replay memory is full (it was refused before too). |
| NL-07 | Low | The used signature is now removed from the live profile on Sponge and Spigot 1.21.9+ too. |
| NL-10 | Medium | BungeeCord/Waterfall: a connect that never happens no longer leaves an unused signature on the player's proxy profile. |
| NL-11 | Medium | A login flood from many addresses can't make the proxy scan its whole address table per connection any more. |
| NL-12 | Low | Changing the replay memory size with a reload no longer forgets used signatures. |
| NL-13, NL-14 | Low | Update check off while no config is loaded; the anonymous statistics ID can't be derived from the key fingerprint shown in logs. |
| NL-15 | Low | Sponge also checks logins another plugin cancelled first. |
Plus clearer diagnostics: no false error on Spigot shutdowns, bad server-id values caught when the config loads, unsignable server names reported clearly, replay memory shown in /networklock stats.
Full details, a 30-threat model and a comparison with BungeeGuard: SECURITY-AUDIT.md.
From the 1.0.1-dev build#
- The console says exactly why a login was refused and how to fix it.
- Game servers can set their own kick texts under
messages:inconfig.yml(shown by queue plugins like ajQueue). /networklock about, an update checker (updates.check), renameable commands, multi-line messages with clickable links.- Anonymous usage statistics once a day (version and platform only). Turn off with
metrics.enabled: false.
Upgrading from 1.0.0#
Replace the jar on your proxies and game servers and restart. Your config files keep working; new settings get their defaults. Keys don't change.
Two things you might notice: a network.server-id with spaces at the start or end (or longer than 64 characters) is now reported as a config error at startup; it could never match the proxy's server name anyway. And the anonymous statistics ID changes once with this update.
Performance#
- The proxy creates signatures about 16% faster and game servers reject forged logins about 24% faster than 1.0.0. Checking a valid login costs the same as before (4–6 µs, depending on the run).
- In a h
Questions
Do I need different jars for the proxy and the game servers?
No. The same NetworkLock.jar goes on Velocity, BungeeCord, Waterfall, Paper, Folia, Spigot, their forks and Sponge. Each platform only loads its own part.
Do I still need a firewall?
Yes. NetworkLock refuses direct logins, but a firewall that only lets your proxies reach the game servers is the first line. NetworkLock is the lock behind it, and it also protects you if the firewall is ever wrong.
Does it work with Velocity modern forwarding?
Yes. modern is recommended. legacy and bungeeguard also work. With modern, Velocity's own forwarding check stays active and NetworkLock adds its own signature on top.
Can I use more than one proxy?
Yes. Give each proxy its own network.id. Each proxy creates its own key. On every game server, add one trusted-proxies entry per proxy. If one key leaks, you remove only that proxy's entry.
Why does a new game server let nobody in?
Until network.server-id and trusted-proxies are filled in, the server is in lockdown on purpose. Fill them in and run /networklock reload. See Install.
Does it work on plain Spigot?
Yes, since 1.0.1. It checks players properly on Spigot, old Paper (before 1.12.2) and 1.8 forks like PandaSpigot, without ProtocolLib. 1.0.0 let nobody in on Spigot. Only CraftBukkit is not supported: it has no proxy forwarding, so NetworkLock lets nobody in there and /networklock doctor says why.
What happens if a key leaks?
Whoever has it can join as anyone on the game servers that trust that proxy. Remove the key (or the whole proxy entry) from every game server and run /networklock reload. It stops working straight away. Then set a new key on the proxy. See Changing a key.
How do I check a key matches without showing it?
Run /networklock proxies on the proxy and on the game server. Both show a short fingerprint, a one-way hash of the key. If the fingerprints match, the keys match.
Updates
Contributors
From the GitHub repository, by number of commits.
Likes and reviews
Reviews
No reviews yet.
