Port Forwarding Question
Ok, so I have a java application that creates a peer connection between two computers. I am using SSL sockets with a server on one end and a normal socket on the other end. Here is my problem. When I am behind a router, the connection fails. If i go in and forward the port on the router, I can connect with no problems. I don't like this as it forces people who will be using this application to manually set up port forwarding on their routers. Is there a way in java to get around this? Would UPnP or NAT help at all? I am currently digging through the azureus source code but its taking a while. Hope someone out there has some ideas. Thanks
[653 byte] By [
bdtdawga] at [2007-10-3 10:09:19]

NAT is what the router is doing. More technical - Port Address Translation (PAT) also called NAT overloading.
Network Applications require network setup, this sometimes requires a routing/firewall to be configured. This is part of config/install of the app. This is a normal way of implementing applications.
I'm not sure why you say you are able to use SSL on the server and not on the client, as SSL requires client/server to use SSL in order to acheive the secure connection.
Anyway, Java does support UPnP, and it can be used to configure UPnP-enabled routers. However, in a corporate network, most commerical-grade equipment will not allow UPnP configuration, as it is a security risk.
As a part of NORMAL APPLICATION INSTALLATION AND CONFIGURATION, network administrators may have to configure network components to properly install a service.
In a home-based environment, where a consumer device such as a Linksys, NetGear, etc. DSL/Cable Modem is used, then UPnP is a good choice as those users will not likely be able to do the work.