Search Unity

Third Party Public IP doesn't work with Photon

Discussion in 'Multiplayer' started by Pixelle0, Apr 20, 2021.

  1. Pixelle0

    Pixelle0

    Joined:
    Feb 4, 2021
    Posts:
    3
    Hi,
    I'm a beginner with Photon.

    I'm trying to build a self-hosted server. I've started developing using my local IP, which was working fine - but as I'm now trying to convert it to a public server so that my friend can connect to it, I'm encountering an issue: from the machine hosting, neither them or me can connect to the public IP.

    I don't really know how this works, but I've just been trying typing the public IP in the "Photon Server" input space in Unity.

    Can you help me? thanks!
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Have you made the appropriate port forwarding changes to your router?
     
  3. Pixelle0

    Pixelle0

    Joined:
    Feb 4, 2021
    Posts:
    3
    nope, any documentation to do that?
    and thanks!!!
     
  4. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    Try Googling your router model number with various combinations of port forwarding, virtual server settings and NAT.
     
    Joe-Censored likes this.
  5. Pixelle0

    Pixelle0

    Joined:
    Feb 4, 2021
    Posts:
    3
    upload_2021-4-26_17-23-12.png

    Ok now it's work, but i encounter an other probleme: i can join the server but my friend can't, the status is "peer created" and the error is :

    Failed to connect to server after testing each known IP. Error(s):
    JoinOrCreateRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster.

    sorry for that, and thanks you a lot for the help
     
  6. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    If your friend isn't on the same physical network as the server and this is the error message on his PC, then I suspect you haven't correctly setup port forwarding on your router to direct incoming connections to the server.
     
    Joe-Censored likes this.