HTTPfy

Port 1883 (MQTT)

MQTT publish/subscribe protocol for IoT devices and home automation (Mosquitto, EMQX, Home Assistant).

Registered (user) port, 1024-49151 TCP IoT and devices Do not expose to the internet

What port 1883 is used for

MQTT publish/subscribe protocol for IoT devices and home automation (Mosquitto, EMQX, Home Assistant).

Security: should port 1883 be open?

Do not expose to the internet. Plain MQTT has no encryption, and many brokers allow anonymous access; open brokers leak sensor data and let anyone control devices. Use 8883 with TLS and require credentials.

IANA assignment

Service nameProtoDescriptionAssigneeReference
mqtt TCP Message Queuing Telemetry Transport Protocol OASIS -
mqtt UDP Message Queuing Telemetry Transport Protocol OASIS -

Registry dates for this port: last modified 2015-02-10.

Check what is listening on port 1883

Linux: is anything listening on TCP 1883?
sudo ss -tlnp 'sport = :1883'
Linux / macOS: which process owns the port
sudo lsof -nP -i :1883
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':1883 '
Windows (Command Prompt)
netstat -ano | findstr :1883
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 1883 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 1883
From Windows
Test-NetConnection HOST -Port 1883

Block port 1883 in the firewall

ufw
sudo ufw deny 1883/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 1883 -j DROP
nftables
sudo nft add rule inet filter input tcp dport 1883 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'Block TCP 1883' -Direction Inbound -Protocol TCP -LocalPort 1883 -Action Block

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.