How do I change the default port (5222)?

I would like to change the default port from 5222 to something else. This is because the server admin already allowed 5222 in the firewall (and I don’t want to change that), but I want to make it unavailable from the outside network. Inside I wish to use a library (xmpplib, an XMPP library written in PHP), which does not work reliably if used with SSL or TLS (and perhaps not easy to fix, the problem might also be in PHP). So I would like to make this port reachable for unencrypted connections from within the server, and restrict outside connections to be encrypted (the old SSL method on port 5223 should be OK for this purpose I guess).

I already tried to change DEFAULT_PORT in ConnectionManager.java, recompile and replace openfire.jar with the newly generated file, but had no success. I tried to use source 3.3.3.

Otherwise this is an issue beyond my understanding: in most server programs you can configure the listening ports easily, with openfire it does not seem to be possible.

Please help!

You will have to use a router or a hardware firewall between your server and the internet and block the 5222 port to the internet.

Have you tried logging into the admin console and selecting the “edit properties” button on the “Server Setting” page?

Reuben, thanks for the answer, but if you read my post carefully you’ll see that there is a firewall already, but I did not want to bother the admins now, because I was not sure how lasting this setting will be. I am just trying out certain things with a server, which is on the Internet, but it’s not a production environment.

Bill,

Thank you very much for the answer. I have been several times on the “Server Settings” page, but never noticed the “Edit Properties” button, because it was at the bottom of the page. Usually I am able to handle web interfaces. Maybe the page is the most beautifully rendered this way, but there is a chance that this button is overlooked.