Hardening a RedM server against DDoS: what FXServer gives you for free, and where it stops

2026-11-30来源 dev.toEnglish

Disclosure: I run FIVESHIELD, a DDoS protection service for FiveM and RedM game servers. Everything in the first four sections is free and works without us.

RedM (Red Dead Redemption 2 multiplayer) and FiveM (GTA V multiplayer) run on the same server software, FXServer. The Cfx.re setup guide turns one into the other with a single line of server.cfg:

set gamename rdr3 

Same program, same default port (30120, TCP and UDP), same connection handshake, same public server list. So every hardening setting written up for FiveM applies to RedM unchanged, and so does every attack.

What gets aimed at an FXServer

Attack What is sent Why it works
UDP flood Junk packets at the game port It fills the line. Nothing on the machine can fix a line that is already full
Connection flood Fake clients that start the join handshake and never finish it The packets are well-formed, so a packet filter sees nothing wrong
Query flood HTTP requests to /info.json, /dynamic.json and /players.json on the game port Each request costs the server more than it costs the caller

Free setting 1: sv_requestParanoia

FXServer answers those three HTTP endpoints without authentication. sv_requestParanoia is the built-in countermeasure, an integer from 0 to 3 that defaults to 0:

Level Documented behaviour
0 Off
1 Block any IP sending requests that contain a Via header
2 Also block any IP sending requests that contain an Upgrade-Insecure-Requests header
3 Also close the socket the requests were submitted on
set sv_requestParanoia 3 

Level 3 is a sensible default on a public server. The side effect is that you can no longer open /players.json in a browser, which is intended. A monitoring tool that sends neither header keeps working. It does nothing against a connection flood, because that traffic never touches those endpoints.

Free setting 2: stop listing your real IP

The server list publishes a connection address for every listed server, and by default that is your machine. The official proxy setup guide documents the settings that change it:

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" 

These only make sense once something sits in front of the server. They hide the address and filter nothing, and an IP that has been public once is already in other people's logs.

Free step 3: close the leaks

A website or a txAdmin panel on the same machine, an old DNS record, an address pasted in Discord: each one gives the IP away again. Move them, or accept that the address is known.

Free step 4: ask your host what happens under attack

Some hosts filter the traffic. Many cut the IP off the network until the flood stops, which takes the server offline as surely as the attack would. Know which one you have before the day it matters.

Where free stops

None of this gives you bandwidth, or a filter that can tell a real client from a fake one. Both have to sit upstream of the machine: by the time FXServer decides what to do with a packet, the line has already carried it. A standard web proxy such as Cloudflare's does not fill that gap for game traffic, because it carries HTTP and HTTPS and players connect over UDP.

That upstream job is what a filtering proxy that speaks the cfx.re protocol is for. Ours is described layer by layer on the FiveM anti-DDoS page, and it treats a RedM server exactly like a FiveM one. The query floods above are covered in more depth in FiveM Layer 7 attacks: players.json, info.json and sv_requestParanoia.

原文:https://www.a8q9.cn/en/article/hardening-a-redm-server-against-ddos-what-fxserver-gives-you-for-free-and-where--62fb72.html

相关文章