Safeguard
Security Guides•

Which ports does RabbitMQ use, and which should stay private?

RabbitMQ uses 5672, 5671, 15672, 4369, 25672 and more by plugin. Which ports to open to apps, which to keep inside the cluster, and how to check.

Safeguard Security Team
4 min read

RabbitMQ clients use 5672 (or 5671 with TLS). The management UI uses 15672 or 15671 if enabled. Ports 4369 and 25672 are for node and CLI communication and should stay inside your cluster network unless you have a specific reason, such as federation, to expose them.

The port list

This table comes from the RabbitMQ networking documentation. Several ports exist only if a plugin is enabled.

PortUsed forTypical audience
5672, 5671AMQP 0-9-1 and AMQP 1.0 clients, without and with TLSApplications
5552, 5551Stream protocol clients, without and with TLSApplications using streams
6000 to 6500Stream replicationCluster nodes
4369epmd, peer discovery for nodes and CLI toolsCluster nodes, admin hosts
25672Inter-node and CLI communication (Erlang distribution)Cluster nodes, admin hosts
35672 to 35682Client range used by CLI toolsAdmin hosts
15672, 15671HTTP API and management UI, without and with TLS (management plugin)Operators
61613, 61614STOMP, without and with TLS (plugin)Applications using STOMP
1883, 8883MQTT, without and with TLS (plugin)MQTT devices
15674, 15675STOMP and MQTT over WebSockets (plugins)Browsers or devices
15692, 15691Prometheus metrics, without and with TLS (plugin)Monitoring

Port 25672 is allocated from a dynamic range that defaults to a single port, computed as the AMQP port plus 20000.

What the documentation says to keep private

The same page says that unless external connections on the inter-node ports are really necessary, such as when the cluster uses federation or CLI tools run on machines outside the subnet, they should not be publicly exposed. That covers epmd and the distribution port. These ports carry the traffic that cluster nodes use to trust each other, which is why the Erlang cookie matters.

Steps to tighten

  1. Run a port check from a host outside your trusted network against each broker host and write down every open port from the table.
  2. Close anything that is not needed. If you do not use MQTT or STOMP, disable the plugin so the listener does not exist.
  3. Separate audiences. Application subnets get the client ports. Operators get the management ports through a VPN or bastion. Cluster nodes get everything between themselves.
  4. Move clients to TLS. RabbitMQ documents a configuration that disables the plain TCP listener and enables a TLS listener on 5671 with peer verification. Decide whether to require client certificates.
  5. Check the management plugin. It is a web interface and an HTTP API, so treat it like any admin console, with named users and no public listener. See RabbitMQ guest user remote access and how to lock down.
  6. Record the result so reviewers can see what the intended exposure is.

Plugins change the answer

A quick look at the default ports can mislead. Every enabled plugin adds a listener, and a broker that started life as plain AMQP may now accept MQTT, STOMP, WebSocket and metrics connections too. Review which plugins are enabled each time you review the ports, not only once during setup.

The Prometheus metrics port deserves a mention. Metrics are not secrets in the same sense as messages, but queue names and counts can reveal how your system works. Limit it to your monitoring network.

Try it yourself

Click through it at your own pace, or open it full screen. Watch how repeated checks surface change over time, and consider how a newly enabled plugin would show up in your own review.

Safeguard's asset discovery and policies can help you keep an inventory of infrastructure like brokers, and the free scan covers your code and dependencies.

Quick check

Is it safe to expose 15672 to the internet if I use a strong password?

It is better to keep the management UI on an operator network. A strong password helps, but the interface is an administrative surface and does not need a public listener.

Why does RabbitMQ use two or three ports for node communication?

Port 4369 (epmd) helps nodes and tools find each other, 25672 carries inter-node and CLI traffic, and 35672 to 35682 is the range CLI tools use for their side of the connection.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.