Ubuntu Instance Can't connect to MQTT service on port 1883
in Linux
APPLIES TO:
Oracle Cloud Infrastructure - Version N/A and later
Information in this document applies to any platform.
SYMPTOMS
Oracle cloud server running a MQTT service using port 1883 and now we cannot connect from public and private network to this server port 1883
CHANGES
MQQT services was configured on Ubuntu instance and port 1883 was open to the Security List
CAUSE
By default all OS images on OCI will come with iptables configuration blocking all the services except the port 22.
SOLUTION
- Verify current IPTABLE rules:
root@ubuntu:~# iptables -L
2. Add a rule to enable port 1883 for external connections :
root@ubuntu:~# iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 1883 -j ACCEPT
Tagged:
0