Fernando already provided a link to my blog post :) ..it's not trivial. You have to provide your own RMIServerSocketFactoryImpl that creates sockets on the wanted address.
If internal/external interfaces are the problem and you have local access setting up a local firewall might be easier.