[Solved]Couldn't establish network communication with server

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Eiktyrner
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Sep 09, 2015 8:20 pm
Contact:

[Solved]Couldn't establish network communication with server

Post by Eiktyrner »

Trying to join a MP game I get the message in the title. The server works fine for the multiple people online already, so it's not the usual port-forwarding errors some people seem to have.

Code: Select all

  62.284 Info UDPSocket.cpp:27: Opening socket at (0.0.0.0:0)
  66.798 Info UDPSocket.cpp:235: Socket closed
  66.799 Joining game 83.87.174.158:34199
  66.799 Info UDPSocket.cpp:33: Opening socket
  66.800 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Ready) to(Connecting)
  68.116 Error ClientMultiplayerManager.cpp:90: MultiplayerManager failed: multiplayer.not-received-connection-accept-reply
  68.116 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Connecting) to(InitializationFailed)
  68.968 Info ClientMultiplayerManager.cpp:177: Quitting multiplayer connection.
  68.968 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(InitializationFailed) to(Disconnected)
  69.008 Info UDPSocket.cpp:235: Socket closed
It seems like the connection accept reply message doesn't get through to my client. I've disabled my windows firewall, allowed any-any UDP on my pfSense firewall and done a wireshark capture to no avail.

Game works fine on other servers. Could it be related to this specific server running on 34199 instead of the default?
Last edited by Eiktyrner on Sun Jan 08, 2017 10:31 am, edited 1 time in total.
Eiktyrner
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Sep 09, 2015 8:20 pm
Contact:

Re: Couldn't establish network communication with server

Post by Eiktyrner »

So the issue was outbound NAT rewriting the port numbers the built in NAT puncher got from the pingpong servers.
The easiest way to confirm you have the same problem is to fire up Wireshark, capture some packets while you try to connect to a game and then filter on

Code: Select all

(ip.addr == 88.80.190.64) or (ip.addr == 139.162.150.14)
(IPs may change).

I found that the reply packets had the correct IP but it had a random port. So in my router I enabled static port mapping for outbound NAT.
tickterd
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Jul 06, 2017 4:31 am
Contact:

Re: [Solved]Couldn't establish network communication with server

Post by tickterd »

I had the same problem, turned out to be a configuration setting on my pfSense router. From the pfsense documentation:

By default, pfSense rewrites the source port on all outgoing packets. Many operating systems do a poor job of source port randomization, if they do it at all. This makes IP spoofing easier, and makes it possible to fingerprint hosts behind the firewall from their outbound traffic. Rewriting the source port eliminates these potential (but unlikely) security vulnerabilities.

However, this breaks some applications. There are built in rules when Advanced Outbound NAT is disabled that don't do this for UDP 500 (ISAKMP for IPsec VPN traffic) this traffic will almost always be broken by rewriting the source port.

Note that 1.2.3 and older releases will not rewrite the source port on SIP, UDP 5060 traffic, by default though 2.0 and newer do. If problems with handsets are encountered on an older release, upgrade to a current version of pfSense or manually adjust the outbound NAT rules.

Other protocols may be used, such as some games, that do not work properly when the source port gets rewritten. To disable this functionality, the static port option must be used on outbound NAT rules.

Navigate to Firewall > NAT on the Outbound tab
Select Manual Outbound NAT rule generation (Advanced Outbound NAT (AON))
Click Save
Find the rule at the bottom of the page labeled "Auto created rule for LAN".
Click + at the end of that row to copy the rule.
Edit the rule so it only covers the source IP of the device that needs static port, and any other required settings.
Check Static Port box on that page
Click Save
Move the rule to the top of the list
Click Apply Changes
Navigate to Diagnostics > States
Enter the IP address of the device in the Filter box
Click Filter
Click Kill
Now connections from that device will have their source port retained.
Post Reply

Return to “Technical Help”