This discussion is archived
2 Replies Latest reply: Feb 15, 2013 5:07 AM by 991277 RSS

local and remote connections behind NAT

991277 Newbie
Currently Being Moderated
Hi,
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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points