A FiveM server is reachable only if its game port is open for both TCP and UDP. This tool produces the system firewall commands; also remember your host's firewall and your router's port forwarding.
How to use the tool
Choose Linux (ufw) or Windows (netsh).
Enter the game port matching server.cfg (endpoint_add_tcp / endpoint_add_udp).
Enable txAdmin or RCON only if you use them; they are restricted to your IP.
Run the commands as administrator (or with sudo), then test from an outside network.
Default values
30120 is the example port in the FiveM documentation; 40120 is txAdmin's usual port; 29200 is the RCON port on Enhanced per Cfx.re. If you change a port in server.cfg or txAdmin, adapt the rules.
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udpFrequently asked questions
- Why both TCP and UDP?
- server.cfg declares a TCP endpoint and a UDP endpoint on the same port number; both must be reachable.
- Is my host's firewall enough?
- No: at OVH, Hetzner, Scaleway and the like, open the port both in their firewall / security group and in the system firewall if it is active.
