How to use RMI with applet client behind a firewall?
Asked Answered
C

4

7

How can I use RMI with a applet client behind a firewall?

How can I use RMI with a firewalled server and firewalled applet client? (If possible)

I know that the RMI server uses port 1099 (by default, but this is configurable); however after this the communication requires a new socket on a different random port. I also know that you can set the proxy on the client for RMI over HTTP tunneling which in theory should solve my issue. But I can't make it work (I tried setting the environmental properties on my XP client, but Internet Explorer keeps ignoring them).

Conquian answered 22/1, 2009 at 14:45 Comment(1)
Can you provide some more details on what you are trying to achieve? You basically want an applet client to communicate with a server using RMI with a firewall in between?Thorrlow
M
1

If the servers code is in your hand you could also restrict RMI to use a predifined port by providing a custom RMISocketFactory as described here: http://insidecoffe.blogspot.com/2012/02/firewall-friently-rmi-port-fixing.html

(Note specially the hint that it may cause problems if you use JMX in parallel)

Monetmoneta answered 2/2, 2012 at 11:30 Comment(0)
G
0

Have not looked into it to deeply my self yet, but while looking around for a project I am currently doing I came accross LipeRMI.

You might want to have a look at it as it geared towards internet usage and mentions "shadow the clients in such way they can be behind a local network, router or firewall;"

Edit:

Remembered another implementation I came across a while back called RMI Doves 1.0: Solution for Java RMI firewall problem you might want to have a look at that one as well.

Ganoid answered 1/2, 2009 at 11:11 Comment(0)
O
0

in your Server put the code like this:

RmiInterface stub = (RmiInterface) UnicastRemoteObject.exportObject(rmi, 35400);
LocateRegistry.createRegistry(1099);
Naming.rebind("//192.168.102.128:1099/rmi", stub);
Obellia answered 19/4, 2013 at 0:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.