
Firewall rules generator
Turn a port list into ufw, iptables, nftables or Windows netsh rules for your game server.
Last updated: 10/9/2026
100% local processing — saved in your browser.
One per line: 25565/tcp, 2456-2458/udp, 30120 (TCP+UDP). Text after the port = comment.
Address or CIDR; applies to all game rules.
# Generated by games-tools.game-rank.com # Run as a sudo-capable user. Keep your SSH session open until you have tested a new one. sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow 22/tcp comment 'SSH' sudo ufw allow 30120/tcp comment 'Game 30120/tcp' sudo ufw allow 30120/udp comment 'Game 30120/udp' sudo ufw enable sudo ufw status numbered
How to use Firewall rules generator?
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.
Choose the firewall: ufw (Ubuntu/Debian), iptables, nftables or Windows netsh.
Enter your ports (one per line, with protocol) or add a game's ports.
Check the SSH port and, if needed, restrict to a source IP (for example for RCON).
Copy or download the script, read it, then run it while keeping an SSH session open.
Frequently asked questions
More Multigaming tools





