Configuring Firewall Rules for Game Servers

Configuring Firewall Rules for Game Servers

Each game server uses specific ports. You must open these in your firewall for players to connect.

Quick Port Reference

GamePorts to OpenProtocol
Minecraft Java25565TCP
Minecraft Bedrock19132UDP
CS2 / CS:GO27015, 27020TCP+UDP
Rust28015, 28016TCP+UDP
Valheim2456, 2457UDP
ARK7777, 7778, 27015UDP
7 Days to Die26900–26902TCP+UDP
FiveM30120TCP+UDP
Project Zomboid16261, 16262UDP
Palworld8211UDP+TCP
Terraria7777TCP
V Rising9876, 9877UDP
Garry's Mod27015, 27005TCP+UDP
Team Fortress 227015, 27020TCP+UDP

Opening Ports with UFW

# Open a TCP port:
ufw allow 25565/tcp

# Open a UDP port:
ufw allow 2456/udp

# Open both protocols:
ufw allow 27015

# View all rules:
ufw status numbered

Verify Ports are Open (from an External Machine)

nmap -p 25565 YOUR_SERVER_IP

Look for 25565/tcp open in the output. If it shows filtered, the firewall is blocking it.

Understanding UDP vs TCP

  • TCP: Reliable, ordered delivery — used for game control, RCON, file transfers
  • UDP: Fast, low-latency — used for real-time game state updates (player positions, combat)
  • 0 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

Setting Up a Minecraft Java Server

Setting Up a Minecraft Java Server Deploy a Minecraft Java Edition server on your dedicated...

Setting Up a CS2 Dedicated Server

Setting Up a Counter-Strike 2 Dedicated Server Deploy a CS2 server using SteamCMD on your...

Managing Game Servers with LinuxGSM

Managing Game Servers with LinuxGSM LinuxGSM (Linux Game Server Manager) simplifies installation...

Setting Up a Rust Dedicated Server

Setting Up a Rust Dedicated Server Step 1 — Install SteamCMD add-apt-repository multiverse -y...

Setting Up a Valheim Dedicated Server

Setting Up a Valheim Dedicated Server Step 1 — Install SteamCMD add-apt-repository multiverse...