Factorio Can't Connect to Server? Fix Network Errors (2026)

Factorio can't connect to server or says "Could not establish network communication with server"? Fix UDP 34197, firewalls, router NAT and versions.

Updated Sep 30, 2026 · 5 min read

On this page

If Factorio can't connect to a server and shows "Could not establish network communication with server", the server's UDP port is not reachable: port 34197 is not forwarded, it was forwarded as TCP, a firewall blocks it, or the router scrambles the port. Other failures, like a version or mod mismatch, show their own message. This guide covers the network errors first, then the rest.

Quick fix

  1. Make sure the server is running and the console shows it is hosting the game.
  2. Check the address: IP plus port, for example 203.0.113.10:34197.
  3. Self hosting? Forward UDP 34197 (not TCP) to the server and allow it through the firewall.
  4. Test from outside your own network, not from the server's LAN using the public IP.
  5. If it still fails, check the router is not randomising the outgoing UDP source port.

What the messages mean

Message Most likely cause
"Could not establish network communication with server" UDP 34197 blocked, not forwarded, wrong IP, or server offline
Timed out while connecting Same as above, or a router changing the UDP port
"Version mismatch detected!" Your game and the server are on different versions
"Mods mismatch detected!" A mod version differs, use Sync mods with server
Wrong password The server has a game_password set
Connection drops during map download Unstable connection or a very large map on a slow upload

For the version errors, see our Factorio version mismatch fix.

Check 1: Is the server running and listening?

The headless server writes to its console when it starts hosting. If you run it by hand on Linux and closed the terminal, the server stopped with it, unless you used screen, tmux or a systemd service. Also check the port it listens on: the default is 34197, but --port in the launch command or port in config.ini can change it.

Check 2: The address

Friends need your public IP, which you find by searching "what is my IP". Local addresses like 192.168.x.x only work inside your own home. If the server runs on a port other than 34197, include it after a colon.

Check 3: UDP 34197, not TCP

Factorio game traffic is UDP only. A TCP rule looks right in the router and does nothing.

  1. Router: forward UDP 34197 to the server's local IP. Give that PC a DHCP reservation so the address does not change.
  2. Windows firewall: allow Factorio, or add an inbound rule for UDP 34197 in Windows Defender Firewall with Advanced Security.
  3. Linux firewall:
sudo ufw allow 34197/udp

Online port checkers only test TCP, so they report UDP ports as closed even when they work. The real test is a friend connecting. Our port forwarding guide walks through routers step by step.

Check 4: Test from outside

Many routers do not support connecting to their own public IP from inside the network. The host trying their own public address fails even when everything is fine. Test with a friend, or a laptop on a phone hotspot. On the same network, connect with the local IP instead.

Check 5: UDP source port randomisation

The Factorio wiki calls out routers that randomise the source port on packets going out from 34197. The server answers from a different port than the player expects, and the connection never completes. On business routers and firewalls like pfSense, set a static port mapping for outbound NAT on the server's address. Home routers rarely expose this, and if yours does it, a hosted server or a different router is often the practical fix.

Check 6: CGNAT

If your router's WAN address is different from the public IP you see online, or starts with 100.64 to 100.127, your ISP uses CGNAT. You share a public IP with other customers and cannot forward ports at all. Options are asking your ISP for a public IP, using a VPN style tunnel service, or hosting the server somewhere else.

Check 7: Antivirus and VPNs

Some antivirus suites include their own firewall that blocks UDP silently. Temporarily disable it to test, then add an exception. Players on a VPN should turn it off while testing too.

Check 8: IPv6 addresses

If you gave friends an IPv6 address, wrap it in brackets with the port after, like [2001:db8::1]:34197. Players without IPv6 on their connection cannot reach it at all, so an IPv4 address is the safer choice.

When the map download fails

Factorio sends the whole save to each player as they join. On a large map and a slow home upload, the download can time out or take minutes. Lowering the save size is hard late game, so the real fixes are a faster upload or a server with a proper data center connection.

Skip the networking

Every check from 3 to 6 is about getting through a home router. A Factorio server from GamezServers has its own address on dedicated hardware in a data center, so there is no port to forward, no CGNAT and no home upload speed limiting map downloads. It is online in about a minute, see how to host a Factorio server.

FAQ

What port does a Factorio server use?

UDP 34197 by default. No TCP ports are needed for playing.

Why can I connect locally but my friends cannot?

The port is not forwarded, is forwarded as TCP, or your ISP uses CGNAT. Local connections skip the router entirely.

Do I need to forward ports to join someone else's server?

No. Only the person hosting a server at home needs to forward ports.

Can I test a Factorio server port online?

Most online checkers only test TCP, so they cannot confirm UDP 34197. Ask a friend outside your network to connect.

Skip the setup. Your Factorio server, live in 60 seconds.

Plans first month from $2.49. No command line, cancel any time.

Deploy Factorio

Keep reading