Perhaps there is somebody interested in this. So I just reply to myself. Here are the steps to do this:
1) install cygwin on both local machine and the server behind firewall;
2) Use ssh to setup the port forwarding. For example:
ssh userid@server -L 5000:localhost:5000
3) run jboss in debug mode on server. Please refer to how to remote debug jboss in jbuilder enterprise edition;
4) In Jbuilder, start the debug session which will listens to the 5000 port.
Now you could start, stop and debug into both jboss code and your ejb code.