So far, we have been working with a Mosquitto server with its default configuration, which listens on port 1883 and uses plain TCP as the transport protocol. The data sent between each MQTT client and the MQTT server isn't encrypted. There are no restrictions on subscribers or publishers. If we open firewall ports and redirect ports in the router, or we configure port securities for a cloud-based virtual machine in which the MQTT server is running, any MQTT client that has the IP address or host name for the MQTT server can publish to any topic and can subscribe to any topic.
In our examples in Chapter 2, Using Command-Line and GUI Tools to Learn How MQTT Works, we haven't made any changes in our configurations to allow incoming connections to port 1883, and therefore we haven't opened our Mosquitto...