Menu
 

Project Zomboid Server Ports: Forwarding, CGNAT & Firewall (2026)

Project Zomboid Server Ports — The Definitive 2026 Guide

Project Zomboid uses two UDP ports: 16261 for the game traffic and 16262 for Steam authentication relay. If your friends can see the server in the browser but can't actually connect, the issue is almost always one of these ports being blocked at your router, by a firewall, or by your ISP's CGNAT. This guide walks through every layer.

The two-port quick check: Default UDP 16261 (game) and UDP 16262 (Steam). Both must be open to inbound traffic from the WAN. TCP is not used.

1. Default Ports and What They Do

PortProtocolPurposeDirection
16261UDPProject Zomboid game data (movement, chunks, chat)Inbound from clients
16262UDPSteam authentication relayInbound from clients
27015 (RCON)TCPRCON admin console (optional)Inbound from admin only — keep firewalled to your IP

You can change the game port in servertest.ini with DefaultPort=. Steam's relay port is set with UDPPort=. Don't change them unless you understand the implications.

2. Linux Firewall (ufw / iptables)

UFW (Ubuntu / Debian)

sudo ufw allow 16261/udp sudo ufw allow 16262/udp # RCON only from your office IP: sudo ufw allow from 198.51.100.42 to any port 27015 proto tcp sudo ufw reload

iptables (raw)

sudo iptables -A INPUT -p udp --dport 16261 -j ACCEPT sudo iptables -A INPUT -p udp --dport 16262 -j ACCEPT # Persist: sudo apt install -y iptables-persistent sudo netfilter-persistent save

firewalld (CentOS / RHEL / Rocky)

sudo firewall-cmd --permanent --add-port=16261/udp sudo firewall-cmd --permanent --add-port=16262/udp sudo firewall-cmd --reload

3. Windows Firewall

For self-hosted Windows dedicated servers:

  1. Open Windows Defender Firewall with Advanced Security (search "wf.msc" in Start).
  2. Click Inbound Rules → New Rule → Port.
  3. Pick UDP, enter 16261, 16262 in "Specific local ports."
  4. Allow the connection. Apply to Domain, Private, Public.
  5. Name it "Project Zomboid Server" and save.

If Windows Defender is silently dropping packets, also check the Inbound rule under "Java(TM) Platform SE binary" and confirm it's set to Allow.

4. Router Port Forwarding

Forwards inbound WAN traffic on UDP 16261-16262 to the LAN IP of your server machine. The exact menu varies by router brand:

Router brandPath to port forward
ASUSWAN → Virtual Server / Port Forwarding
TP-LinkAdvanced → NAT Forwarding → Virtual Servers
NetgearDynamic DNS → Port Forwarding/Triggering
LinksysSecurity → Apps and Gaming → Single Port Forwarding
OpenWRTNetwork → Firewall → Port Forwards
UniFiSettings → Routing → Port Forwarding

Router Forward Recipe

  1. Set the LAN IP of your server machine to a static reservation (DHCP-reserve) so it doesn't change.
  2. Add a port-forward rule: External UDP 16261 → Internal <server-LAN-IP>:16261.
  3. Add a second rule: External UDP 16262 → Internal <server-LAN-IP>:16262.
  4. Save and reboot router if the brand requires it.

5. CGNAT (Carrier-Grade NAT) — The Hidden Killer

If your ISP put you behind CGNAT, you don't have a public IP — incoming connections from the internet can never reach your machine. This is increasingly common on:

  • Mobile/cellular gateways (5G home internet)
  • Some cable ISPs in dense urban deployments
  • Many fiber providers in EU regions
  • All Starlink connections by default

How to Tell if You're on CGNAT

  1. Check your router's WAN IP. If it's in 100.64.0.0/10, that's a CGNAT range.
  2. Compare your router's WAN IP to whatismyip.com. If they don't match, your traffic is being NAT'd by the ISP — that's CGNAT.

Fixes

  • Ask your ISP for a public IPv4. Some will give it free, some charge $5-15/mo.
  • Use a VPN/tunnel with a public endpoint — Tailscale Funnel, Cloudflare Tunnel, or a $5/mo Hetzner/DigitalOcean droplet with a wireguard tunnel.
  • Move to managed hosting. Datacenter IPs are always public. Supercraft PZ hosting from $5.99/mo with public IP included on every plan.

6. Test the Ports Are Actually Open

From outside your network (use a friend's connection or a VPS):

nmap -sU -p 16261,16262 your.server.ip # Expected: 16261/udp open unknown # 16262/udp open unknown

UDP scanning is unreliable (no handshake by default), but if both show filtered instead of open, your ports are blocked. nmap -sU -sV is more reliable for service detection but slower.

7. Steam Server Browser Lookup

If your server name shows in PZ's "Public Servers" but no one can join, the broadcast (UDP 16262 Steam relay) is working but the game port (UDP 16261) is blocked. Re-check your router and OS firewall — most often this is a Windows Defender issue or a router rule that only forwarded one of the two ports.

8. Multi-Server Hosts (Different Ports per Server)

Running two PZ servers on the same machine? Each needs its own pair of ports. Convention:

  • Server 1: UDP 16261 + 16262
  • Server 2: UDP 16271 + 16272
  • Server 3: UDP 16281 + 16282

Update DefaultPort= and UDPPort= in each server's .ini. Update firewall and router rules to forward all of them.

Common Mistakes

  • Forwarding TCP instead of UDP. PZ uses UDP. TCP forwards do nothing.
  • Forwarding only 16261. The Steam relay (16262) is what makes the server appear in the public browser.
  • Forgetting to set a static LAN IP. DHCP-assigned IPs change; your forward rule then points to nothing.
  • Double-NAT setups. Some ISPs hand you a router-modem combo; if you put your own router behind it, you have two NAT layers and need to forward at both.
  • Hairpin NAT issues. Some routers can't connect from inside the LAN to the WAN IP of the same network. Use the LAN IP when testing locally.

Related Project Zomboid Guides

Skip the port-forwarding nightmare? Managed PZ servers from $5.99/mo — public datacenter IP, ports pre-configured, DDoS protection, no router config, no CGNAT issues. 2-day money-back.

Tired of fighting this issue every patch?

Run a managed Project Zomboid server with us — we handle the patches, mod-version pinning, save backups, and DDoS protection. Set up in 3 minutes, 5 datacenter regions, no contract.

See Project Zomboid hosting plans →
Top