Clients can't connect online to MasterServer while on the same network as the server itself

edited August 2020 in Photon Server
Hello everyone,

I'm facing an issue while trying to use Photon Server on my Photon Cloud app. I'm kind of new to server-related features so I might have done few things wrong but let me explain what's my problem.

Here's my situation : I have developped an app using Photon Cloud on UDP protocol, but my goal is now to make it self-hosted and online. I have 2 computers linked to the same router. On one computer I have PhotonControl, and the application is running on both computers.

Here's my issue : When I set the Unity's PhotonNetworkSettings Server value as my router's address, none of the two computers connect to the MasterServer (There's a TimeOut Client issue after an attempt of PhotonNetwork.ConnectUsingSettings()).

What I've done : I downloaded the Server (Server) sdk tool, not the Server (plugin), both available on the SDKs section.
On both computers I have run the powerShell script from the Photon Server documentation that opens the right inbound ports (most important ones are 5055-5056 I suppose).
I then created a port-forward through my router's firmware with source/destination ports 5055 and 5056, targeting the computer that is running the PhotonControl tool. This computer has no static IP.
I have set the Unity ServerSetting server address as my router, and in PhotonControl.exe I chose the "Set Public IP" as game server config before starting the LoadBalancing app (still through PhotonControl tool).
I tried to change the Unity ServerSetting server address to the locally assigned (dhcp) ip of the computer that runs PhotonControl while still having the PhotonControl ip config set to PublicID : I was then able to connect to the MasterServer but not to the GameServer.

Additional informations : I already made the app work locally by indicating the locally assigned ip of the computer that hosts PhotonControl on both the Unity ServerSettings and PhotonControl's ip config (Set Local IP). More important, the application worked properly online when I was running it from a third computer which was not connected to the same network as the server host.

So even if it worked online, I want to make sure it works in any kind of situation. Is there something I forgot to do, or some concept I misunderstood ?

Thanks !


  • TobiasTobias admin
    edited August 2020
    If you can reach your Master Server via the public IP, you at least know how to setup the parts. Good.
    Apparently the setup for the Game Server is not correct yet but can be fixed.

    Sorry but I can't say why another client from outside was able to connect but the local one didn't.
    In doubt, maybe you log the Game Server IPs in the clients when they receive them (there is a OnOperationResponse method which handles this).

    Setting the Game Server IP via the button "Set Public IP" may fail. Double check the value and in doubt, set it manually by editing the file. Keep in mind that there are 2 Game Server instances running typically and both may need the setup. Stop and start Photon after the change.
    See Game Server IP Config here.
  • Ok thank you for your answer, I will do some further testings.
Sign In or Register to comment.