Reference · Copy-paste ready

Game Server Port Reference

Every port you need to open for every game we cover, with ready-to-paste ufw, iptables, and Windows Firewall commands. Bookmark this page — you'll come back to it.

Rust

Rust uses a single UDP port for gameplay and an optional RCON port. The query port for the server browser is gameport + 1 unless overridden.

PortProtocolPurposeNotes
28015UDPGame trafficDefault; change via +server.port
28016UDPServer query (A2S_INFO)Auto-opened by server; Steam master list uses this
28017TCPRCON + WebSocketOptional; set via +rcon.port. Use only over VPN or bind to localhost.
28082TCPApp server (Rust+ companion)Only if using Rust+ mobile app integration

Minecraft (Java & Bedrock)

Java Edition defaults to TCP 25565. Bedrock uses UDP 19132. Query and RCON are optional but common.

PortProtocolPurposeNotes
25565TCPMinecraft Java EditionDefault; set via server-port in server.properties
25575TCPRCON (Java)Enable via enable-rcon=true; password required
25565UDPQuery protocol (Java)Enable via enable-query=true; used by server listings
19132UDPMinecraft Bedrock (IPv4)Default; set via server-port in Bedrock config
19133UDPMinecraft Bedrock (IPv6)Default; set via server-portv6

ARK: Survival Evolved & ARK: Survival Ascended

ARK requires three UDP ports per instance: game, Steam query, and RCON (TCP). Clusters need all three per map.

PortProtocolPurposeNotes
7777UDPGame trafficDefault; set via ?Port= launch arg
7778UDPRaw UDP socketAlways gameport + 1; must be open even if unused
27015UDPSteam querySet via ?QueryPort=; required for server browser
32330TCPRCONSet via ?RCONPort=; enable ?RCONEnabled=True

Counter-Strike 2 (CS2)

CS2 uses a single UDP port for gameplay and SourceTV. TCP RCON is optional. Multiple instances increment the base port.

PortProtocolPurposeNotes
27015UDPGame trafficDefault; set via -port launch arg
27015TCPRCONSet rcon_password in server.cfg; only expose over VPN
27020UDPSourceTV / HLTVSet via +tv_port; only if broadcasting
27005UDPClient-side outboundNot server-side; listed for completeness

Team Fortress 2 (TF2)

Identical port layout to CS2 — both are Source engine. TF2 also needs HTTP for FastDL if self-hosting assets.

PortProtocolPurposeNotes
27015UDPGame trafficDefault; set via -port
27015TCPRCONRequires rcon_password in server.cfg
27020UDPSourceTVOptional; set via +tv_port
80 / 443TCPFastDL (HTTP / HTTPS)Only if self-hosting maps/sounds via nginx. See our FastDL guide.

FiveM & RedM

FiveM and RedM (Cfx.re) use a single TCP/UDP pair. TCP handles HTTP endpoints; UDP handles game traffic. txAdmin runs on its own TCP port.

PortProtocolPurposeNotes
30120TCP + UDPGame + HTTP endpointsDefault; set via endpoint_add_tcp and endpoint_add_udp in server.cfg. Both protocols required.
40120TCPtxAdmin web panelDefault; change in txData config. Restrict access via Nginx + basic auth.
30130TCP + UDPSecond server instanceOnly if running multiple servers; increment by 10

Valheim

Valheim uses three consecutive UDP ports starting from your configured base. All three must be open.

PortProtocolPurposeNotes
2456UDPGame trafficDefault; set via -port launch arg
2457UDPCommunicationAlways gameport + 1; auto-opened by server
2458UDPSteam queryAlways gameport + 2; required for server listing

Palworld

Palworld dedicated servers use a single UDP port. RCON support was added in 0.2.x and requires a separate TCP port.

PortProtocolPurposeNotes
8211UDPGame trafficDefault; set via -port= launch arg
25575TCPRCONSet RCONEnabled=True and RCONPort= in PalWorldSettings.ini

Admin Panels & Infrastructure

Ports used by the server panels and tools we cover. Lock these behind a VPN or Nginx + basic auth — never expose to the public internet.

PortProtocolPurposeNotes
22TCPSSHChange to a high port and use key-only auth. Disable root login.
80 / 443TCPHTTP / HTTPSFor Pterodactyl, Pelican, AMP web UIs, or FastDL. Terminate TLS via Nginx.
8080TCPPterodactyl Wings / Pelican daemonWings API; proxy via Nginx with TLS. Never expose raw.
2022TCPPterodactyl SFTPUsed by the game-file SFTP interface built into Wings/Pelican
8443TCPAMP web UI (default)CubeCoders AMP panel; change in AMPConfig.conf
3306TCPMySQL / MariaDBBind to 127.0.0.1 only. Never expose to the internet.

// Firewall Command Reference

Copy-paste commands for the three firewalls you'll actually use. Replace PORT with your real port number.

# Check status
sudo ufw status verbose

# Open a single UDP port (e.g. Rust game port)
sudo ufw allow 28015/udp

# Open a single TCP port (e.g. Minecraft Java)
sudo ufw allow 25565/tcp

# Open a port range (e.g. ARK cluster)
sudo ufw allow 7777:7780/udp

# Open TCP + UDP on the same port (e.g. FiveM)
sudo ufw allow 30120/tcp
sudo ufw allow 30120/udp

# Restrict a port to your IP only (best for RCON)
sudo ufw allow from YOUR.HOME.IP.HERE to any port 28017 proto tcp

# Remove a rule
sudo ufw delete allow 28015/udp

# Enable UFW (only after you've added SSH!)
sudo ufw allow 22/tcp
sudo ufw enable
# Check current rules
sudo iptables -L -n -v

# Allow a single UDP port
sudo iptables -A INPUT -p udp --dport 28015 -j ACCEPT

# Allow a single TCP port
sudo iptables -A INPUT -p tcp --dport 25565 -j ACCEPT

# Allow a range
sudo iptables -A INPUT -p udp --dport 7777:7780 -j ACCEPT

# Allow RCON only from your home IP
sudo iptables -A INPUT -p tcp -s YOUR.HOME.IP.HERE --dport 28017 -j ACCEPT

# Save rules (Debian/Ubuntu - needs iptables-persistent)
sudo apt install iptables-persistent
sudo netfilter-persistent save

# Delete a rule (use same spec as when added, replace -A with -D)
sudo iptables -D INPUT -p udp --dport 28015 -j ACCEPT
# Check status
sudo firewall-cmd --state
sudo firewall-cmd --list-all

# Open a single UDP port (permanent + live)
sudo firewall-cmd --permanent --add-port=28015/udp
sudo firewall-cmd --reload

# Open a TCP port
sudo firewall-cmd --permanent --add-port=25565/tcp
sudo firewall-cmd --reload

# Open a range
sudo firewall-cmd --permanent --add-port=7777-7780/udp
sudo firewall-cmd --reload

# Restrict RCON to your IP via rich rule
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="YOUR.HOME.IP.HERE" port port="28017" protocol="tcp" accept'
sudo firewall-cmd --reload

# Remove a port
sudo firewall-cmd --permanent --remove-port=28015/udp
sudo firewall-cmd --reload
# Run PowerShell as Administrator

# Allow inbound UDP on a single port
New-NetFirewallRule -DisplayName "Rust Game UDP 28015" -Direction Inbound -Protocol UDP -LocalPort 28015 -Action Allow

# Allow inbound TCP
New-NetFirewallRule -DisplayName "Minecraft Java TCP 25565" -Direction Inbound -Protocol TCP -LocalPort 25565 -Action Allow

# Allow a port range
New-NetFirewallRule -DisplayName "ARK Cluster 7777-7780" -Direction Inbound -Protocol UDP -LocalPort 7777-7780 -Action Allow

# Restrict RCON by remote IP
New-NetFirewallRule -DisplayName "RCON from home" -Direction Inbound -Protocol TCP -LocalPort 28017 -RemoteAddress YOUR.HOME.IP.HERE -Action Allow

# List rules for a game
Get-NetFirewallRule -DisplayName "*Rust*" | Format-Table DisplayName, Enabled, Direction, Action

# Remove a rule
Remove-NetFirewallRule -DisplayName "Rust Game UDP 28015"
Security

Never expose RCON, MySQL, SSH on port 22, or admin panel ports directly to the internet. Put them behind a VPN (WireGuard is easy), an SSH tunnel, or Nginx with basic auth and a TLS cert. Your VPS provider's cloud firewall is only a first line of defense — always configure ufw/iptables/firewalld on the server itself.

// Related Tools & Guides