Photon over the internet

edited July 2010 in Photon Server
Hi I have downloaded the photom trial: ExitGames-Photon-Server-SDK_v2-0-1-RC4
and successfully connected to the server running locally on my machine using the unity demo: demo_unity_realtime_cs

But I cannot connect over the internet even though I opened the UDP port 5055 in my router.
I have to say that I did not fully tested if the port is opened because i dont know any service on the internet that does that.
I know a website to test TCP ports:
But it looks like it doesnt work for UDP, i tested the URL and it says its closed, even though i know its not =)

Maybe there is some configuration to enable NAT or something else im missing... Cant find anything in the docs either :?

Any help appreciated :D


  • Just an update...

    Found a website that tests the port by running a little java app:
    My port 5055 passed.
  • enabling NAT won't help cause the server must be publically reachable, not only nat punchthroughable.

    So you really need to setup static portforwardings for the port you use. Opening up won't tell the router where to send the packet too.

    Just to be sure: You configured the server fully including the ip in the xml (not just as it is there by default)
  • You mean on photonsocketserver.xml:
    Change the 0 ip address to my local machine ip address, or change it to my internet IP address.
    I just tried that while typing this reply, didnt work, would it be because Im trying to connect to my internet IP from my local machine on then lan? This, local-to-internet, worked before with SFS.

    Also, I havent just opened the port, I have it forwarded it to my local machine with statip LAN ip.
  • Trying to connect to your external ip from the same lan could be very well a reason nothing works cause many routers don't like this type of communication.

    SFS is unhappily no measure in this case cause SFS is restricted to purely TCP (you could try if it has something to do with the setup in relation to UDP, you can tell your photonpeer to use TCP instead of udp before connecting)
  • I don't really get what the PortChecker is testing. A Java Applet is running client side and this does not tell you anything about being available somewhere else.

    As far as Photon is running, it will listen to the ports and IPs you assigned. If this works locally, everything is fine and you need to work out how to reach your "server" from somewhere else.

    If your server machine is behind a router, you will likely only have local IPs assigned. From the server, go to and compare the displayed external IP with the local IPs listed in Photon's logs. If they don't match, you have to tell our router to map incoming requests (to your external IP) to the local IP and port of Photon. We can't really help with that detail though.

    Additionally to this, there might be a firewall as hardware, as software on the router or as software on your server machine. Each might reject packages from "outside". In Windows Server 2008, you could setup a firewall rule for an application or just the ports.

    If you did not order a static IP from your internet provider, the external IP will change over time.

    Do you use Unity 3? This also requires a policy file to be present on the server, if you connect in the WebPlayer. We will support this in the next Photon update.
  • Its working now, thank you guys for your help.

    What happened was that when I changed the IP to my machine's IP in the UDP listener in the XML i forgot to reboot photon, so no change was made until I reboot it.

    Thanks again!
  • Cool so really just the ip setup :D