Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto
Security

Game server security: the threats that hit community servers

Game server security for community admins: DDoS floods, exposed RCON, outdated builds such as Log4Shell on old Minecraft, malicious plugins and stolen logins.

CloudSat teamNovember 18, 20266 min read
A small fortress built from game controller shapes, ringed by a glowing shield line with a few sparks bouncing off it.
On this pageWhy game servers make easy targets

Community game servers are rarely attacked by sophisticated groups. They are attacked by a player who was banned an hour ago, a rival server, or a bot that scans the internet for open admin ports. That is good news, because the defenses against those attackers are known and mostly free. This guide walks through the threats that actually reach small and mid-sized servers, from floods to poisoned plugins, and what to do about each one.

Why game servers make easy targets

A game server publishes its address in server lists and Discord invites. It often runs software from dozens of sources: the game itself, a loader, mods, plugins, a panel, a web map. Admins keep old versions alive for a beloved modpack, and they open ports for every tool they try. Each of those habits is reasonable on its own, and each one widens the door.

1. Floods that knock the server offline

A denial-of-service attack fills the network path to your server with junk traffic until real players cannot get through. Game servers see this constantly, because rented attack capacity is cheap and a grudge costs nothing.

What helps:

  • Network-level filtering in front of the server, so volumetric floods are dropped before they reach your connection. Check that it covers UDP, which most game protocols use. CloudSat includes this filtering on every server; the DDoS protection page explains what it handles and what it does not.
  • A firewall that only admits what you serve. Every open port is something an attacker can aim at.
  • A proxy in front of Minecraft networks. With Velocity in front, players only ever see the proxy's address. The backend servers must then accept connections from the proxy alone, because they run with online-mode=false and would otherwise let anyone join under any name.

A minimal firewall for a Java server with Bedrock cross-play and SSH limited to your own address looks like this with ufw:

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow from 198.51.100.7 to any port 22 proto tcp
sudo ufw allow 25565/tcp
sudo ufw allow 19132/udp
sudo ufw enable

Replace the example address with your own before you enable it, or you will lock yourself out of SSH.

2. Admin ports left open to the world

Remote admin protocols are the most common self-inflicted hole. Minecraft RCON listens on 25575 by default, Source games accept RCON on their game port, ARK uses 27020, and panels, web maps and database ports pile up beside them. Minecraft's RCON in particular sends its password in plain text and does nothing to slow down password guessing.

Keep every admin interface off the public internet:

  • Bind it to 127.0.0.1 where the software allows, or block the port in the firewall.
  • Reach it through an SSH tunnel when you need it from home:
ssh -L 25575:127.0.0.1:25575 admin@203.0.113.10
  • Use SSH keys and disable password logins for SSH itself (PasswordAuthentication no in /etc/ssh/sshd_config).
  • Put panel logins behind two-factor authentication, and restrict the panel's port to your own IP if you can.

3. Outdated builds: the Log4Shell lesson

In December 2021, a flaw in the Log4j logging library, tracked as CVE-2021-44228 and nicknamed Log4Shell, let a specially crafted chat message make a Minecraft Java server, or a connected client, fetch and run code from an attacker's machine. Mojang fixed it in 1.18.1 and published mitigations for older versions. Those older versions still matter, because classic modpacks keep 1.7.10, 1.12.2 and 1.16.5 servers running years later.

Server version What Mojang recommended
1.18 Update to 1.18.1 or newer
1.17 Add the JVM argument -Dlog4j2.formatMsgNoLookups=true
1.12 to 1.16.5 Put Mojang's log4j2_112-116.xml in the server folder and add -Dlog4j.configurationFile=log4j2_112-116.xml
1.7 to 1.11.2 Use log4j2_17-111.xml with the same argument
Older than 1.7 Not affected

On modded servers, also update the loader to the final build for that Minecraft version, since loader builds released after the disclosure carry their own fixes. Players need updated clients too: the official launcher patched itself, while third-party launchers and old offline installs may not have.

The broader lesson outlives Log4j. A version nobody maintains never gets the next fix either. If you must run an old version, keep it whitelisted, keep its plugins minimal, and do not run it on the same machine as anything you care about.

4. Poisoned mods and plugins

In June 2023, malware known as fractureiser spread through Minecraft mods and plugins uploaded from compromised accounts on CurseForge and Bukkit. Infected jars stole credentials from the machines that ran them and tried to infect other jar files they found. Servers and players' own computers were both hit.

You cannot audit every jar, but you can limit the damage:

  • Download from official project pages only, and never from "free premium plugin" sites.
  • Update deliberately rather than automatically, and read the changelog of anything that suddenly ships a new release after months of silence.
  • Run the server as an unprivileged user, so a malicious plugin cannot take over the whole machine.

A systemd unit that does this and walls off the rest of the system:

[Unit]
Description=Minecraft server
After=network-online.target
Wants=network-online.target

[Service]
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/usr/bin/java -Xms4G -Xmx4G -jar server.jar nogui
Restart=on-failure
NoNewPrivileges=true
ProtectSystem=full
ProtectHome=true
PrivateTmp=true

[Install]
WantedBy=multi-user.target

Create the user first with sudo useradd --system --home /opt/minecraft --shell /usr/sbin/nologin minecraft, then hand it the folder with sudo chown -R minecraft:minecraft /opt/minecraft. Nothing in that folder should be owned by root.

5. Stolen admin accounts

The fastest way into a server is often through its owner. Phishing links promising "free ranks", fake plugin updates and reused passwords all end with someone else holding operator rights. Protect the accounts that control the server:

  • Turn on two-factor authentication for the Microsoft, Steam and Discord accounts of everyone with admin rights.
  • Keep the operator list short, and give moderators a permissions group instead of full operator status.
  • Keep the log_admin_commands game rule on, its default, so every admin command lands in the log.
  • Treat tokens as passwords. A Counter-Strike 2 Game Server Login Token or a Discord bot token in a public screenshot is as bad as a leaked password.

6. Backups that survive the incident

Every threat above ends the same way when it succeeds: you need yesterday's world back. Keep at least one backup copy off the server, out of reach of the game's user account, so malware that encrypts or deletes files cannot touch it. Test a restore once, on a spare machine, so you know the backup contains what you think it does.

The short version

  • Filtering upstream, a deny-by-default firewall, and only game ports open.
  • Admin ports on localhost or behind SSH; keys instead of passwords.
  • Supported versions, or old ones patched and isolated.
  • Plugins from official sources, a server process that does not run as root.
  • Two-factor authentication for every admin, and backups stored elsewhere.

FAQ

Is my old 1.12.2 modpack server still exposed to Log4Shell?

If nobody applied a fix, yes. Add Mojang's log4j2_112-116.xml mitigation or move to the final loader build for 1.12.2, and confirm the server's start command actually includes the new argument.

Can DDoS filtering stop every attack?

No filter can promise that. Upstream filtering absorbs most floods, and the rest is layering: a tight firewall, a proxy for networks, and a second server in another region for communities that cannot afford downtime.

Does an SRV record hide my server's IP address?

No. An SRV record only tells the client which host and port to use, and anyone can look it up. Hiding the backend address takes a proxy in front of it.

Should game servers run antivirus?

Traditional antivirus matters less on a Linux server than the basics above. When a malware wave like fractureiser hits, the community usually publishes detection scripts within days, and that is the moment to scan your jars.

Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.