OpenRCT2 / OpenRCT2

An open source re-implementation of RollerCoaster Tycoon 2 🎢
https://openrct2.io
GNU General Public License v3.0
13.27k stars 1.51k forks source link

Cannot host a multiplayer server with multiple network adapters active #4230

Open Goz3rr opened 8 years ago

Goz3rr commented 8 years ago

OS: Windows 10 Pro 64 bit Version: 0.0.5 Commit/Build: e.g. c3fdb99

Cannot host a multiplayer server with multiple network adapters active. Because of VPNs and VMs I have multiple (virtual) network adapters. Trying to host a game with ports properly forwarded results in "Unable to advertise: Unable to reach game server, make sure your ports are open." in the console window, the server not appearing in the browser and people being unable to connect using the IP directly. Disabling all except the real network adapters fixes this.

zsilencer commented 8 years ago

It uses INADDR_ANY by default so it should work for all the interfaces, this is probably an issue outside of openrct2 such as firewall.

Goz3rr commented 8 years ago

I'm not changing any firewall settings, only disabling all the virtual network adapters

Sweet-Tan commented 7 years ago

@Goz3rr If this is still an issue, I had a couple ideas to throw around. If you did get it worked out, great! Just mark the issue closed. I'm confident it is an issue outside OpenRCT.

This is assuming you have already gone through the process of elimination and you can only reach the game server after all other adapters are disabled. Do you have any issue connecting to other servers with the adapters enabled?

  1. With all adapters enabled, open command prompt and type "ping server.openrct2.website". Now try it with the adapters disabled, and you should get the same address. If you don't, there's definitely a networking issue at hand.

  2. With all adapters enabled, open command prompt and type "route print -4". Make sure the first line under "IPv4 Route Table" begins with 0.0.0.0 0.0.0.0 and the Metric should not be higher than any other in the list.

Sounds like there is a NAT issue with whatever hypervisor you are running, or a IP routing issue with one of your VPN adapters, but you would notice that outside of OpenRCT.

Goz3rr commented 7 years ago

I haven't tried hosting in a while, but I'll update my game when I'm home later and give it another try.

I've only had this issue once before with another game: Watch_Dogs at launch. The fix was the same (disabling all but the main network adapter) and there were quite a lot of people worldwide with the exact same thing. This was later fixed in a patch.

Goz3rr commented 7 years ago

@Sweet-Tan I can't ping server.openrct2.website in either case, are you sure that's the right domain? openrct2.website works fine

Sweet-Tan commented 7 years ago

Sorry, that's a typo on my end. servers.openrct2.website

Goz3rr commented 7 years ago

First ping is with all adapters disabled, but as you can see it doesn't make a difference

C:\Users\goz3rr>ping servers.openrct2.website

Pinging servers.openrct2.website [104.27.163.131] with 32 bytes of data:
Reply from 104.27.163.131: bytes=32 time=5ms TTL=59
Reply from 104.27.163.131: bytes=32 time=5ms TTL=59
Reply from 104.27.163.131: bytes=32 time=5ms TTL=59
Reply from 104.27.163.131: bytes=32 time=5ms TTL=59

Ping statistics for 104.27.163.131:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 5ms, Average = 5ms

C:\Users\goz3rr>ping servers.openrct2.website

Pinging servers.openrct2.website [104.27.163.131] with 32 bytes of data:
Reply from 104.27.163.131: bytes=32 time=5ms TTL=59
Reply from 104.27.163.131: bytes=32 time=5ms TTL=59
Reply from 104.27.163.131: bytes=32 time=6ms TTL=59
Reply from 104.27.163.131: bytes=32 time=5ms TTL=59

Ping statistics for 104.27.163.131:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 6ms, Average = 5ms

C:\Users\goz3rr>route print -4
===========================================================================
Interface List
 14...00 ad 1d e7 6b 2f ......VPN Client Adapter - VPN
  3...14 da e9 15 1f ff ......Intel(R) 82579V Gigabit Network Connection
  9...00 ff 4f 31 db 69 ......TAP-Windows Adapter V9
 13...00 00 3b 53 3f fc ......LAN Bridger Virtual Ethernet Adapter
  8...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
  5...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
 23...00 26 83 32 b2 71 ......Bluetooth Device (Personal Area Network)
  1...........................Software Loopback Interface 1
  4...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
 21...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
  6...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.0.1      192.168.0.8    281
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
      192.168.0.0    255.255.255.0         On-link       192.168.0.8    281
      192.168.0.8  255.255.255.255         On-link       192.168.0.8    281
    192.168.0.255  255.255.255.255         On-link       192.168.0.8    281
     192.168.45.0    255.255.255.0         On-link      192.168.45.1    291
     192.168.45.1  255.255.255.255         On-link      192.168.45.1    291
   192.168.45.255  255.255.255.255         On-link      192.168.45.1    291
     192.168.56.0    255.255.255.0         On-link      192.168.56.1    291
     192.168.56.1  255.255.255.255         On-link      192.168.56.1    291
   192.168.56.255  255.255.255.255         On-link      192.168.56.1    291
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link       192.168.0.8    281
        224.0.0.0        240.0.0.0         On-link      192.168.45.1    291
        224.0.0.0        240.0.0.0         On-link      192.168.56.1    291
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link       192.168.0.8    281
  255.255.255.255  255.255.255.255         On-link      192.168.45.1    291
  255.255.255.255  255.255.255.255         On-link      192.168.56.1    291
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
  255.255.255.255  255.255.255.255         On-link        1
          0.0.0.0          0.0.0.0      192.168.0.1  Default
===========================================================================
Sweet-Tan commented 7 years ago

Disable your adapter named: VMware Virtual Ethernet Adapter for VMnet8

Does the issue persist? If yes, that was my last idea to fix the issue, but what you've said confirms its not an issue with OpenRCT, but a networking issue. You can try using an online port checker to see if your ports are accessible and troubleshoot further. Good luck!