Meir Yan wrote:how does emule, FogCreek CoPilot, LogMeIn does it ? or other peer to peer application
Two possible answers...
1. They don't. In a peer to peer environment. It is not possible for two peers, both of which behind a router, to communicate. Only peers that can be reached can be connected to, so... if a peer is behind a router, the peer can't be reached. It must initiate the connections, and only to other peers that are reachable.
2. They use UPnP. Many routers should support a programmatic protocol to forward the port. The program connects to the router (which is generally its default gateway) and request that a port gets forwarded to it. The router doesn't have to be manually configured to forward the port, but needs to be configured to allow UPnP.
Henry