RMI Server API access on a Virtual Private Network (VPN)

When the Remote Server RMI API is accessed from a client on a Virtual Private Network (VPN), the VPN assigns an IP address to the RMI client machine. This VPN-assigned IP address needs to be specified in an RMI Java system property. If the RMI client is the Remote , then this property can be set by adding the following line to the java command.

-Djava.rmi.server.hostname=<IP_address>

Where IP_address is the VPN-assigned IP address.

If the RMI client is a custom Java program, then this property can be set from within the Java code in the following way:

java.lang.System.setProperty("java.rmi.server.hostname", "IP_Address"); 

Where IP_address is the VPN-assigned IP address.

Please note that the RMI Java system property needs to be set before any RMI Server API related RMI code.

Advertisements
This entry was posted in java, Technical. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s