LANLock

LANLock

a whitelist for LAN worlds e.g. when opening them to the public with e4mc

by
14.9K Downloads
fabricquiltmanagementutility
Rent Server with this Mod

About this Mod

Note: This is not needed for e4mc 5.4.0+ as they implemented a whitelist there


LANLock

A few days ago, I stumbled across LANGuard,
a mod that achieves the same thing as this one and also contributed to it.
As this was my first ever contact with Java and Minecraft Mod Development,
I started to work on a new PR but soon noticed that I'm basically rewriting the entire mod.
So I thought, it would be better if I just start a fully own mod that uses a different approach to enforce the whitelist.
And here we are :)

Also a thanks to Ovilli for creating their mod that is the start of this one.

Reason for this mod

More and more players are using mods like e4mc to make their LAN worlds publicly available.
But griefers have noticed this too and as LAN worlds provide no tooling to prevent anyone from joining, this starts to become a risk (see this video).
With this mod I tried to recreate the Minecraft Server whitelist system as closely as possible (with my non-existent Java knowledge).

Features

  • a whitelist similar to the server counterpart
    • stores name and UUID
    • UUID is used to check if connecting player is on the whitelist
  • config screen made with Cloth Config in modmenu for easy configuration
    • automatically resolves UUID for added player names asynchronously
    • option to disable the whitelist entirely
    • option to use names instead of UUIDs for checking (for testing)
  • same options accessible via the client side command /lanlock

Important

As of version 1.3.5, Cloth Config API is not a hard dependency anymore.

So if you want to configure the mod via Modmenu in a GUI, you need to install both Modmenu and Cloth Config API by yourself.

Technical

Other than LANGuard, LANLock doesn't even allow non whitelisted
players to join the server by modifying the connection process with a mixin.
So this and the usage of UUIDs differentiate this mod from LANGuard
and at least from my understanding of programming should make it more secure.

License

MIT

Available Versions

LANLock 1.3.7release
MC 26.2fabric
June 16, 2026
LANLock 1.3.7release
MC 26.1, 26.1.1, 26.1.2fabric
June 16, 2026
LANLock 1.3.7release
MC 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11fabric
June 16, 2026
LANLock 1.3.7release
MC 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric
June 16, 2026
LANLock 1.3.7release
MC 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1fabric
June 16, 2026

How to Install LANLock on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (26.2).

3

Install Mod

Open the mod browser in the dashboard and search for "LANLock". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabricquilt

Minecraft Versions

26.2, 26.1.2, 26.1.1 (+23 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

LANLock server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.2). You can switch loaders with one click in the panel.

Is LANLock compatible with fabric and quilt?

LANLock officially supports fabric, quilt for Minecraft 26.2, 26.1.2, 26.1.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with LANLock – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if LANLock consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install LANLock with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

26.226.1.226.1.126.11.21.111.21.101.21.91.21.81.21.71.21.6+16 more