I’ve tried IONOS servers and Google Cloud Servers. Windows Server 2019, 2022, and 2025. It will NOT allow me to connect. I’ve opened ports, I’ve turned the firewall off. Nothing works. The only thing I can do is local. I have used the relay system in the past, but I’m not going to use it when I own a dedicated server.
I’ve been developing online games for 25 years and I’ve never had an issue connecting a client to a Server. Suddenly, it’s impossible with Unity.
I am doing a very simple server setup using Unity 6. I start a host - it is able to connect itself as a client, then I attempt to connect a remote client and it never does anything. I can’t even see that it’s attempting a connection. The port is open. I can do this fine locally. No issues, but as soon as it goes online it stops working.
Did you set the server listen address to “0.0.0.0” (third parameter)? Because if you use anything else or omit that parameter the server will not be reachable from “outside”. This is the most common connectivity issue.
I don’t have a field for a listen address. I have seen that in other versions, but for some reason under Unity Transport, it’s not an option. It has Address, Port, then below that is Allow Remote Connections?
Can you show that? cos that sounds like youre confused, and if I bring up a project and set it up i may not see what you do
Allow remote connection should be enabled. But this is in the Inspector, right? I never used the Inspector to launch Server/Host.
In code, I call StartServer() after setting up the transport similar to this:
transport.SetConnectionData(address, port, serverListenAddress);
// StartServer follows..
Yes it’s in the inspector. Here’s what is in my inspector
H
But if you look at this link…this person has a listener address in his inspector. I didn’t even know it existed What IP address do you put in the Unity Transport?
OK I added the SetConnectionData line above StartHost…
UnityTransport.SetConnectionData(“34.136.26.200”, 6666, “0.0.0.0”);
NetworkManager.StartHost();
Same result. The host client connects just fine, but the remote client cannot connect
Are you absolutely sure windows firewall isnt blocking it
… and traffic gets routed to the receiving machine?
For dedicated servers as far as I remember them they’re configured not to receive any incoming traffic by default, with exception of some well-known ports. You may have to tell the firewall to allow incoming traffic on port 6666, and possibly route it to the target IP if that IP is different than the public facing IP. Clients must connect to the public facing IP.
At least I can ping the IP (140 ms latency) if that helps anything.
I keep forgetting this but I can’t recall using an actual IP in the first parameter. Could also have been 0.0.0.0 because I believe this is mainly for the client to connect to that address but the server uses the third parameter (listen address) where 0.0.0.0 means “accept incoming traffic through any IP”.
I’ve tried setting both IPs to 0.0.0.0 - same result. No connection. And I’m trying this on 2 different servers from 2 different hosts. The ports are open as I’ve created inbound rules for them. I’ve tried changing the ports as well, and completely turning off the Windows Firewall.
Were you ever able to solve this? I’m running into the same issue!
No. I eventually gave up. I’m not paying ridiculous prices for Unity’s relay service, and I suspect that they’re simply blocking traffic so they can get money that way. Any other server I run that’s NOT in Unity works just fine. All my ports are open. I’ve been building MMO’s for 25 years. This is a Unity thing, and Unity is DEFINITELY blocking it.
I mean if you think about what relay is doing - it’s nonsense. It’s basically allowing your server to connect to a Unity client. Why do we need a relay service for that? It’s a scam.
Its odd cos it always worked when i tried it.
You understand that you’re accusing Unity to behave in a willfully fraudulent manner? You can be rest assured that this isn’t the case simply because it would be terribly easy to prove by anyone with networking skills.
The issue is certainly with your server’s network config or the application you’re running.
Your MMO experience is somewhat questionable if you make such remarks. It shows you’re not up to speed with basic game networking concepts.
You should be aware about NAT and how that prevents players from establishing a bidirectional communication with peers. The only solution that works for everyone is a Relay service. Because the UDP/NAT hole punching solutions don’t always work, especially in corporate and public networks.
However, if you already run a dedicated server, there’s simply no point in using a Relay service because anyone can connect to a cloud hosted server (if configured properly). Perhaps you never tried to connect without the Relay service?