aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes  Is there any way to overcome the router port forwarding on tcp/ip application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark " Is there any way to overcome the router port forwarding on tcp/ip application" Watch " Is there any way to overcome the router port forwarding on tcp/ip application" New topic
Author

Is there any way to overcome the router port forwarding on tcp/ip application

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
need to connect to computer over tcp/ip i have the external ip but without port forwarding I can't connect to the server . Is there any way to configure the server to accepts connection on the external ip and port define by the server without configuring the router ? (how does emule, FogCreek CoPilot, LogMeIn does it ? or other peer to peer application )
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
thanks for the answer , can you please explain me what do you mean by
"... It must initiate the connections .."
in simple words can you explain the scenario?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there any way to overcome the router port forwarding on tcp/ip application