Information: Minecraft Server: I started working on my old Minecraft server called Terona. Join our discord if you want :D Join

NetworkLock overview

What NetworkLock does, how the proxy signature works, which servers it supports and where to download it.

NetworkLockChecked

On this page

If you downloaded NetworkLock 1.0.1 on November 8, please download it again. That early build was replaced, and the update checker won't flag it because the version number is the same.

NetworkLock makes sure players can only join your game servers through your own proxy. If someone finds the address of a game server and connects to it directly, they cannot log in, not even with an admin's name or UUID.

I keep NetworkLock as simple and fast as I can: one jar for every platform, no database, no extra plugins, very little memory, and a setup that takes a few minutes.

The problem it solves#

Game servers behind a proxy run in offline mode and trust the player data the proxy forwards. Anyone who can reach a game server directly can send fake forwarding data and join as any player. NetworkLock closes that gap.

How it works#

Diagram of a NetworkLock login: the proxy signs a one-time pass with HMAC-SHA256 covering the proxy id, target server, time, a random one-time value and the player's UUID, name and IP. The game server lobby checks five things in order: the proxy id is in trusted-proxies, the signature matches that proxy's key, it was made for this server-id, it is at most 30 seconds old, and the one-time value was not used before. A direct connection that skips the proxy fails a check and is refused with the NL-01 message

Illustration generated with AI and checked by Maj Kovačič.

  1. When the proxy sends a player to a game server, NetworkLock on the proxy signs the connection with the proxy's secret key (HMAC-SHA256).
  2. The signature covers the proxy id, the target server name, the time, a random one-time value, and the player's UUID, name, IP address and other profile data.
  3. The game server checks the signature before the player exists on the server. It checks, in this order:
    1. The proxy id is in its trusted-proxies list.
    2. The signature matches one of that proxy's keys.
    3. The signature was made for this server (network.server-id).
    4. It is at most 30 seconds old, and the proxy's clock is not more than 5 seconds ahead.
    5. The one-time value has not been used before on this server.
  4. If any check fails, the player is refused with a short message. The console says why.
  5. The signature is then removed from the player's profile, so other plugins and players never see it.

Keys never travel over the network. Only signatures do, and each one works once, on one server, for a short time.

The proxy also limits how often one IP address can try to log in, and blocks addresses that keep going over the limit for a while.

Safe by default#

  • If a game server's config is missing or broken at startup, it lets nobody in until you fix it.
  • A broken config on reload is refused and the old config stays active.
  • On CraftBukkit, which has no proxy forwarding, it lets nobody in and /networklock doctor says why.
  • If the proxy's config is broken, the proxy refuses logins.
  • There is no setting to switch the protection off. To turn it off, remove the plugin.

Requirements and supported versions#

PlatformSupportedTested
Paper and its forks (Purpur, Pufferfish, Leaf, Gale, ...)Minecraft 1.8.8 to 26.31.8.8, 26.3
Folia and its forks (Kaiiju, ...)Minecraft 1.20.1 to 26.31.20.1, 1.21.11
SpigotMinecraft 1.8.8 to 26.31.8.8, 1.21.11
SpongeMinecraft 1.21.10 to 26.3 (Sponge API 17 and newer)SpongeVanilla 1.21.11, 26.3
Velocity3.5 and newer, including 4.x3.5.1, 4.3.1
BungeeCord, Waterfall1.211.21
  • One jar for all of them.
  • Game servers run it on Java 8 and newer, so old 1.8 servers work too. Your Minecraft version may need a newer Java, for example Java 25 for 26.x. Proxies need whatever Java their proxy software needs.
  • Proxy player forwarding must be on: modern, legacy or bungeeguard on Velocity, ip_forward: true on BungeeCord and Waterfall.
  • Players can join with any Minecraft version your proxy accepts.
  • Since 1.0.1, plain Spigot, old Paper (before 1.12.2) and 1.8 forks like PandaSpigot work too, without ProtocolLib.
  • CraftBukkit is not supported. It has no proxy forwarding at all. NetworkLock lets nobody join there, and /networklock doctor says why.
  • FlameCord was not tested. It is a BungeeCord fork, so it should work.

Download#

Download NetworkLock.jar from the 1.0.1 release (direct link). The same file goes on your proxy and on every game server.

SHA-256: dac1de11bfee44c9a2a6b5a37e8bf67552f4e584c505626559438eeb2afeb51e

VersionStatus
1.0.1Latest release. Use this.
1.0.0Previous release. To upgrade, replace the jar on your proxies and game servers and restart. Your configs and keys keep working.

1.0.1 adds Spigot and Minecraft 1.8.8 to 26.3 support, security fixes, clearer refusal reasons in the console, kick texts set on the game server, /networklock about, an update checker, renameable commands, multi-line messages with clickable links, and anonymous usage statistics. See Configuration.

What NetworkLock does not do#

  • It is not DDoS protection. The login limit only slows down login spam.
  • It does not replace a firewall. Still firewall your game servers so only your proxies can reach them. NetworkLock is the lock behind that.
  • It cannot protect the link between proxy and game server. Someone on that network could grab a signature and use it within its 30 seconds. Keep that link on a private network or VPN.
  • If a proxy key is stolen, whoever has it can join as anyone on the servers that trust that proxy, until you remove the key.
  • If NetworkLock is removed or fails to load, nothing is checked.

Next steps#

  1. Install NetworkLock on your proxy and game servers.
  2. Read Configuration for every option.
  3. Run /networklock doctor. If something is wrong, see Troubleshooting.

NetworkLock is open source under the MIT license. Source code: github.com/darkzmaj/NetworkLock.

Your likes

Only what this browser did. Your data on this device