try using the http remoting - this should work through firewalls and proxys
IP or name of your server and port depends on your settings.
For EJB invocations you need to ensure that you really use invocation over http.
The general use provide information about the server so the proxy know the real ip address of the server and try to connect it.
Also if you have a clustered EJB the proxy will know the addresses of all EJB servers.
So the proxy in between might be meaningless in this case