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
| Port | Protocol | Purpose | Direction |
|---|---|---|---|
| 16261 | UDP | Project Zomboid game data (movement, chunks, chat) | Inbound from clients |
| 16262 | UDP | Steam authentication relay | Inbound from clients |
| 27015 (RCON) | TCP | RCON 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)
iptables (raw)
firewalld (CentOS / RHEL / Rocky)
3. Windows Firewall
For self-hosted Windows dedicated servers:
- Open Windows Defender Firewall with Advanced Security (search "wf.msc" in Start).
- Click Inbound Rules → New Rule → Port.
- Pick UDP, enter
16261, 16262in "Specific local ports." - Allow the connection. Apply to Domain, Private, Public.
- 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 brand | Path to port forward |
|---|---|
| ASUS | WAN → Virtual Server / Port Forwarding |
| TP-Link | Advanced → NAT Forwarding → Virtual Servers |
| Netgear | Dynamic DNS → Port Forwarding/Triggering |
| Linksys | Security → Apps and Gaming → Single Port Forwarding |
| OpenWRT | Network → Firewall → Port Forwards |
| UniFi | Settings → Routing → Port Forwarding |
Router Forward Recipe
- Set the LAN IP of your server machine to a static reservation (DHCP-reserve) so it doesn't change.
- Add a port-forward rule: External UDP 16261 → Internal <server-LAN-IP>:16261.
- Add a second rule: External UDP 16262 → Internal <server-LAN-IP>:16262.
- 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
- Check your router's WAN IP. If it's in
100.64.0.0/10, that's a CGNAT range. - 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):
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
- Project Zomboid Dedicated Server Setup Guide
- How to Make a Project Zomboid Server
- Server Stuck on Initializing
- Server Memory & RAM Guide
- All Server Settings
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.