Accessing emoncms included mosquitto from internet


I am struggling to access the mosquitto server included with the emoncms sd card over the internet.

My setup:-

Emoncms self hosted on raspberry Pi.

Emoncms is exposed to the internet as some of my NanodeRF devices are remote.
The access is via cloudflare as suggested elsewhere for security.

I have setup port forwarding on the router and this works perfectly. I can access emoncms from either the local network or via the internet and data is posted from the remote nanodes.

I also have the emoncms NodeRed on the same pi exposed to the internet with port forwarding and that works perfectly from either the local network or via the internet.

I use the mqtt emonpi server running and that is accessable over the local network with out any problems.

I set up port forwarding for this but I cannot access this over the internet.

If I alter a nodered mqtt flow to the internet server all I see is *connecting. Alter it back to localhost and it connects straight away

I have done a lot of googling and there is mention in some places that the listener in mosquitto.conf must be set up correctly to allow access from any port. However the mosquitto.conf on the emoncms sd has no reference to listeners.

Also I am not sure if that is the reason I cannot access the mqtt broker. Is there any way I can establish why I cannot reach the mqtt server through cloudflare?

Any thoughts? this has me baffled.