Connect to a specific Port with Netcode for GameObjects Transport

I want to run multiple instances of a server build on my server and make them listen on different ports, so that clients can connect to one of the instances. The problem is, that the clients can only connect successfully to an instance on the server, if I use port 7777 in the Unity Transport that comes with Netcode for Gameobjects. If I use, e.g., port 7779 or anything else, the client can´t connect, altough this port is opened in the server firewall (ufw).

Thank you for your support!

Unity Version: 6000.0.32; NGO-Version: 2.1.1

There is not enough detail. Can you tell us what the failure is and what you tried? Have you tried locally launching a client and connecting? Does the server output any errors in the player.log?

Just in general, this should work without problems barring any system/network config issues.

how did you go about making them listen on different ports?

1 Like

Thank you so much for your quick answers! Cause you sad, it should work without problems, I checked everything once more (probably for the third or fourth time) and found that the firewall settings were a bit different for the other ports. Now it works just fine :slight_smile:

If someone is interested in the solution: I set the ports via UnityTransport.SetConnectionData(IpAdress, Port, “0.0.0.0”)
and the firewall syntax is required to be: 7779/udp ALLOW IN Anywhere

1 Like