Port 1883 is the MQTT broker port for lightweight publish-subscribe messaging. MQTT is the dominant IoT protocol – designed for constrained devices with minimal bandwidth and power. Port 1883 is unencrypted; use port 8883 for MQTT over TLS. Default Mosquitto installations allow anonymous connections – always configure authentication.
Port Number
1883
Protocol
TCP
Service
Message Queuing Telemetry Transport
Range
IANA Registered (1024–49151)
Subscribe to ALL topics (tests if anonymous wildcard access is possible – should fail)
mosquitto_sub -h broker -t '#' -vTest if anonymous publishing is allowed (should be rejected)
mosquitto_pub -h broker -t 'test/probe' -m 'security-audit' -u '' -P ''Probe MQTT broker for anonymous access
nmap -p 1883 --script mqtt-subscribe targetAudit Mosquitto security configuration
grep -E 'allow_anonymous|password_file|acl_file' /etc/mosquitto/mosquitto.confmosquitto_sub -h broker -t 'sensors/#'
mosquitto_pub -h broker -t 'sensors/temp' -m '22.5'
mqtt-spy --broker broker:1883MQTT (Message Queuing Telemetry Transport) was created by Andy Stanford-Clark (IBM) and Arlen Nipper in 1999 for SCADA systems over satellite links. Designed for low-bandwidth, unreliable networks with minimal overhead (2-byte header). Port 1883 was registered with IANA. MQTT became the dominant IoT messaging protocol – used by AWS IoT, Azure IoT, Facebook Messenger (originally), and millions of IoT devices. MQTT 5.0 (2019) added shared subscriptions, topic aliases, and reason codes.
How do I secure an MQTT broker?
1. Set allow_anonymous false in mosquitto.conf. 2. Create password file: mosquitto_passwd -c /etc/mosquitto/passwd user1. 3. Configure ACL file restricting topics per user. 4. Enable TLS: listener 8883, certfile/keyfile/cafile. 5. Disable port 1883 (listener 1883 → remove or bind to 127.0.0.1). 6. For IoT devices: use client certificates (TLS mutual auth) instead of passwords. 7. Set max_connections and message_size_limit to prevent DoS.
MQTT vs AMQP vs HTTP for IoT?
MQTT: lowest overhead (2-byte header), persistent connections, pub/sub model, designed for constrained devices (ESP32, sensors). Best for: telemetry, real-time control, battery-powered devices. AMQP: heavier protocol, message queuing with delivery guarantees, complex routing. Best for: enterprise messaging between servers. HTTP: request/response only, highest overhead, but universally supported. Best for: infrequent updates from devices with good connectivity.