Factorio

Factorio

View Stats:
LAN port not Opening?
I started a LAN game to play with a friend, and after a couple of hours I decided to do a Sanity check and port scanned my own computer.

Factorio never bound to the port to open it. Am i missing an option in the game somewhere when trying to start the LAN server? LAN selected.
< >
Showing 1-7 of 7 comments
PunCrathod Feb 24, 2024 @ 3:19pm 
As far as I know LAN is always enabled in factorio. Maybe your firewall is blocking the port?

Also post the log file https://wiki.factorio.com/Log_file . Even if you think there is nothing useful there it might give someone a clue on what is going on or at least rule out for sure some possible issues so we don't have to guess as much.

Also if you are on windows you can use resource monitor to see what ports are opened by which programs. No need to scan ports.
Last edited by PunCrathod; Feb 24, 2024 @ 3:21pm
PanicOregon281 Feb 24, 2024 @ 3:39pm 
Interestingly reading the log, idk why i didn't bother to do this in the first place

It's actually trying to open the port, it's not the documented one for some reason tho
5825.408 Info UDPSocket.cpp:33: Opening socket at (IP ADDR:({0.0.0.0:34196})) 5825.409 Info UDPSocket.cpp:33: Opening socket at (IP ADDR:({0.0.0.0:0})) 5829.146 Info UDPSocket.cpp:233: Closing socket 5829.146 Info UDPSocket.cpp:263: Socket closed 5829.146 Info UDPSocket.cpp:233: Closing socket 5829.222 Info UDPSocket.cpp:233: Closing socket 5829.222 Info UDPSocket.cpp:263: Socket closed 5829.222 Info UDPSocket.cpp:233: Closing socket 5831.008 Info UDPSocket.cpp:33: Opening socket at (IP ADDR:({0.0.0.0:34196})) 5831.008 Info UDPSocket.cpp:33: Opening socket at (IP ADDR:({0.0.0.0:0}))
So this has to be a windows issue, I might of hardened windows too much.
PanicOregon281 Feb 24, 2024 @ 3:49pm 
wait... THAT'S EXTERNAL

Originally posted by PanicOregon281:
Interestingly reading the log, idk why i didn't bother to do this in the first place

It's actually trying to open the port, it's not the documented one for some reason tho
5825.408 Info UDPSocket.cpp:33: Opening socket at (IP ADDR:({0.0.0.0:34196})) 5825.409 Info UDPSocket.cpp:33: Opening socket at (IP ADDR:({0.0.0.0:0})) 5829.146 Info UDPSocket.cpp:233: Closing socket 5829.146 Info UDPSocket.cpp:263: Socket closed 5829.146 Info UDPSocket.cpp:233: Closing socket 5829.222 Info UDPSocket.cpp:233: Closing socket 5829.222 Info UDPSocket.cpp:263: Socket closed 5829.222 Info UDPSocket.cpp:233: Closing socket 5831.008 Info UDPSocket.cpp:33: Opening socket at (IP ADDR:({0.0.0.0:34196})) 5831.008 Info UDPSocket.cpp:33: Opening socket at (IP ADDR:({0.0.0.0:0}))
So this has to be a windows issue, I might of hardened windows too much.
ShutEye_DK Feb 24, 2024 @ 8:29pm 
LAN port? Eh?
PunCrathod Feb 25, 2024 @ 4:48am 
A silly question. You do not have a vpn enabled? Because having a vpn on blocks all LAN connections.
PanicOregon281 Feb 25, 2024 @ 2:25pm 
Originally posted by PunCrathod:
A silly question. You do not have a vpn enabled? Because having a vpn on blocks all LAN connections.
In the end, i found out the server was opening on my external IP instead of on LAN
PunCrathod Feb 25, 2024 @ 3:04pm 
Originally posted by PanicOregon281:
Originally posted by PunCrathod:
A silly question. You do not have a vpn enabled? Because having a vpn on blocks all LAN connections.
In the end, i found out the server was opening on my external IP instead of on LAN
That is not how any of this works. A windows program cannot open on an external IP unless you have two network cards one connected to the internet and the other on LAN. Which is a very abnormal setup and I doubt you have such a setup.

On a normal setup of being connected to a router all programs open on LAN. As far as the computer is concerned there is no external IP. What people sometimes call external IP is the routers IP that is facing the internet. And that IP is just another step out of many in the route a connection takes. It is the routers job to forward packets from the internet to the correct LAN IP and your computer and the programs running on it are mostly unaware this is happening.

And even then factorio by default opens ports on 0.0.0.0 which means it is open on all network interfaces.

You might be confusing the part where factorio uses remote servers to determine your "external IP" so it can advertise the server correctly in the server browser in order for people outside of your LAN to be able to connect to you. But that does not mean it opens a port on that IP. In fact it is impossible for the game to open a port on that IP as the computer the game is running on does not have that IP. That IP belongs to the router.

The game does tell the router that it wants packets for a port be forwarded using UPnP but that is not limiting connections to external only.

The only reasons you cannot connect on LAN are firewalls blocking the connection or one of you is using a VPN that routes everything outside of LAN or your LAN itself is broken.
Last edited by PunCrathod; Feb 25, 2024 @ 3:05pm
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Feb 24, 2024 @ 3:13pm
Posts: 7