UTP bug not connecting to any IP other then localhost.

I have started facing this problem that I am not able to connect to any IP except for Even though the server and clients are running on same machine but no success if I pass my local IP. Any idea what might be causing this issue?

1 Like

Is your server binding on an endpoint that can be reached externally? See this question in the FAQ about which endpoint to bind to. And also this question about general connection issues.

1 Like

I am specifically making this for local network, and I had to NetworkManager.Singleton.GetComponent<UnityTransport>().SetConnectionData(GetLocalIPAddress(), (ushort)7777); do this before starting the server not only 1 client on specific machine can connect to it.

Ah, I see you're using Netcode for GameObjects. In this case you should look at the Unity Transport component in the inspector. Newer versions have a "Allow Remote Connections" checkbox that should be enabled if you want to connect to your server from a different machine. (In older versions, set the "Listen Server Address" field to instead.)

I manually checked the "Allow Remote Connections" and server showed the localIp of the machine. even then client was not able to connect. So like I mentioned above, using SetConnectionData before starting server worked.