Server behind NAT?

Options
VeliV
VeliV ✭✭
edited September 2010 in Photon Server
Hello!

We're trying to set up a photon server. I installed Windows Server 2008 on one of my old computers and set it up in my living room. Connections such as RDC work fine, but we can't connect to the photon server running on the machine.

The port 5055 is forwarded to the computer's LAN IP, but we can only connect to Photon server locally. Do we need to setup the external IP in photon somehow?

EDIT:

More info: We are trying to connect to the server from internet, not inside the LAN.

Comments

  • zoultrex
    Options
    Hi there,

    Have you checked this post?
    viewtopic.php?f=5&t=57
  • VeliV
    Options
    Multiple times. But the OP in that thread didn't specify which IP he put in the XML file. Was it the LAN ip?

    I'd assume that the default IP in the XML (0.0.0.0) opens listeners on all interfaces on the machine, which would receive the information to port 5055 which is port forwarded on my router.
  • dreamora
    Options
    0.0.0.0 will not work if you put it on a hosted place where the machine gets the external IP.
    In that case you will need to put in the external IP there to have it work actually
  • VeliV
    Options
    dreamora wrote:
    0.0.0.0 will not work if you put it on a hosted place where the machine gets the external IP.
    In that case you will need to put in the external IP there to have it work actually

    So if I've got port forwarding from the router, I need to put the external IP in the XML? And should 5055 port be enough?
  • dreamora
    Options
    If you work with UDP and you don't use flash or unity 3 webplayer, 5055 is enough
    otherwise you also need to add the policy server tcp ports.
    if you work with tcp itself, you also would need to add 4530 tcp
  • zoultrex
    Options
    VeliV wrote:
    So if I've got port forwarding from the router, I need to put the external IP in the XML? And should 5055 port be enough?

    I think you are right

    The way mine is setup is with the machine IP, eg, 192.168.1.2 and port 5055
    I believe I didnt even had to do any port fowarding, I also have already tested this on other machines over the internet behind router and everything worked fine
  • VeliV
    Options
    Pretty weird. I changed the IP in the XML to my external IP, but now photon wont start because:
    CService::OnException() - Exception: CSocket::Bind() IP.IP.IP.144:5055 - The requested address is not valid in its context
    
    (removed my IP from that). I assume that is because there are no interfaces on the computer that use the IP, so they can't bind to them.

    zoul, which OS are you using?
  • dreamora
    Options
    did you set your router to give it the public ip?
    if your ip is an in-LAN ip then you need to use that. In that case though normally 0.0.0.0 works as well at elast here.

    your main problem though that will come at some pretty soon point is that your home connection won't be sufficient (if you get it to work at all, many isps actually do not allow you to host servers on home user connections according the contract so check that to be sure) and then move it to a dedicated machine somewhere outside. in that case you will get the external ip on the machine and need to configure it correspondingly.