PZ Port Forwarding: Ditch Lag, Keep Zombies Out
Quick Answer
Yes – if you want friends to join your Project Zomboid game, you'll need to open UDP port 16261 on your router (and ideally UDP port 16262 as well). Without proper port forwarding, external players cannot connect to your server or will experience lag due to Steam relay fallbacks.
Table of Contents
Introduction: Why Port Forward?
When you host a Project Zomboid game, your PC acts as a server. By default, your router blocks outside traffic from reaching that server for security reasons. Port forwarding punches a hole through your router's defenses for specific network ports, allowing your friends (or anyone you invite) to connect to your Project Zomboid server from the internet.
Without forwarding the correct ports, players won't be able to join – or they'll be forced through slower relay connections. If you're planning to run a more permanent server setup, you'll also want to check out our comprehensive server administration guide for advanced configuration tips. Let's get your ports open and your server thriving!
Quick-Start: Five Steps to Multiplayer
-
1Find Your Server's Local IP: On the PC hosting the game, find its LAN IP address. On Windows, press Win+R, type cmd, then run
ipconfig
. Look for the IPv4 address (e.g., 192.168.1.100). This is the address your router will forward ports to. -
2Log Into Your Router: Open a web browser and enter your router's gateway IP (common ones are 192.168.1.1 or 192.168.0.1). Sign in with admin credentials. (If unsure, check your router's label or manual for the login URL, username, and password.)
-
3Create Port Forward Rules: In your router's settings, locate Port Forwarding (sometimes under "Advanced" or "NAT/PAT"). Add new rules forwarding:
- Port 16261 UDP to your PC's IPv4 address (main game port)
- Port 16262 UDP to the same IP (player connections)
- (Optional) Forward UDP 8766 for server listing visibility
- Set Protocol to UDP (or "Both/UDP+TCP" if that's your only option)
-
4Open Firewall & Launch Server: Ensure your PC's firewall isn't blocking the game. The first time you host, Windows may prompt "Allow access" – choose Allow on private/home networks. Start your Project Zomboid server (either "Host" in-game or launch the dedicated server).
-
5Test the Connection: Have a friend try to join using your public IP + port (find your public IP on icanhazip.com). Alternatively, use the Steam "Invite Friend" feature if hosting via the game's Host button.
A Note on Build 42 Unstable (B42)
At the time of writing (2025-06-24), Build 42's multiplayer is disabled during testing. If you're on the B42 unstable branch, you cannot host or join MP games yet. Stick to Build 41 for multiplayer. For more details on switching between builds and understanding the differences, check out our Build 41 vs 42 server guide. Once B42 MP is enabled (likely with similar port requirements as B41), you'll use the same port forwarding steps described here.
Understanding Project Zomboid Networking (B41 Basics)
Before messing with router settings, it helps to know which ports Project Zomboid uses and why. Here's a quick breakdown:
Key Takeaway: UDP 16261 is non-negotiable – it's the main artery of your server. UDP 16262 is highly recommended for smooth direct connections (especially for co-op games). Everything else is situational.
Steam Relay vs. Direct Connection
Project Zomboid uses Steam's networking to simplify co-op. If ports aren't properly forwarded, the game will attempt to use Steam's relay service as a fallback. While this often works for small co-op sessions, it can introduce higher latency and bandwidth limitations.
The game prefers direct UDP connections to your machine if available. If it can't reach you directly (no port forwarded), you'll see the "port 16262 closed" warning on the client side.
Think of Steam Relay as a helpful backup – it can punch through some firewalls automatically, but if you want optimal performance, or if you're running a persistent server, setting up port forwarding is worth the few minutes of effort.
Setting Up Port Forwarding on Your Router
1. Reserve or Set a Static Local IP
Before creating forwarding rules, ensure your host computer's local IP stays constant. By default, your router's DHCP may change your PC's IP over time. If that happens, the port rule would point to the wrong device.
You have two options:
- Reserve an IP in the router's DHCP settings: Most routers allow mapping a specific IP to your PC's MAC address (often under "DHCP Reservation" menu).
- Set a static IP on your PC: Manually assign an IP in your computer's network adapter settings (make sure it's in the same subnet as the router).
Tip: Use an IP outside the typical DHCP range if setting it on your PC. For example, if your router hands out 192.168.1.100–150, choose .160 for static. This avoids potential conflicts.
2. Access the Router's Port Forwarding Menu
Log in to your router's web interface (usually by navigating to its local IP in a browser). Once you're in, find the section for Port Forwarding. This might be under:
- Advanced Settings > Port Forwarding/Port Triggering (common on Netgear).
- Firewall > Virtual Servers (on some TP-Link and D-Link models).
- NAT > Port Forwarding (on some ASUS, often under WAN settings).
- A dedicated Port Forwarding tab or menu.
Add a new port forward rule and you'll typically need to input:
- Service Name: Description – e.g., "Project Zomboid Server"
- Port Range: External/Internal – e.g., start 16261, end 16261
- Protocol: Choose UDP (or "UDP/TCP" or "Both" if UDP-only isn't an option)
- Internal IP: The local IP of your server PC (e.g., 192.168.1.100)
Router UI Example: Port forwarding settings on a typical router interface.
Service Name | Project Zomboid |
External Port | 16261-16262 |
Internal Port | [blank = same as external] |
Protocol | UDP |
Internal IP | 192.168.1.100 |
After adding, save/apply the changes. Your router may require a reboot for rules to take effect.
3. Verify the Ports Are Open
With rules in place and your server running, you can test if your port is reachable using an online port checker tool. However, many online tools don't check UDP ports reliably.
The best test is to have a friend attempt to connect, or use the Steam "Add Server by IP" function.
Brand-Specific Port Forwarding Tips
Netgear
Go to Advanced > Advanced Setup > Port Forwarding/Port Triggering. Ensure "Port Forwarding" is selected (not triggering), then Add Custom Service. Input name, choose UDP, and set the ports.
TP-Link
Look under Forwarding > Virtual Servers in the web interface. Click "Add New". Enter the external port (or range), internal port, and your device's IP. Choose UDP protocol.
ASUS
Go to Advanced Settings > WAN > Virtual Server/Port Forwarding. Enable port forwarding if there's a master switch. Add a new line with your description, local IP, protocol (UDP), and ports.
Security Note: Only forward the ports you need, and avoid using DMZ on your gaming PC if possible. Forwarding just 16261/16262 UDP greatly limits exposure compared to opening all ports.
Configuring Firewalls & Antivirus
Even after you've convinced your router to let players in, local firewalls on the host PC can slam the door shut. You need to allow Project Zomboid server traffic through your computer's firewall.
Windows Firewall (Defender)
When you first run a Project Zomboid server, Windows should pop up a dialog asking you to allow the app through the firewall. Click "Allow Access" and ensure at least the Private network box is checked.
If that dialog never appeared, you may have to set rules manually:
- Open Windows Firewall with Advanced Security (search "Firewall" in start menu)
- Go to Inbound Rules, and click "New Rule…"
- Choose Port. Select UDP and enter 16261-16262 as Specific Ports
- Allow the connection. Select the network profiles (Private/Home is most important)
- Give it a name like "PZ Server UDP Ports" and finish
To verify Windows Firewall isn't the culprit, you can temporarily turn it off as a test. If players can suddenly connect with firewall off, you missed a rule.
Important: Always turn the firewall back on after testing and configure it properly!
Linux Firewall (ufw/iptables)
On Linux, if you're running a dedicated server, you'll need to allow the ports via your firewall settings:
On headless servers, also ensure any cloud provider firewall (like AWS security groups, Azure NSGs) have these UDP ports open.
Antivirus / Third-Party Suites
If you use a third-party antivirus or internet security suite (Norton, McAfee, etc.), they sometimes have their own firewalls. Make sure to allow the Project Zomboid server through those as well.
Running Co-op vs. Dedicated Servers
Project Zomboid offers two multiplayer hosting methods, and it's useful to understand how port forwarding applies to each:
In-Game Co-op (Host menu)
This is the casual way to play with friends. You launch Project Zomboid, click Host, and configure a server.
- Steam Integration: Co-op games use Steam invites and can leverage Steam's networking.
- Port Forwarding: Still uses port 16261. If not forwarded, Steam's relay might help but with higher lag.
- Inviting Friends: Hit Esc to open the pause menu and click Invite Friends.
- Stopping Co-op: Simply exit to the main menu and the server shuts down.
Dedicated Server (separate application)
For hosting a server that runs even when you're not playing, or to host more players.
- Setup: Install via Steam (Tools > Project Zomboid Dedicated Server) or via SteamCMD.
- Port Forwarding: Same ports needed. Configure in ServerOptions.ini.
- Public vs. Private: Can be listed publicly or require direct IP connection.
- Multiple Servers: Can run several instances by using different port ranges.
- Advanced Configuration: For detailed server setup, mod management, and performance optimization, check our complete server admin guide.
Player Limits: Port forwarding itself doesn't limit player count – but your bandwidth and CPU do. If you forward ports 16262–16270 UDP (for ~10 players), you're simply future-proofing. The ports won't be used unless needed.
Troubleshooting Common Issues
My friend still can't connect, or the port checker says closed!
Double-check the basics:
- Is the server running when testing the port? The port will only appear open while the game server is active.
- Did you forward to the correct local IP? Verify the host PC's IPv4 and the router's rule match.
- Protocol correct? It must be UDP. Many router interfaces default to TCP.
- Try rebooting your router after setting up the rules.
We get 'Failed to connect' after a long pause
This often indicates the connection attempt is not hitting your server at all. It's likely a port or firewall issue. If it fails instantly with no pause, it might be a wrong IP or wrong password. If it hangs for a while then fails: usually networking.
Check the server console – do you see any connection attempts? If nothing appears, the traffic isn't reaching the server. For more detailed troubleshooting of server-side issues, see our server administration guide.
"Server has port 16262 closed, performance may be severely affected"
This message means your port 16262 UDP isn't open to the client. Solution: forward UDP 16262 as well as 16261.
If you did forward it, a firewall might be blocking it still. Or, occasionally, the client might erroneously think it's closed when it's not – but if gameplay is smooth, you can ignore it.
Also, if you connect using "Use Steam Relay", the game will always show this warning by design (since you explicitly went around direct connect).
I have two routers (or a modem+router) – how do I deal with that?
This is the double NAT scenario. You must forward ports in both devices:
- On the ISP router: forward 16261–16262 UDP to the WAN IP of your second router.
- On your own router: forward 16261–16262 UDP to your PC as usual.
A simpler approach is to eliminate one layer: If possible, put the ISP router into bridge mode.
Advanced Tips & Tools
Dynamic DNS
Services like No-IP can give your server a memorable name. Instead of "join 123.45.67.89:16261", you can say "join myserver.ddns.net:16261". Perfect if your IP changes frequently.
Logging & Console
Keep an eye on the server console while players connect. It provides useful info: who connected, any errors, etc. You can also enable detailed logging in the server settings.
RCON Administration
If you forward TCP 27015 and set an RCON password in ServerOptions.ini, you can use an RCON tool to remotely issue server commands without being in-game.
Backups
Regularly back up your save! Port forwarding won't protect you from a buggy mod ruining the map or a power outage corrupting a save. Copy the Zomboid/Saves/Multiplayer/<servername> folder somewhere safe.