Use public ip or private ip when hosting on VM?

Options
Hi, we are hosting Photon Server on a VM that is behind a router. In PhotonControl's Game Server IP Config should I select private ip or public ip? I need players to be able to connect from the internet.

If I set it as private ip and I have port forwarding from my public ip to the private one then it should work correctly right?

I could simply try it with the public ip setting but currently we don't have internet access on the VM and so PhotonControl is not able to detect the public ip.

Best Answer

Answers

  • chvetsov
    Options
    hi, @sKipper

    your GameServer should report address to Master server that is accessible from outside of your router

    clients will connect to that address and your router should redirect port to a private address.

    so, if PhotonControl shows as public address of your router then use it, if not, just set address of your router and make sure that router has an public IP

    best,
    ilya
  • sKipper
    Options

    your GameServer should report address to Master server that is accessible from outside of your router
    That would be the public ip. But PhotonControl is not able to detect the public ip.

    if not, just set address of your router and make sure that router has an public IP
    I am guessing you mean manually entering the public ip in the config file but I am not sure which one to edit: PhotonServer.config or Photon.LoadBalancing.dll.config. Is there any documentation/forum post that describes how to edit the config files?

  • sKipper
    Options
    That seems to have done the trick. Thanks!