Sorry been away from HA community for a while. No, you don’t have to specify the port. These are predefined by cloud flare as open ports that can be used. I don’t believe I did any other settings other than the ones I showed. I did have to tinker with EMQX settings. I have not tried this with mosquito thought.
Just remember, in cloudflare, your DNS ip will be the same as your local NPM ip NOT your home ip address. for me it was 192.168.0.159
In all honesty, I don’t use this setup anymore. The more I read about cyber security and how bad open ports are, the more I have clamped down. In my case a couple sensors data was not worth the risk.