Unable to connect using external IP with Open console command

Hello,

I am unable to connect to a server using my external IP address. Connecting locally using the internal IP works fine. I have tried with multiple machines on my network and have tried with the server and client on the same machine and the server on one machine and the client on another etc.

Steps:

Create a blank project with 4.17.1
Close the Editor
Create a shortcut to run as server: <path to UE4Editor.exe> <path to project> -server -log
Create a shortcut to run as client: <path to UE4Editor.exe> <path to project> -game -log -windowed -resX=1280 -resY=720
Run the server
Run the client
Open the console on the client and type in: open <your external IP>

Server log:

[2017.09.19-09.42.49:708][  0]Allocator Stats for TBB: (not implemented)
[2017.09.19-09.42.49:861][  0]LogAIModule: Creating AISystem for world Entry
[2017.09.19-09.42.49:862][  0]LogLoad: Game class is 'GameModeBase'
[2017.09.19-09.42.49:863][  0]LogTemp: Display: ParseSettings for GameNetDriver
[2017.09.19-09.42.49:863][  0]LogTemp: Display: ParseSettings for IpNetDriver_0
[2017.09.19-09.42.49:863][  0]LogTemp: Display: ParseSettings for GameNetDriver
[2017.09.19-09.42.49:864][  0]LogInit: WinSock: Socket queue 131072 / 131072
[2017.09.19-09.42.49:866][  0]LogInit: WinSock: I am MacPC (192.168.0.5:0)
[2017.09.19-09.42.49:867][  0]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2017.09.19-09.42.49:867][  0]LogNet: GameNetDriver IpNetDriver_0 IpNetDriver listening on port 7777
[2017.09.19-09.42.49:868][  0]LogWorld: Bringing World /Game/Maps/Entry.Entry up for play (max tick rate 30) at 2017.09.19-10.42.49
[2017.09.19-09.42.49:868][  0]LogWorld: Bringing up level for play took: 0.001034
[2017.09.19-09.42.49:870][  0]LogLoad: Took 0.186090 seconds to LoadMap(/Game/Maps/Entry)
[2017.09.19-09.42.49:943][  0]LogLoad: (Engine Initialization) Total time: 6.03 seconds
[2017.09.19-09.42.49:943][  0]LogLoad: (Engine Initialization) Total Blueprint compile time: 0.00 seconds
[2017.09.19-09.42.49:944][  0]LogExternalProfiler: Found external profiler: VSPerf
[2017.09.19-09.42.49:945][  0]LogExternalProfiler: Using external profiler: VSPerf
[2017.09.19-09.43.28:940][171]LogNet: NotifyAcceptingConnection accepted from: 86.169.103.194:49601
[2017.09.19-09.43.28:940][171]LogHandshake: SendConnectChallenge. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.28:973][172]LogNet: NotifyAcceptingConnection accepted from: 86.169.103.194:49601
[2017.09.19-09.43.28:973][172]LogHandshake: SendChallengeAck. InCookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.28:975][172]LogNet: Server accepting post-challenge connection from: 86.169.103.194:49601
[2017.09.19-09.43.28:977][172]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2017.09.19-09.43.28:978][172]LogNet: NotifyAcceptedConnection: Name: Entry, TimeStamp: 09/19/17 10:43:28, [UNetConnection] RemoteAddr: 86.169.103.194:49601, Name: IpConnection_0, Driver: GameNetDriver IpNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL
[2017.09.19-09.43.28:978][172]LogNet: AddClientConnection: Added client connection: [UNetConnection] RemoteAddr: 86.169.103.194:49601, Name: IpConnection_0, Driver: GameNetDriver IpNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL
[2017.09.19-09.43.29:969][202]LogHandshake: Received unexpected post-connect handshake packet - resending ack.
[2017.09.19-09.43.29:969][202]LogHandshake: SendChallengeAck. InCookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.30:998][233]LogHandshake: Received unexpected post-connect handshake packet - resending ack.
[2017.09.19-09.43.30:999][233]LogHandshake: SendChallengeAck. InCookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.32:028][264]LogHandshake: Received unexpected post-connect handshake packet - resending ack.
[2017.09.19-09.43.32:029][264]LogHandshake: SendChallengeAck. InCookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.33:028][294]LogHandshake: Received unexpected post-connect handshake packet - resending ack.
[2017.09.19-09.43.33:028][294]LogHandshake: SendChallengeAck. InCookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.34:059][325]LogHandshake: Received unexpected post-connect handshake packet - resending ack.
[2017.09.19-09.43.34:060][325]LogHandshake: SendChallengeAck. InCookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.35:056][355]LogHandshake: Received unexpected post-connect handshake packet - resending ack.

Eventually this ends with:

[2017.09.19-09.45.28:984][776]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection. Elapsed: 120.01, Real: 120.01, Good: 120.01, DriverTime: 159.04, Threshold: 120.00, [UNetConnection] RemoteAddr: 86.169.103.194:49601, Name: IpConnection_0, Driver: GameNetDriver IpNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL
[2017.09.19-09.45.28:985][776]LogNet: NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT. Closing connection. Elapsed: 120.01, Real: 120.01, Good: 120.01, DriverTime: 159.04, Threshold: 120.00, [UNetConnection] RemoteAddr: 86.169.103.194:49601, Name: IpConnection_0, Driver: GameNetDriver IpNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL'
[2017.09.19-09.45.28:986][776]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 86.169.103.194:49601, Name: IpConnection_0, Driver: GameNetDriver IpNetDriver_0, IsServer: YES, PC: NULL, Owner: NULL, Channels: 1, Time: 2017.09.19-09.45.28

This is the log from the client:

[2017.09.19-09.43.07:008][  0]Allocator Stats for TBB: (not implemented)
[2017.09.19-09.43.07:156][  0]LogAIModule: Creating AISystem for world Default
[2017.09.19-09.43.07:156][  0]LogLoad: Game class is 'GameModeBase'
[2017.09.19-09.43.07:161][  0]LogWorld: Bringing World /Game/Maps/Default.Default up for play (max tick rate 0) at 2017.09.19-10.43.07
[2017.09.19-09.43.07:162][  0]LogWorld: Bringing up level for play took: 0.002808
[2017.09.19-09.43.07:172][  0]LogLoad: Took 0.182835 seconds to LoadMap(/Game/Maps/Default)
[2017.09.19-09.43.07:330][  0]LogRenderer: Reallocating scene render targets to support 1280x720 Format 10 NumSamples 1 (Frame:1).
[2017.09.19-09.43.07:330][  0]LogLoad: (Engine Initialization) Total time: 7.46 seconds
[2017.09.19-09.43.07:331][  0]LogLoad: (Engine Initialization) Total Blueprint compile time: 0.00 seconds
[2017.09.19-09.43.07:331][  0]LogExternalProfiler: Found external profiler: VSPerf
[2017.09.19-09.43.07:331][  0]LogExternalProfiler: Using external profiler: VSPerf
[2017.09.19-09.43.28:895][221]LogNet: Browse: 86.169.103.194//Game/Maps/Default
[2017.09.19-09.43.28:896][221]LogTemp: Display: ParseSettings for GameNetDriver
[2017.09.19-09.43.28:900][221]LogTemp: Display: ParseSettings for IpNetDriver_0
[2017.09.19-09.43.28:901][221]LogTemp: Display: ParseSettings for PendingNetDriver
[2017.09.19-09.43.28:903][221]LogInit: WinSock: Socket queue 32768 / 32768
[2017.09.19-09.43.28:913][221]LogInit: WinSock: I am MacPC (192.168.0.5:0)
[2017.09.19-09.43.28:914][221]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2017.09.19-09.43.28:915][221]LogNet: Game client on port 7777, rate 10000
[2017.09.19-09.43.28:951][224]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.29:967][287]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.30:983][350]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.32:000][413]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.33:016][476]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.34:032][539]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.35:048][602]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.36:064][665]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.37:081][728]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.38:097][791]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.39:113][854]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.40:129][917]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.41:146][980]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.42:162][ 43]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.43.43:178][106]LogHandshake: SendChallengeResponse. Timestamp: 38.994144, Cookie: 107089109044029022119255254099223255094184152011127029184015
[2017.09.19-09.45.28:895][658]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection. Elapsed: 120.01, Real: 119.98, Good: 119.98, DriverTime: 120.01, Threshold: 120.00, [UNetConnection] RemoteAddr: 86.169.103.194:7777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL
[2017.09.19-09.45.28:899][658]LogNet: Warning: Network Failure: PendingNetDriver[ConnectionTimeout]: UNetConnection::Tick: Connection TIMED OUT. Closing connection. Elapsed: 120.01, Real: 119.98, Good: 119.98, DriverTime: 120.01, Threshold: 120.00, [UNetConnection] RemoteAddr: 86.169.103.194:7777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL
[2017.09.19-09.45.28:901][658]LogNet: NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT. Closing connection. Elapsed: 120.01, Real: 119.98, Good: 119.98, DriverTime: 120.01, Threshold: 120.00, [UNetConnection] RemoteAddr: 86.169.103.194:7777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL'
[2017.09.19-09.45.28:901][658]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 86.169.103.194:7777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, Channels: 2, Time: 2017.09.19-09.45.28
[2017.09.19-09.45.28:902][658]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 86.169.103.194:7777, Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL
[2017.09.19-09.45.28:903][658]LogNet: DestroyNamedNetDriver IpNetDriver_0 [PendingNetDriver]
[2017.09.19-09.45.28:904][658]LogExit: PendingNetDriver IpNetDriver_0 shut down
[2017.09.19-09.45.28:952][659]LogNet: Browse: /Game/Maps/Default?closed
[2017.09.19-09.45.28:952][659]LogNet: Failed; returning to Entry

My router is a Netgear D6220, firmware is up to date.

I have forwarded ports 7777 & 7778 for TCP and UDP to the machine running the server and set the Windows firewall to allow this through (also tested with the firewall turned off).

Any help would be much appreciated,

Thanks.

Hi
Same problem here too. I follow this tutorial for my dedicated server: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

But I can’t join if am using my public IP. I open the port 7777 on my router, I open my firewall with inbound and Outbound rules. etc, etc.

from the log, the server can receive from the client,
but it seems like the client and server both send a lot of duplicate data, maybe your router have bug.

You can try put the dedicated server on cloud server.
I used run dedicated server on cloud server, and it works fine.

Hi Feiwu. Thanks for the info. Any cloud server, you can recommend. My other question is does it need to be built on Linux to be playable via the cloud server?

I used linode, yes, you should build dedicated server for linux. although there’s windows cloud server, linux server is much more cheaper and easy to use.

I will try on windows cloud server first like Azure. I just never build on Linux. But there is lot’s of good tutorial here. Thanks for your reply.