2 Replies Latest reply on Feb 15, 2013 1:07 PM by 991277

    local and remote connections behind NAT

      I've got a jmx server behind a NAT, setting java.rmi.server.hostname to the public IP allowed me to connect remotely, however now I can't connect locally (same LAN of the server behind NAT) any more.
      The problem is that even if the local jmx client tries to connect to service:jmx:rmi://<internal IP>:jmxPort/jndi/rmi://<internal IP>:rmiPort/jmxrmi
      then after establishing the connection to the RMI registry it'll receive the RMI stubs with the public IP of the server (not the internal IP) and the connection will fail as it would require NAT reflection to work.
      Is there an easy solution for this?
      Would it be possible at the jmx client side to rewrite the IP in the RMI stubs?
      Thanks for any help