Using the Lobby with a NAT Router

If you have a home network with a switch/router, it probably uses something called Network Address Translation to allow you to have more than one computer, but occupy only one IP address on the public Internet. The router separates your private network from the public network, and keeps track of connections through it, so that packets coming in get sent to the right computer.

When there is a connection request made by an outside computer to your IP address, the router doesn't know which of your computers to send the request to. Normally, this is good, because it keeps malicious people from finding ports that your computer might accept a connection. However, there are some times when it's needed, such as playing peer-to-peer games.

You need to tell the router to direct incoming connection requests to the “private” IP address of the computer you're playing on. Your router should have this described in the manual. You want to set ports 3632 through 3637 to go to your game PC's IP address.

Routers almost always default to using dynamic IP addresses, or DHCP. With DHCP, your game PC's IP address can eventually change, so you would have to tell the router to send requets to the new address. More recent routers have a feature called Port Triggering which take care of this for you.

Port Triggering

Port triggering will set it up so that if the router sees an outgoing connection request from your game PC on port 3632, it will remember that, and in the future will direct incoming requests on port 3632 to that same PC. Go to the Port Triggering page of your router's setup and fill in the table values with this info. Under Application, you can use whatever name you want, such as "Win42." Other dominoes games use different port numbers, so you might be able to set a range and take care of the other games as well. Set the range to 3632 through 3637 for both Triggered Range and Forwarded Range. If there's a place to select either TCP or UDP, then it's TCP you want.

In order for Port Triggering to work, you first will have to connect to someone else's game, or at least attempt to. The router will see an outgoing request on that port number and remember to forward incoming requests to the same computer.

Port Forwarding

If you don't have Port Triggering available, then set up standard Port Forwarding instead. Tell it to forward packets on 3632 to the IP address of your game computer. To play WinMoon, do this again for port 3633, and for Dominoes, set it up for ports 3633 and 3635. Double-9 is 3636 and 3637. Depending on your router model, you might be able to set all these up at once by specifying a range. Also, select TCP instead of UDP. The downside of this method is that eventually, your router might assign your game PC a different IP address, and in that case, you'll need to update this page with the new address. The Port Triggering would take care of this problem.

More Info

When computers send information to each other over the Internet, it's usually with the TCP/IP protocol. The data may be broken up into multiple packets, and the TCP header information tells the receiving computer in what order to reassemble it, and requires that the receiving computer acnowledge that the data was received. The TCP software that's built into the computer takes care of just about everything, so that an application program just hands the data to the TCP “layer,” and the TCP layer takes care of breaking it up into packets, reassembling it on the other end, and resending lost packets if needed.

A key idea of the protocol is that every computer has a unique IP address, and routers in-between figure out where to send each data packet to get it closer to its destination, until after a few hops, it arrives. Each packet has the destination IP address in the header, as well as the IP address of the source computer. Another thing each packet has in the header is a “port” number for the source and one for the destination. The port number is just a reference number, which should ideally tell the receiving computer which application program should be handed the data (imagine several programs all sending and receiving data over the Internet on the same computer simultaneously, but with just one stream of data. The TCP layer looks at the port number for each packet, and hands the data to the application that should get the data for that port number.

So for each destination port number, a program had to tell the TCP layer that it wants to “listen” on that one, so that the TCP layer knows where to hand the data. When you're connecting to a web page, for example, your computer sends a request to the IP address of the web server, using destination port 80, which is the standard for HTTP. When it does this, it makes up a random number for the source port number, one that isn't already being used on the source computer, so it sends the packet out with source and destination IP addresses, and source and destination port numbers. The web server, which is already set up to listen on port 80, hands the request to the program running on it that serves up web pages. That program sends some data back (the web page), using the IP address and port number of the originating computer. Your computer's TCP layer receives the data, and notices the port number matches the one it opened a connection with earlier, and hands the data back to your web browser.

That's how it works without a home switch/router. If you have one of these, the router actually sits at the IP address that your ISP assigns you, and sets your computers to different addresses (there are blocks of IP address numbers for this purpose). When you request a web page, your computer puts its private IP address as the source for the packet, but your router changes that to its IP address as it sends out the data. Then, when some data comes back addressed to it, it looks at the port number, and from that can tell that it needs to forward the packet to the computer you're browsing on, because it had just sent out some data with that port number that was from your computer. Someone else on your network could be web surfing at the same time, and the router can know which one should get which packets based on the port numbers that it had used before.

The problem is that if someone tries to send data to your computer, for a connection that your computer didn't originate, then the router can't tell which computer to forward it to. Although your computer is listening for packets with that port number, the router has no way of knowing that it's you and not your spouse that should get the data. Routers have a workaround for this problem. You can set them up so that incoming packets with port numbers that you specify should go to the computer that you specify. All you need to do is tell it which port numbers, and which computer (IP address on your private network) should get the data. The domino games use port numbers 3632 through 3637.