If you want to be able to take things off a RabbitMQ queue or push things to it from other servers, you should open port 5672.
Copy-paste solution
Create or edit the rabbitmq.config in /etc/rabbitmq/
vim /etc/rabbitmq/rabbitmq.config
Add this code to bind the port to all interfaces.
[
{rabbit, [
{tcp_listeners, [{"0.0.0.0", 5672}]}
]}
].
Restart the Rabbit MQ server.
systemctl restart rabbitmq-server
Test connection from other devices (replace with your own Rabbit MQ server’s IP address).
telnet 1.2.3.4 5672
The response should look like below. If not, maybe your firewall or SELinux is blocking it.
Trying 1.2.3.4...
Connected to 1.2.3.4.
Escape character is '^]'.
Limit access to port 5672
Now the RabbitMQ port is open for all remote devices to connect to. In my case, I use a firewall to secure access to port 5672, you should too 🙂 Otherwise anyone can push and listen to your queues… you only want your own devices to be able to connect.