On this page
Your city is full, the big event starts — and the server freezes. That is almost always a DDoS attack: someone floods your server with fake traffic until real players time out. Attacks are cheap to buy, and rival servers or banned players use them all the time.
The good news: with the right hosting and a few settings, you can make your server very hard to take down.
1. Use hosting with real DDoS protection
This is the most important step. Your server can't “fight” an attack by itself — the traffic must be filtered before it reaches your server. Look for:
- Always-on protection (not “activated after the attack”).
- Enough filtering capacity — attacks can be hundreds of Gbit/s.
- Game-aware rules that understand FiveM traffic, so real players are never blocked.
Every ServerLoom server is protected by ServerLoom Shield — always-on filtering with 8 Tbps+ of capacity, FiveM filter rules and attack alerts, at no extra cost.
2. Never host your city from home
A home connection has no protection at all, and your home IP becomes public the moment players connect. One attack can take down your whole internet. Always run your server in a data centre with DDoS protection.
3. Don't post your raw IP everywhere
Share your server through the FiveM server list or your cfx.re/join link instead of posting the IP in Discord, TikTok or YouTube. It won't stop a determined attacker, but it stops the casual ones.
4. Close every port you don't need
A FiveM server only needs port 30120 (TCP and UDP) open to everyone. Everything else should be closed. On Windows, this shows all rules that allow incoming traffic:
Get-NetFirewallRule -Direction Inbound -Action Allow -Enabled True | Get-NetFirewallPortFilter | Where-Object LocalPort -ne 'Any' | Select-Object Protocol, LocalPort
Port 3306 (MySQL / MariaDB) must never be open to the internet — a database open to the world is the fastest way to lose your whole city.
5. Lock down txAdmin
txAdmin runs on port 40120. Use a strong password, and only allow your own IP to reach it (the “txAdmin” rule comes from our FiveM install guide). Replace the example IP with your home IP (search “what is my IP” in Google):
# Only your IP may open txAdmin (rule created in our FiveM install guide)Set-NetFirewallRule -DisplayName "txAdmin" -RemoteAddress 203.0.113.25
6. Hide your players' IP addresses
Add this line to your server.cfg. It stops other players from seeing each other's IP addresses — so your community members can't be targeted either.
sv_endpointprivacy true
7. Turn on the FiveM filter and attack alerts
In your ServerLoom panel, open the DDoS / Shield tab of your server:
- Go to Rules and add the FiveM profile for port 30120. Only real FiveM traffic gets through.
- Go to Notifications and connect Discord, Telegram or Email. You get a message the second an attack starts — and when it ends.
- Check the attack log after an incident to see its size and type.
Bonus: watch out for leaked scripts
“Free” leaked resources often contain backdoors that give strangers control of your server. Only use scripts from trusted creators, and remove anything you don't recognise.
Summary
- Protected hosting filters attacks before they reach you.
- Only port 30120 open to the world, txAdmin only for your IP, database never public.
- sv_endpointprivacy true protects your players.
- FiveM filter + alerts so you always know what's happening.
Always-on ServerLoom Shield, high-clock Ryzen and a team that knows FiveM — online 24/7.