My friend could connect to me,but i couldn't connect to my friend.

Hello.

I’m testing unity’s network and i have already build my own Master Server on my VPS.

I have 3 friends as tester and when i host a server it worked fine,all of my friends could connect to me over internet.

But it’s strange when my 3 friends build their server.

I couldn’t connect to two of my friends server and only could connect to the last one friend’s server.

It’s same as when i use unity’s official Master Server.

Any one knows what happened?

Did i miss something?

It’s probably a firewall or router issue. Try to have them turn off their firewall. If that doesn’t work. They have to do some portforwarding.

For troubleshooting perhaps it’s easier to use a tool such as Hamachi and have every player connect to it. You will still have to turn the firewall off or create exceptions though.

Yes, it is most likely a NAT problem. Unity’s master server does provide a facilitator that you can use for NAT punchthrough but that will not work for every NAT setup.

You should test the connection using Network.TestConnection and then depending on the result start the server with true or false as the second parameter.

Hi,thanks for help.

I told my friends to turn off their firewall and anti-virus software,but seems i still couldn’t connect to the 2 of them.

I would check the NAT part and come back soon with result.

Thanks again!