Use public ip or private ip when hosting on VM?
Options
sKipper
✭
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.
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.
0
Best Answer
-
@sKipper you have to update Photon.LoadBalancing.dll.config in deploy/LoadBalancing/GameServer/bin. There is PublicIpAddress property in GameServer settings section
Our photon control does request to special service that tries to detect your public IP. If it is not same as your router IP you have to get one for the router. Otherwise, nobody will be able to connect.
here is a table for LoadBalancing config: https://doc.photonengine.com/en-us/server/current/applications/loadbalancing/loadbalancingconfig
here is a table for server configuration:
https://doc.photonengine.com/en-us/server/current/operations/server-config-settings
best,
ilya5
Answers
-
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,
ilya1 -
That would be the public ip. But PhotonControl is not able to detect the public ip.
your GameServer should report address to Master server that is accessible from outside of your router
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?
if not, just set address of your router and make sure that router has an public IP
0 -
@sKipper you have to update Photon.LoadBalancing.dll.config in deploy/LoadBalancing/GameServer/bin. There is PublicIpAddress property in GameServer settings section
Our photon control does request to special service that tries to detect your public IP. If it is not same as your router IP you have to get one for the router. Otherwise, nobody will be able to connect.
here is a table for LoadBalancing config: https://doc.photonengine.com/en-us/server/current/applications/loadbalancing/loadbalancingconfig
here is a table for server configuration:
https://doc.photonengine.com/en-us/server/current/operations/server-config-settings
best,
ilya5 -
That seems to have done the trick. Thanks!0