We do operate some JMS communication through firewalls. The settings of the firewall are depending on your JMS provider, as JMS is not a "wire protocol" but an API. There may be JMS implementations that are hard to manage through a firewall. We used JBOSS MQ and SonicMQ and found it very unproblematic: Both require only a small set of ports to be opened.
One issue that you should keep track on is the behaviour when there is no message traffic: most implementations do not exchange network data as long as no message is sent, most firewalls do have some timeout on a connection. This may lead to connections getting dropped by the firewall. The workaround that we are using here is to recreate the connection once in a while.