OpenSearch network ports and firewall rules

OpenSearch uses a small set of TCP ports, and each one carries different traffic and needs its own TLS and access decisions. This page shows which flows to allow, how to scope them, and what to confirm before changing firewalls.

On this page

Which OpenSearch ports to open and why

OpenSearch uses TCP ports 9200, 9300, 5601 and 9600, and it uses no UDP ports, so firewall rules for a new or migrated cluster are TCP-only. Port 9200 carries the REST API that clients, indexing pipelines and administrators call. Port 9300 carries node-to-node transport traffic, which covers cluster coordination, shard replication and cross-cluster search. Port 5601 serves OpenSearch Dashboards for users in a browser, and port 9600 serves Performance Analyzer metrics. Each of these is a separate flow with a different set of allowed sources.

The rules you write depend on the deployment layout more than on the port numbers. A single-node lab needs almost nothing open beyond the client path, while a multi-node cluster with dedicated cluster manager, data and ingest nodes needs 9300 open between every pair of nodes that can hold or coordinate shards. Dashboards needs a path to 9200 on the cluster, and any ingest agent, load balancer or application needs a path to 9200 as well. Confirm which hosts will run each role before you write the rule set, and confirm whether Performance Analyzer is enabled in your version, since 9600 only matters when it is running. Check the current OpenSearch install documentation for the defaults in your release.

Plan TLS per layer, because the defaults differ. Per the OpenSearch security best practices, TLS is enabled by default on the transport layer on 9300 and disabled by default on the REST layer on 9200, so a cluster that was only copied from a sample file may serve plaintext client traffic. Decide whether 9200 and 5601 will be encrypted end to end, then check that certificates, Dashboards connection settings and any proxy or load balancer agree. Write the rules so that only the named sources reach each port, and test each flow after the change with a connection check from the source host rather than assuming the rule works.

How clients, nodes and Dashboards connect across ports

Traffic starts at user networks and reaches the Dashboards tier on 5601, which then calls the cluster REST API on 9200. Inside the data tier, nodes talk to each other on 9300, which also carries cross-cluster search to remote clusters, while Performance Analyzer exposes metrics on 9600. Check each hand-off separately: the user-to-Dashboards path, the Dashboards-to-REST path, the node-to-node path, and whether 9600 is reachable from anywhere outside your monitoring network.

Port flows between user networks, Dashboards and the OpenSearch data tier.

Port reference: what each port carries and who should reach it

This table compares the four TCP ports OpenSearch uses, what traffic each one carries, and who should be able to reach it. Read each row as a default to confirm against your own topology, then tighten it so that only the clients and hosts that need a port can open it. The main takeaway is that 9300 should stay inside the cluster network, while 9200 and 5601 are the ports most often exposed to users and applications.

PortProtocol and trafficTypical source and destinationReachable from outside the cluster network?
9200TCP, REST API over HTTP or HTTPSApplications, log shippers, scripts and Dashboards to cluster nodesOnly through an approved gateway or load balancer, if at all
9300TCP, node-to-node transport and cross-cluster searchCluster nodes to each other, and to remote clusters for cross-cluster searchNo; keep it inside the cluster network or between clusters you explicitly connect
5601TCP, OpenSearch Dashboards web interfaceAnalysts and administrators' browsers to Dashboards, and Dashboards to the REST portPossibly, behind a reverse proxy with SSO and TLS, if your policy allows
9600TCP, Performance Analyzer metricsMonitoring collectors and administrators to nodes; confirm the exact consumers in your setupNo; restrict to monitoring hosts only

How TLS applies on each layer of the cluster

TLS is on by default for node-to-node transport on port 9300 but off by default for the REST layer on port 9200, so the client and Dashboards path is the one your team must decide and configure on purpose. A cluster that starts cleanly can still accept plain HTTP on 9200 from any host that can reach it. Treat the REST layer as a separate configuration item from the transport layer, with its own certificate, its own owner and its own check.

For the transport layer, verify that every node presents a certificate issued by the internal CA you chose, that nodes reject peers whose certificates do not chain to that CA, and that hostname verification is enabled where the configuration supports it. For the REST layer on 9200, verify that HTTPS responds, that the certificate covers the names clients actually use (load balancer, DNS alias or node address), and that plain HTTP requests fail. Confirm the exact setting names and defaults for your version in the security configuration reference before you write them into opensearch.yml, since they change between releases. Check the same things for the Dashboards connection on 5601 and for any cross-cluster connection that reaches port 9300 on a remote cluster.

Certificate trust and hostname handling decide which clients can connect. A client that does not trust your CA, or that connects by an IP address or alias missing from the certificate's subject alternative names, will fail the handshake, and teams often respond by disabling verification instead of fixing the name list. Record which CA signs each layer, where the trust store lives on every client and Dashboards host, and who renews certificates before they expire. The OpenSearch security best practices page is the natural next read for the baseline settings to apply on each layer.

Scoping firewall rules by traffic flow

Each OpenSearch port serves a different set of callers, so each should get its own rule rather than one broad opening. The cards below cover the five patterns that cover most production clusters, and each names the risk it reduces and the operational cost of holding that line.

Allow 9200 only from application tiers

Port 9200 carries the REST API that applications, ingest pipelines and Dashboards use to query and index data. Restrict it to the source addresses of application servers, ingest agents and the Dashboards hosts. This limits who can send queries or bulk writes even when a credential leaks. The trade-off is maintenance: every new service or autoscaling group needs a rule change, so ask who owns those requests and how quickly they are handled.

Installing OpenSearch docs

Restrict 9300 to cluster nodes

Port 9300 carries node-to-node transport traffic and cross-cluster search. Open it only between cluster nodes and to remote clusters you have approved by name. Every node that can reach 9300 can attempt to join the cluster, so a flat network opening here is one of the most serious exposures. Confirm the list of approved remote clusters with the owners of each one, and review it whenever a cluster is retired or replaced.

Security best practices

Limit 5601 to user networks

Port 5601 serves OpenSearch Dashboards, where analysts and administrators sign in and run searches. Allow it only from the user networks or a reverse proxy that terminates TLS in front of Dashboards. Placing a proxy in front lets you apply access logging, rate limits and a single certificate. The cost is one more component to patch and monitor, and the proxy must forward authentication headers correctly if your SSO flow depends on them.

Restrict 9600 to monitoring collectors

Port 9600 exposes Performance Analyzer metrics about node health and resource use. Allow it only from the monitoring collectors that scrape these metrics. Those metrics show node topology, workload patterns and resource pressure, which is useful reconnaissance for an attacker. The trade-off is that dashboards or alerts break when a collector moves to a new address, so record the collector addresses in your change process and test the scrape after any network change.

Default-deny all other traffic

A default-deny policy blocks every inbound connection to the OpenSearch hosts that is not on an explicit rule. Start from deny and add only the flows named above. OpenSearch uses TCP only, so UDP rules are not needed for these ports. The risk this reduces is an unexpected listener or a host reachable from a broader segment than intended. The trade-off is that a missing rule shows up as a failed health check or a timeout, so confirm the expected flows with your network team before cutover.

How port planning changes by deployment method

On Kubernetes, the cluster network is the first layer. Port 9200 and 5601 are usually exposed through a Service and then through an ingress or load balancer, while 9300 normally stays inside the cluster for node-to-node traffic. Port 9600 is typically reached only by monitoring tooling, so it should not be published at the ingress. Cross-cluster search adds a path that crosses cluster boundaries, which often means a dedicated load balancer or routed network rather than the default pod network.

  • Service types: Confirm whether each port is exposed as ClusterIP, NodePort or LoadBalancer, and which ports each Service carries.
  • Ingress scope: Confirm that only the REST and Dashboards endpoints are routed externally, and that the ingress passes TLS through or terminates it as your policy requires.
  • Network policies: Confirm which namespaces and pods may reach 9300 and 9600, and whether the policy engine in your cluster enforces them.
  • Cross-cluster routes: Confirm how 9300 traffic reaches a remote cluster, including DNS names and the load balancer address.
  • Operator and chart settings: Confirm the service and TLS values in your chosen operator resource or chart, and check them against the rendered manifests before applying.

Check the rendered Services, ingress rules and network policies against this list before the first deployment.

Setting up ports and TLS in the right order

This sequence turns a list of traffic flows into a locked-down port map, with TLS enabled on each layer and checks at every stage. The result is a cluster where only the mapped flows reach 9200, 9300, 5601 and 9600, and each one is verified before the next change.

  1. Inventory every traffic flow

    Before touching a firewall, list every source that talks to the cluster: application clients, ingest agents, data nodes talking to each other, Dashboards servers, cross-cluster peers, monitoring systems and administrators. For each flow, record the source address, the destination node or group, the port (9200, 9300, 5601 or 9600) and the protocol. Ask the platform team and the application owners to confirm the list, since missing flows are the most common cause of outages after rules change. Done means every flow has a row in a written table that both teams have reviewed.

  2. Decide the TLS posture for 9200 and 9300

    Transport traffic on 9300 has TLS enabled by default, while REST traffic on 9200 has it disabled by default, so the REST decision is the one that needs an explicit choice. Record whether clients will connect over HTTPS on 9200, whether node-to-node and cross-cluster traffic on 9300 will use mutual TLS, and which certificate authority signs each layer. Confirm these choices with the security team and with the owners of any client that cannot yet speak TLS. Done means a signed decision record exists for each layer and each exception has an owner and an end date.

  3. Write default-deny rules and allow mapped flows

    Set the host or network firewall to deny inbound traffic to the OpenSearch ports by default, then add one allow rule per row in the inventory. Scope each rule to a source range or specific host and to a single port, and avoid opening 9300 to clients that only need 9200. Keep a separate rule set for administrators reaching 9200 and 9600. Check that no UDP rule is needed, because OpenSearch uses TCP only. Done means a rule export matches the inventory one-to-one, and a scan from an unlisted host shows the ports closed.

  4. Configure TLS on the REST and transport layers

    Apply the certificate settings in the cluster configuration: enable HTTPS on the REST layer, enable and require certificates on the transport layer, and set the trust chain each node and client will use. Do this one node at a time in a rolling pattern if the cluster is already running, and keep the previous configuration available for rollback. The platform team should review the security plugin settings with the security team before the change goes live. Done means every node starts cleanly, reports healthy cluster status, and presents the expected certificate on 9200 and 9300.

  5. Verify each flow with the expected certificate

    Test every row in the inventory from its listed source. For each connection, confirm the port is reachable, the TLS handshake completes, the server certificate matches the expected issuer and hostname, and the client's own certificate is accepted where mutual TLS applies. Record the command used, the result and the certificate fingerprint. Test a sample from an unlisted host as a negative check. Done means every flow in the inventory has a passing result and every negative test fails as intended.

  6. Confirm Dashboards and cross-cluster connections

    After the rules and TLS settings change, retest the flows that users depend on most: Dashboards reaching 9200 with its service account, Dashboards opening in a browser on 5601, and any cross-cluster search connection over 9300. Check that Dashboards logs show a successful connection, that a sample query returns results across each remote cluster, and that Performance Analyzer on 9600 is reachable only from the monitoring source. Repeat this check after each rule change or certificate rotation. Done means the end-user paths work and the results are saved with the change record.

Security and operational risks of exposed cluster ports

Each OpenSearch port carries a different exposure. The REST, transport, Dashboards and Performance Analyzer ports need separate controls, and a firewall rule alone does not protect them. The cards below pair each exposure with the Security plugin control, monitoring check or change process that should catch it.

Plaintext REST access on 9200

Port 9200 serves the REST API that clients, scripts and Dashboards use to read and write data. TLS is disabled by default on the REST layer, so a cluster deployed without enabling it sends credentials and query results in plaintext to anything that can reach the port. Before any network path opens to 9200, confirm that HTTPS is enforced on the REST layer, that the Security plugin requires authentication for every role, and that anonymous access is disabled.

Security best practices

Node traffic reachable on 9300

Port 9300 carries node-to-node communication and cross-cluster search. TLS is enabled by default on the transport layer, but that protects the traffic only if the certificates are validated against your own certificate authority and node identities are checked. A firewall that opens 9300 to subnets outside the cluster lets any host that can complete the handshake try to join or query the cluster, so restrict 9300 to cluster nodes and to the specific remote clusters that need cross-cluster search.

Performance Analyzer exposed on 9600

Port 9600 serves Performance Analyzer metrics about node health, JVM and request behavior. This data helps an attacker map the cluster's load and topology, and it is easy to forget because it is not part of the client path. Keep 9600 limited to your monitoring collector, and confirm in your environment whether it is bound to an interface other hosts can reach before you publish any route to it.

Dashboards access on 5601

Port 5601 serves OpenSearch Dashboards, which holds saved queries, index patterns and often the sensitive data users explore. Dashboards sessions depend on the authentication backend configured in the Security plugin, such as SAML, OpenID Connect or LDAP. Confirm that users reach Dashboards only through the identity provider and a TLS-terminating proxy, and that audit logs record Dashboards logins alongside cluster requests.

Audit logs for port activity

Firewall logs show which hosts connected, but not which user ran which query. The Security plugin provides audit logs that record authentication and requests against the cluster, which lets your security team connect a network event to an identity. Decide before go-live where audit logs are stored, who can read them, and how long they are retained, and test that a denied connection and a failed login both appear in the log.

OpenSearch security docs

Rule drift during upgrades and replacements

Rules that were correct for the original nodes often break when a node is replaced, a new data node joins, a load balancer is added, or a rolling upgrade changes the set of hosts involved. Over time, temporary rules become permanent and no one can explain why a host has access. Keep port rules in version-controlled infrastructure code, review every change through your normal change control, and run a port scan from outside the allowed networks after each upgrade or node replacement.

Questions teams ask before writing OpenSearch firewall rules

Does OpenSearch need any UDP ports open?

No. OpenSearch uses TCP only, so firewall rules for the cluster and its Dashboards are TCP rules. Port 9200 serves the REST API, port 9300 carries node-to-node communication and cross-cluster search, port 5601 serves Dashboards, and port 9600 serves Performance Analyzer. Because no UDP ports are used, a rule set that opens UDP for OpenSearch is usually copied from another product or left over from an earlier design. Confirm the list against the version you deploy, since your load balancer, monitoring agents and backup tooling may add their own flows that sit outside OpenSearch itself.

Which OpenSearch ports should users reach directly?

As a rule, end users should reach only Dashboards on port 5601, and only through a reverse proxy or load balancer that you control. Applications and automation that index or query data need port 9200 on the coordinating or client-facing layer, not on every data node. Port 9300 should be open only between cluster nodes and between clusters that take part in cross-cluster search. Port 9600 is for monitoring systems and administrators, not for users. Restricting each port to named source networks, rather than to whole subnets, is the main control that reduces exposure.

Is TLS turned on by default in OpenSearch?

It depends on the layer. TLS is enabled by default on the transport layer, which is the node-to-node traffic on port 9300, and disabled by default on the REST layer, which is port 9200. Dashboards and client connections also need their own encryption settings. A firewall rule that allows a port does not protect the traffic on it, so you should plan certificates for the REST layer, the transport layer and Dashboards separately, and decide which certificate authority issues each one. Confirm the current defaults for your version in the security best practices documentation before you write the rules.

How much effort does a port review take, and what drives it?

Effort depends mainly on how many clusters, network zones and client types you have, not on the number of ports, which is small. A single cluster with one Dashboards instance and a few application clients is a short review. Effort grows when you have separate ingest zones, cross-cluster search between sites, load balancers in front of the REST layer, monitoring tools that scrape port 9600, or a segmentation policy that needs an exception record for every flow. Ask any firm for a fixed scope that lists the flows, the zones and the number of review rounds before you agree on a price.

What does the team need to provide before a firewall review starts?

Prepare four inputs. First, a network diagram that shows zones, subnets, load balancers and the cloud or data center boundaries. Second, a list of every client, application and monitoring system that will connect, with its source addresses. Third, the certificate authority or PKI that will issue node, client and Dashboards certificates, plus the rotation policy. Fourth, the change windows and approval path for firewall updates in your environment. Having these ready shortens the review, and it also gives your security team the evidence it will ask for later.

Can our own team write and test the OpenSearch firewall rules?

Yes, many teams do. The port list is short and the official install documentation names each port, so an experienced network or platform team can write the rules. The work that usually needs outside help is tying the rules to certificates, source-address policies, Dashboards authentication and your audit evidence, then testing that each flow works and that blocked flows stay blocked. Decide early who owns the rule set after go-live, because firewall rules tend to drift when a new client or zone is added. A fixed-scope engagement can cover that design and testing, and DeployOpen can also review rules your team has already written.

How should we test that OpenSearch firewall rules work?

Test both directions. Confirm that each allowed flow works from its approved source, such as an application reaching port 9200 or Dashboards reaching the cluster on port 9200 with valid certificates. Then confirm that every other source is refused on 9200, 9300, 5601 and 9600, including from user networks and from the internet. Repeat the tests after each node, certificate or load balancer change. Keep the test results with the change record so that the rule set can be shown to auditors and to your own security team.

How DeployOpen works on this

DeployOpen plans, implements, hardens, documents and supports self-hosted OpenSearch inside your own infrastructure, including the port map and TLS layers for your clients, nodes and Dashboards. Engagements are fixed-scope, with the port inventory and TLS decisions agreed in writing before any firewall change is made.

How we scope

  • Inventory every client, service, node and Dashboards path that must reach 9200, 9300, 5601 and 9600.
  • Confirm whether cross-cluster search or remote clusters need 9300 reachable across network segments.
  • Agree in writing which TLS layers are enabled on transport and REST, and which certificates each one uses.

How we build

  • Draft the port matrix with source, destination, protocol and purpose for each TCP flow, with no UDP rules.
  • Write firewall rules and security group changes in your change-control format, reviewed before deployment.
  • Enable REST-layer TLS and verify that transport-layer TLS stays on, testing each connection path after the change.

How we hand over

  • Deliver the port matrix, firewall rule set, TLS configuration notes and a record of each verification test.
  • Document how Performance Analyzer on 9600 is restricted to monitoring hosts, and how Dashboards on 5601 is reached.
  • Walk your network, security and platform teams through the runbook so they can review changes later.

How we support

  • Retest the port matrix after OpenSearch upgrades, new nodes or added cross-cluster connections.
  • Rotate certificates and review open ports as part of a retainer when your team asks for ongoing support.
  • Provide retesting and updates under a retainer agreed in writing, with the scope of each visit set in advance.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.