Skip to content
Multigaming

Documentation: Firewall rules generator

Firewall rules generator for game servers: enter ports (25565/tcp, 2456-2458/udp, 30120), add a game's ports in one click, optionally restrict to a source IP and get a ufw, iptables, nftables (full /etc/nftables.conf) or Windows netsh advfirewall script. The SSH port is kept so you don't lock yourself out.

Last updated: 10/9/2026

Open the tool

A well-configured firewall opens only the game and administration ports. This tool writes the commands for you for ufw, iptables, nftables or Windows, from a simple port list.

How to use the tool

  1. Choose the firewall: ufw (Ubuntu/Debian), iptables, nftables or Windows netsh.

  2. Enter your ports (one per line, with protocol) or add a game's ports.

  3. Check the SSH port and, if needed, restrict to a source IP (for example for RCON).

  4. Copy or download the script, read it, then run it while keeping an SSH session open.

Avoid locking yourself out

With the “default policy: deny everything” option, the script allows SSH first and then enables the firewall. If your SSH isn't on port 22, fix the field before running. Host firewalls (OVH, Hetzner, Scaleway…) and your router must also allow the same ports. With nftables, always validate the file with “nft -c -f” before applying. iptables rules here cover IPv4 only.

sudo ufw allow 22/tcp
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp
sudo ufw enable

Frequently asked questions

Should I open TCP, UDP or both?
The one the game uses: see the ports checker. Without a protocol the tool generates both TCP and UDP, which opens more than needed: specify the protocol when you know it.
Do the rules survive a reboot?
ufw and Windows do. For iptables, install iptables-persistent and run netfilter-persistent save; for nftables, enable the nftables service with /etc/nftables.conf.
Multigaming
MultigamingOpen access
Default ports for FiveM, Minecraft, Rust, DayZ, ARK, Valheim, Palworld, CS2, Arma… and a check of your list of opened ports.
PortsNetworkOpen
Documentation
Multigaming
MultigamingOpen access
Admin commands per game (Minecraft, Rust, ARK, Palworld, DayZ, CS2…) ready to copy, filled with your parameters. No network.
RCONAdministrationOpen
Documentation
Multigaming
MultigamingOpen access
Generate cron, a systemd timer or a Windows task (schtasks) with RCON player warnings before each restart.
RestartSchedulingOpen
Documentation
Multigaming
MultigamingOpen access
Estimate a game server's CPU, RAM, disk and bandwidth from slots, with visible formulas and editable assumptions.
SizingCostOpen
Documentation
Multigaming
MultigamingSign-in required
Compare two config files (INI, CFG, JSON): line-by-line and key-by-key differences, locally in your browser.
DiffConfigurationOpen
Documentation
Multigaming
MultigamingSign-in required
Generate a bash or PowerShell backup script (tar, 7z, rsync/robocopy) with retention, service stop and a cron line.
BackupScriptsOpen
Documentation