public ip problems

Hello, I am trying to get a client on another computer to connect to my server. I opened the UDP ports 5050 - 5057 nad the TCP 4000 something something and changed the MainMenu script settings to my internal ip because the other pc runs off the same router. For the server loading public ip, I changeed it from 127.0.0.1 to my external ip but nothing connects to that anymore, not even the local client at 127.0.0.1

Am I supposed to change the public ip to my internal ip or is it set up that only pcs not connected to my local network can connect?

Comments

  • You wont be able to connect between two local computers using external IP. The translation table on the router wont forward to the ports. Use the local IP when the computers are infact local or move the external server to a external ip :)

    Hope this helps.
  • Okay, so I change the public iP to my external ip for outside connections, and I can us my internal iP for for local network connections?

    Since there are 2 server load files, can I make one public ip internal and the other one external?
  • Not sure I follow.
    If you have 2 servers behind the router you need to use different ports for each server and configure your router to forward each port to the right server. For example, server 1 runs on 192.168.1.5:5055, and server 2 on 192.168.1.9:5056 you setup the router to forward port 5055 to 192.168.1.5 and 5056 to 192.168.1.9. You cannot use the same port for both servers with just one external IP.
    If you use a unity web player make sure to forward TCP port 843 to one of your servers.
    There might be some routers that won't allow you to connect from you internal network to your external IP, but I believe that in most cases it should actually work.
Sign In or Register to comment.