FiveM DDoS Protection in 2026: What Actually Works
Why VPNs and web proxies don't stop DDoS on FiveM, and what does: UDP-aware filtering, a proxy with the right convars and an origin that stays hidden.
network thread hitch warning: timer interval of 2104 milliseconds
Client -> server connection timed out
Real FiveM DDoS protection happens before traffic reaches your server: filtering that understands UDP game traffic, optionally a TCP/UDP proxy in front of FXServer, and an origin IP that nobody knows and that only accepts traffic from that filter. A consumer VPN, a website-only proxy or a Lua "anti-DDoS" resource cannot do this, because a flood fills your line before FXServer ever sees a packet.
Disclosure: fivem.tools was founded with sponsorship from Nyru, a hosting company. This guide is vendor-neutral and does not rank providers. For our hosting comparison and how we judge it, see the FiveM hosting guide.
Last checked: 17 October 2026
What does a DDoS on a FiveM server look like?
A DDoS (distributed denial of service) sends so much traffic, or so many bad requests, that real players cannot get through. On a FiveM server it usually shows up as:
- every player timing out at the same moment, often several times in a row,
network thread hitch warninglines in the console while CPU is otherwise fine,- the server disappearing from the server list or players getting CURL error 28 when joining (see CURL error 28),
- your host's panel showing a spike in inbound traffic or a "mitigation" notice.
If only some players time out, or it happens at a fixed time every day, check the server first. A heavy resource or a backup job looks similar from the player side. See server thread hitch warning.
Why a VPN or web proxy doesn't protect a FiveM server
FiveM uses two kinds of traffic on the same port (30120 by default):
- TCP/HTTP for the connection handshake, server info and resource downloads,
- UDP for the game itself, once players are in.
Most "DDoS protection" sold for websites only proxies HTTP or HTTPS. It can sit in front of the connect endpoint, which the official proxy docs describe, but it does not carry UDP game traffic. Attackers simply hit UDP on your real IP.
A consumer VPN on your own PC protects only your PC's connection, not the server. A VPN on the server itself just moves the server behind someone else's IP with no filtering of its own.
A resource inside FXServer cannot filter a flood either. By the time a Lua or JavaScript script runs, the packets have already crossed your network line. If the line is full, nothing in server.cfg or a script helps. This is why searches for a "FiveM DDoS protection script" lead nowhere useful.
What actually works
Protection comes in layers. You need the first one; the others make it much stronger.
- Network-level filtering that understands game UDP. This is done by your host or a dedicated protection provider, upstream of your server. Ask your host directly: do you filter UDP game traffic, do you have a profile for FiveM, how much capacity, and what happens to my server during an attack (filtered, rate-limited, or null-routed, which means all traffic is dropped). Get answers in writing.
- A TCP/UDP proxy in front of FXServer (optional but common). The official FiveM proxy docs describe a "server proxy" that forwards raw TCP and UDP to the game server, plus an optional HTTPS "connect proxy". Players connect to the proxy, and the proxy's network takes the hits.
- A locked-down origin. The real server (the "origin") only accepts game traffic from your proxy or filter, and its IP is never published.
Layer 3 is what most server owners skip, and it is why attacks keep landing after they "bought protection".
How to set up a FiveM proxy: the convars
These convars come from the official proxy setup page (docs.fivem.net/docs/server-manual/proxy-setup/). Put them in server.cfg on the origin:
set sv_forceIndirectListing true
set sv_listingHostOverride "server1.example.com"
set sv_proxyIPRanges "100.64.1.1/32"
set sv_endpoints "100.64.1.2:30120"
What each one does, according to the docs:
| Convar | Purpose |
|---|---|
sv_forceIndirectListing | Stops the server list from showing your real IP |
sv_listingHostOverride | The host the server list backend queries, instead of your real address (your connect proxy's hostname) |
sv_listingIpOverride | The IP the list backend uses; only needed if it cannot work it out itself |
sv_proxyIPRanges | Space-separated IPv4 CIDR ranges of your proxies; they are trusted to send X-Real-IP and bypass the rate limiter |
sv_endpoints | The endpoint(s) players should use for the game connection: your server proxy's IP and port |
Replace the example addresses with your own. The 100.64.x.x values are just examples from the docs.
Two details from the docs that people miss:
- The server proxy must forward both TCP and UDP. The docs' nginx example uses the
streammodule, which must go innginx.conforconf.d, not insites-enabled. - Without
sv_proxyIPRanges, FXServer sees every player coming from the proxy's IP, so real player IPs are lost and the built-in rate limiter treats them all as one client.
After the change, check your listing with the FiveM IP Finder. It should show the proxy address, not the origin.
Firewall the origin
A proxy only helps if the origin refuses everything else. On the origin server:
- Allow TCP and UDP 30120 (or your game port) only from your proxy or filter ranges.
- Allow SSH or RDP only from your own IP, or through your host's console. Use keys or strong passwords.
- Do not expose the txAdmin web panel (port 40120 by default) to the whole internet. Restrict it to your own IP, or reach it through a tunnel.
- Do not expose your database port (3306) at all if the database is on the same machine.
- Drop everything else by default.
On Linux this is ufw or nftables/iptables; on Windows, Windows Defender Firewall with inbound rules scoped to remote IP ranges. Many hosts also offer a network firewall in their panel, which filters before traffic reaches your machine; use it if you have it.
Don't leak your origin IP
If attackers know the origin IP, they skip your proxy. Common leaks:
- Old DNS records. A subdomain that once pointed straight at the server, or public DNS history services that store it. After setting up a proxy, move the origin to a new IP that has never been in DNS.
- The server list. Before
sv_forceIndirectListingwas set, the real IP was public. Same fix: new IP. - Other services on the same IP. A website, a txAdmin panel, a voice server or a Discord bot web endpoint on the origin all reveal it. Put them elsewhere or behind the same protection.
- Outgoing requests. Any HTTP request your server makes to an address someone else controls shows them your origin IP. Be careful with scripts that fetch player-supplied URLs.
- Staff. Limit who has panel or SSH access, and remove it when staff leave.
The Nucleus reverse proxy is gone
FXServer used to print a https://<username>-<servercode>.users.cfx.re URL at startup. Cfx.re announced on the forum that this Nucleus reverse proxy would be fully deprecated on 31 March 2026 (forum.cfx.re/t/nucleus-reverse-proxy-deprecation/5387399). Join links (cfx.re/join/<code>) are not affected.
If you used that URL to reach SetHttpHandler endpoints or txAdmin over HTTPS, you now need direct ip:port access or your own reverse proxy. Keep in mind that a direct ip:port link shows your origin IP to everyone who sees it. As of the announcement thread, Cfx.re had not named an official replacement.
What to do during an attack
- Confirm it. Check the host's traffic graphs and the console. Many players timing out together plus a traffic spike is the typical pattern.
- Contact your host. Send the time, your IP and port, and what you see. They can confirm whether filtering kicked in or the IP was null-routed.
- Do not change things at random. Restarting FXServer or changing the port does not stop a flood aimed at your IP.
- Tell players. Post in Discord that you are aware. It cuts down on support tickets.
- After it ends, check for leaks using the list above, and plan the proxy and origin lockdown if you do not have them.
- Report it. DDoS attacks are a crime in most countries. Keep logs and timestamps if you want to file a police report.
What usually doesn't help
Community-reported, from forum threads and admin experience:
- "Anti-DDoS" Lua or JavaScript resources. They run after the traffic has arrived.
- Banning IPs in
server.cfgor a script. Floods come from many, often spoofed, addresses. - Changing the game port. Attackers scan or simply flood the whole IP.
- Blocking ping (ICMP). It hides nothing that matters.
- Cloudflare in front of the connect endpoint only. Useful for the HTTPS part, but the game UDP still goes to your origin unless a server proxy handles it.
- Paying for "booter protection" from unknown sellers.
If nothing works
If attacks continue after you have network filtering, a proxy and a locked-down origin, collect:
- dates, times and duration of each attack,
- what the host's graphs show (packets per second and bandwidth),
- your
sv_endpoints,sv_proxyIPRangesand listing convars (with real IPs removed), - whether the origin IP has changed since the proxy was set up,
- the console output during the attack.
Bring this to your host or protection provider first. For questions about the FiveM side of the proxy setup, post in the Server Support category on forum.cfx.re. Do not post your origin IP publicly.
Frequently asked questions
What is the best FiveM DDoS protection?
There is no single product. What works is network-level filtering that understands UDP game traffic, ideally a TCP/UDP proxy in front of FXServer, and an origin server whose IP is hidden and firewalled to accept traffic only from that proxy.
Does a FiveM DDoS protection script work?
No. A resource runs inside FXServer, after traffic has crossed your network. If the line is full, no script can help.
Can Cloudflare protect a FiveM server?
Only the HTTPS connect part, as the official proxy docs describe. Game traffic is UDP and needs a server proxy or filtering that handles UDP.
What does sv_forceIndirectListing do?
According to the official docs, it stops the server list from showing your server's real IP. Use it together with sv_listingHostOverride and sv_endpoints when you run a proxy.
My server IP leaked. What should I do?
Set up filtering or a proxy first, then move the origin to a new IP that has never been public, firewall it to accept game traffic only from the proxy, and check DNS, the listing and other services for new leaks.
What happened to the users.cfx.re URL?
Cfx.re deprecated the *.users.cfx.re reverse proxy on 31 March 2026. Join links still work; HTTPS access to server endpoints now needs direct ip:port or your own reverse proxy.
FiveM.tools was founded with sponsorship from Nyru.