Whenever I join into any room in game ranger (game site), it tells that "your internet connection is behind a port restricted cone NAT Router that prevents you from connecting to some players in peer-peer games."
After that, I click on continue I join into the room. But, in just 2-3 minutes, it will come out from the room and sometimes the game ranger also frequently gets disconnected and connected.
In the majority of cases, port forwarding is no longer needed. Read about the Network Changes if you haven't already.
If you have a broadband internet connection (and in some cases, dialup modems) chances are your Mac is behind a router. The main purpose of a router is to share your internet connection across multiple computers. Unfortunately, this often causes problems for hosting internet games (both with GameRanger and without).
Most Internet Service Providers (ISP's) supply a single internet address for you to use. This is your external or public IP address. The router uses this address, but the router allows your Macs to have one or more local or private IP addresses. These local or private IP addresses can only be seen from your network and are usually of the form 192.168.x.x or 10.0.x.x. This process is known as Network Address Translation (NAT) or IP Masquerading. The router also has its own local/private IP address in addition to the external/public IP address. See your router's instruction manual or contact your ISP for a detailed explanation.
When you host a game in GameRanger, other joining players need to be able to connect to your Mac, but when the incoming connection request reaches your router, your router does not know which Mac it should forward the request to, so instead, it just ignores the request. This is what is happening when other players are unable to join your hosted games.
The solution is to configure your router to do port forwarding/port mapping. This tells the router to forward requests from certain games directly to your Mac's local/private IP address. Game connection requests are identified by port numbers that distinguish them from other internet data such as email or web. The catch is that this configuration is a little different for each type of router, and the port numbers for each game are usually different. To make matters even more tricky, there are two different types of port number, TCP and UDP, but depending on your router, you may not need to know this.
Refer to your router's instruction manual for details (and contacting your ISP may also help), but most routers use web browser-based configuration. To do this, enter your router's local/private IP address into your web browser. Most router addresses are either 192.168.1.1 or 192.168.2.1, but you can find your router's address under Network in System Preferences.
If you're using an AirPort Base Station as a router, you can configure it with the AirPort Admin Utility in the Applications folder.