Bots are stopped by an antibot plugin (Sonar, for example) and connection limits on the proxy and server, plus a temporary whitelist during an attack. DDoS is stopped only at the network level: filtering by your host or a protected proxy such as TCPShield — and your server's real IP must stay hidden. An anticheat doesn't help with either: it checks how players behave, not network traffic.
Bots and DDoS aren't the same thing
| Bot attack | DDoS | |
|---|---|---|
| What happens | Hundreds of fake clients join, spam chat and commands, fill the slots | A flood of junk traffic saturates the link or the machine's network stack |
| What it looks like | A wave of joins in the console, identical names and messages in chat | The whole server is unreachable, ping climbs for everyone at once |
| What protects you | An antibot plugin, connection limits, a whitelist | Your host or a protected proxy — before the traffic reaches the server |
Bots: an antibot and connection limits
A bot attack happens at the Minecraft level: bots complete the handshake, join and behave like clients. You stop them before they reach the world — by checking new connections.
Sonar
Sonar is a lightweight open-source antibot plugin (GPL-3.0) for Velocity, BungeeCord and Bukkit. It first sends a new player to a lightweight fake server and checks that the client obeys Minecraft physics — gravity and block collisions — handles vehicles correctly and sends packets per the vanilla protocol. Sonar queues incoming connections, and by default an IP that fails verification twice is blocked for 10 minutes.
By default every new player is verified (timing: ALWAYS); you can also verify only during an attack (DURING_ATTACK). To keep the list of verified players across restarts, connect Sonar to a database: H2, MySQL, MariaDB or PostgreSQL (none is connected by default). Requirements: Java 17+, Velocity 3.6.0+, BungeeCord 1.20+, Paper 1.21+. On a network, Sonar goes on the proxy, not on every backend server — that's what its docs advise.
Limits on the proxy and the server
- Velocity:
login-ratelimitinvelocity.toml— the minimum time in milliseconds between connections from one IP;0disables it. - Paper without a proxy:
settings.connection-throttleinbukkit.yml— the delay between connections from one IP, 4000 ms by default. - Paper:
misc.max-joins-per-tickinconfig/paper-global.yml(default 5) — how many players can join in one tick; the rest wait for later ticks instead of being kicked. - Paper:
packet-limiterin the same file — a per-player packet limit: by default 500 per 7 seconds, then a kick; individual packets can get their own limits. - server.properties:
rate-limit— how many packets a player can send before getting kicked;0(the default) disables it. On Paper,packet-limiteris more flexible.
Chat spam
Bots often come to spam. Since 26.2, server.properties has chat-spam-threshold-seconds and command-spam-threshold-seconds (default 10): the server itself kicks anyone sending too many messages or commands, and 0 turns that off. Paper also has spam-limiter against tab-complete and recipe spam.
Among plugins, GriefPrevention, for one, handles chat spam: it's known for claims but also warns, mutes and then can kick or ban spammers, and blocks IP advertising, repeated messages, caps and join/leave spam.
A whitelist during an attack
If bots keep getting in, close the doors for a while: add your players with /whitelist add Name and turn the list on with /whitelist on. With enforce-whitelist=true in server.properties, players not on the list are kicked when the server reloads it (/whitelist reload). Operators are whitelisted automatically. When the attack is over, run /whitelist off.
Offline-mode servers are easier to bot
With online-mode=true, every client is verified against its Minecraft account, so every bot needs an account of its own. A server with online-mode=false accepts any name without checking — for an attacker that means free bots in any number. If your server lets players in without a paid account, it especially needs an antibot and an auth plugin; more in offline-mode servers.
DDoS: only the network can stop it
DDoS hits the link and the machine's network stack. Once the link is saturated, packets never reach Minecraft or its plugins — so neither an antibot nor an anticheat can stop a DDoS. Traffic has to be filtered before it reaches the server. There are two options, and they combine:
- Protection at your host. Some hosts and data centres filter attacks on their network. Ask your provider whether it protects game servers specifically and what happens to your server during an attack. How to choose where to host — in hosting or VPS.
- A protected proxy. For example, TCPShield, a DDoS mitigation service for Minecraft servers: a distributed proxy network takes the player connections, filters out junk traffic and forwards legitimate traffic to your server. Players join via your domain, which points at TCPShield's protected address (a CNAME), not at your server's IP.
So your server sees players' real IPs rather than the proxy's, TCPShield uses its own plugin or Proxy Protocol v2, which Paper and Velocity support natively. With the plugin, keep only-allow-proxy-connections: true — otherwise, per TCPShield's docs, you're not protected and are open to scanners that find your backend IP. Proxy Protocol doesn't verify that a connection came from TCPShield, so with it you need a firewall that only lets their addresses in.
Hide your real IP
Network protection is useless if the attacker knows the machine's direct address: he'll simply hit around the filter. So:
- never publish the server's IP — only a domain pointed at your protection;
- if players used to join by direct IP, or your domain pointed straight at the machine, treat that address as known and change the IP after setting up protection if you can;
- don't run a website or other public services on the same machine — they give the IP away;
- firewall the backend servers behind your proxy. Velocity's docs strongly recommend a firewall and say plainly that modern forwarding doesn't replace one; if the proxy and servers share a machine, bind the servers to
server-ip=127.0.0.1. Details in Velocity setup.
Where an anticheat fits
An anticheat deals with players who are already on the server and looks at their behaviour, not at network traffic. So DGuard replaces neither an antibot nor DDoS protection — set those up separately.
But some abuse does come from “players”, and that's DGuard's front. BadPackets are impossible packets that server exploits are built on. BookBot is books written by a bot. AntiAFK is a client faking a real player at the keyboard. In our comparison, none of the five popular anticheats besides DGuard fully checks BookBot or AntiAFK.
| Cheat | DGuard | GrimAC | Vulcan | Polar | Intave | Matrix |
|---|---|---|---|---|---|---|
| BadPacketsimpossible packets | ||||||
| BookBotwrites books with a bot | partly: only invalid books; a bot within the limits passes | |||||
| AntiAFKfakes a player at the keyboard |
If you're setting up a firewall, remember that DGuard needs outbound HTTPS to the DGuard site — for the license, updates and the cloud check of aim and TriggerBot rules. Without a connection, protection keeps working for up to 72 hours on the saved license, except the cloud-check rules. For the rest of anti-cheat defence, see the server protection guide.
FAQ
Does an anticheat protect against DDoS?
No. An anticheat checks how players behave on the server, while DDoS saturates the network before Minecraft is even involved. DDoS is stopped by filtering at your host and by protected proxies such as TCPShield.
Which antibot should I use on a Minecraft server?
Sonar, for example: an open-source antibot for Velocity, BungeeCord and Bukkit. It checks new players on a fake server — gravity, collisions and protocol — and blocks IPs after repeated failures.
What do I do if bots are joining right now?
Add your players to the whitelist and turn it on with /whitelist on, then install an antibot. With enforce-whitelist=true, players not on the list are kicked when it's reloaded. Turn the whitelist off once the attack is over.
How do I hide my Minecraft server's IP?
Let players in only through a domain pointed at a protected proxy, never publish the direct address, and firewall the server so it only accepts connections from the proxy. If the old IP has already leaked, change it after setting up protection.
Why are offline-mode servers easier to bot?
With online-mode=false the server doesn't verify the Minecraft account, so a bot doesn't need a paid account — an attacker can run any number of clients under any names. Such servers especially need an antibot and an auth plugin.
Sources
- Sonar: source code
- Sonar: supported versions
- Sonar: configuring verification
- Sonar: setting up a database
- Sonar on Modrinth
- Velocity: configuration
- Velocity: securing your servers
- Paper: paper-global.yml
- Paper: bukkit.yml
- Minecraft Wiki: server.properties
- TCPShield: documentation
- TCPShield: plugin
- TCPShield: plugin vs Proxy Protocol
- TCPShield: DNS setup (CNAME)
- GriefPrevention Legacy: features
- DGuard, the best anticheat for a modern Minecraft server: checks compared with GrimAC, Vulcan, Polar, Intave and Matrix
- DGuard: installation, requirements and troubleshooting
- DGuard: supported Paper and Leaf versions