Port 1883: MQTT

Port 1883 (TCP) is used by MQTT. Lightweight publish/subscribe messaging for IoT. 8883 is the TLS version.

1883Port
TCPProtocol
mqttIANA service name
IoT & industrialCategory

Port range

1883 is a registered port (range 1024–49151). Any user can bind to it; IANA records which service registered the number.

Security

Port 1883 should not be reachable from the public internet. Restrict it to trusted networks or a VPN, and scan your public IP to confirm it is closed.

Open port 1883 in a firewall

ufw         sudo ufw allow 1883/tcp
iptables    sudo iptables -A INPUT -p tcp --dport 1883 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=1883/tcp
Windows     New-NetFirewallRule -DisplayName "MQTT 1883" -Direction Inbound -Protocol TCP -LocalPort 1883 -Action Allow

Check if port 1883 is open

nc -vz example.com 1883
Test-NetConnection example.com -Port 1883   # PowerShell
sudo ss -tulpn | grep ':1883 '   # what is listening locally (Linux)

Other iot & industrial ports

Frequently asked questions

What is port 1883 used for?
MQTT. Lightweight publish/subscribe messaging for IoT. 8883 is the TLS version.
Is port 1883 TCP or UDP?
TCP.