My problem is
I have my rmi server behind the firewall+nat enivironment:
in the server i have
1: public ip: 11.12.13.14
2.local ip: 190.9.30.242
3.gateway ip: 90.9.30.240
i have assigned the public ip to java.rmi.hostname to public ip and registry.
rebind (localip, objectreference).
Server:
try
{
System.setProperty("java.rmi.server.hostname","11.12.13.14");
System.setProperty("java.rmi.server.useLocalHostnameproperty", "local ip");
}
catch (Exception ex)
{
System.out.println(ex);
}
System.setSecurityManager(new RMISecurityManager());
registry=LocateRegistry.createRegistry(3031);
registry.rebind("rmi://local ip:3031/server",this);
in the client i make an look up to remote object
Client:
String Rmi_Name="rmi://local ip:3031/server";
int port=3031;
Registry registry=LocateRegistry.getRegistry(public ip,port);
RmiInterface r=(RmiInterface) registry.lookup(Rmi_Name);
System.out.println(r.getMessage());
i get following Exception in Runtime
java.rmi.ConnectIOException: Exception creating connection to: 194.9.30.242; nested exception is:
java.net.NoRouteToHostException: No route to host: connect
Please help me...