Page 1 of 1

Network Setup, NAT, port forwarding: some questions

Posted: 02 Feb 2009, 19:04
by qray
Hi,

I've read what I could find about the hosting/server/NAT/network setup, but it is still a bit unclear to me. What does the server do and what the host? And which part needs which port (and protocol) forwarded/open?

We tried to set up a game over the Inet yesterday. 2 computers behind NAT, 1 directly connected. No extra firewalls at any place, just the NAT in the routers.
I was behind NAT and could open a server by forwarding the port I choose for it. People were able to connect. When I tried to host a game there, people couldn't connect to that game. When the person who is directly connected to the Inet hosted a game (still using my server) everybody could connect and play.
When anybody else set up the server and I tried to host a game, it didn't work. So I guess I would have to forward some more ports. We tried it with dedicated port and forwarding and with NAT hole punching. But we didn't manage to get it running.
In the situation given above we could work around it because one person was directly connected to the internet, but when we tried only with the two computers behind NAT we weren't able to succeed.

So I guess I must have missed the point what part is responsible for what. My first guess was that the server receives/sends all traffic, but somehow this doesn't fit the experience above.

Happy for any answer or RTFM with a link to a detailed explanation.
Thanks!

Re: Network Setup, NAT, port forwarding: some questions

Posted: 02 Feb 2009, 19:09
by Peet
Just so this is completely clear, you were hosting a TASServer behind NAT, and then trying to host a game from a machine on the same lan (or same machine) as it?

Re: Network Setup, NAT, port forwarding: some questions

Posted: 02 Feb 2009, 19:11
by qray
Peet wrote:Just so this is completely clear, you were hosting a TASServer behind NAT, and then trying to host a game from a machine on the same lan (or same machine) as it?
Yes, this was one of the setups we tried and that did not succeed.

Re: Network Setup, NAT, port forwarding: some questions

Posted: 02 Feb 2009, 19:15
by Peet
Ok, the reason behind that is because the server passes the IP of the host (all ingame traffic goes through the host) to each of the players so that they can connect to it. Since the host and the server were on the same lan, the server was passing the local IP of the host to the players. Basically if you're running a server, all clients must be in the same IP space in order for each of them to host. It would also work for a player on a different network (or at least with an external IP exposed to the server) to connect to your server and host a game for you to connect to.

Re: Network Setup, NAT, port forwarding: some questions

Posted: 02 Feb 2009, 19:23
by qray
Thanks for the answer. That clarifies it a bit.

One more question:
If two players -both behind a NAT- what to play together.
One has to open a server and do proper port forwarding.
The other one connects and hosts a game. Then the "hoster" also has to do port forwarding (whatever port he states when opening the host), right?

Re: Network Setup, NAT, port forwarding: some questions

Posted: 02 Feb 2009, 19:37
by Peet
Yes, assuming you mean behind different NATs. Alternately you could just connect to the official server, have the host forward ports (or use one of the many autohosts) and go from there :P

Re: Network Setup, NAT, port forwarding: some questions

Posted: 02 Feb 2009, 20:14
by qray
Peet wrote:Yes, assuming you mean behind different NATs.
Yep, that's what I meant.

Thanks a lot for your fast replies :)