Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RMI, NAT firewall, and callbacks

896954Oct 31 2011 — edited May 8 2012
Hi,

My problem is similar to many other problems that have been posted over the span of nearly a decade on this forum. However, I'm starting this thread because my search through the forum didn't make me happy, and because I hope that with new versions of Java new things might be possible.

My setting: the server has a public IP, a client is behind a NAT firewall. The client passes a Remote object to the server so that the server can call back the client some time later. This setting is nowadays very common in Internet: clients are run on ubiquitous home routers with NAT, and servers are available on public IP addresses.

One way to solve this problem is to instruct the server to use the TCP connection already established by the client when the server wants to call back the client. This way the NAT firewall will not block the server communication, because it will be part of the connection initiated by the client. So it looks like using a socket factory might be a solution.

Is the solution with socket factories possible?


Thanks,
Irek

Edited by: 893951 on 2011-10-31 04:44

Edited by: 893951 on 2011-10-31 04:52
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2012
Added on Oct 31 2011
18 comments
10,508 views