I have a CORBA client, written in Java, that receives notifications from server A in port 11112. Now, my server is behind a firewall, and my IP address is behind NAT. The notifications are not received any more. I suspect that server A sends the messages to my unnated IP, and it should point to the nated one... Is there any way, in Java, to specify to the server that should point to the nated IP?
-
It sounds like your client is also a server.– user207421Commented Sep 23, 2017 at 8:07
-
@EJP First, client connects to server with an IOR file, in port 32100, then it subscribes to a notification service to receive the messages through port 11112.– barathzCommented Sep 23, 2017 at 21:39
-
First, check if server is reachable from client side. If so, check if client is reachable from server side. If behind NAT as you wrote, make sure, port-forwarding is enabled OR reuse the the connection from the client. It's called Bi-directional IIOP. But I don't know which ORB you're using.– tuergeistCommented Oct 30, 2017 at 19:09
Add a comment
|
1 Answer
I found a solution. You need to set some property, in the client, that tells the ORB what the effective listening address is.
Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialPort", "11112");
props.put("org.omg.CORBA.ORBInitialHost", "MyNatedHost");
ORB orb = ORB.init(args, props);