Firewall port block

I have setup open fire on AWS linux server. with default port number 5222 and 5223.

But both port are blocked on some firewall withc restrict our application to work on wifi.

Actually, you don’t need 5223 anymore, it is old obsolete SSL port. SSL communication should happen on 5222 if SSL is required.

And what is your question? If you can’t open 5222 port on your firewall, you can try changing that port to something else on Admin Console. And you would have to change this port on every client. But this port has to be open only on your server (AWS). Clients are not going out through that port, they just point to that port on the server. Client’s outgoing connection happens on random tcp port.