Port 9200 (Elasticsearch)

Port 9200 is registered by IANA for the wap-wsp service (WAP connectionless session service), but it is best known as the HTTP API port of…

Key facts

Port
9200
Protocols
TCP
Range
Registered port, 1024-49151
IANA service name
wap-wsp
Unofficial use
The use described on this page is not the IANA assignment for this port. Source (opens in a new tab) Checked on 30.11.2026

IANA assigns ports in this range to services on request, under RFC 6335.

About port 9200

Port 9200 is registered by IANA for the wap-wsp service (WAP connectionless session service), but it is best known as the HTTP API port of Elasticsearch, a search and data analytics engine.

Common use (unofficial): according to the Elastic documentation, the default value of the http.port setting is the range 9200 to 9300, meaning the service listens on the first free port in the range, usually 9200. Communication between the servers in a cluster goes over the range 9300 to 9400. By default, Elasticsearch listens only on the server's local address. This use is not the IANA assignment; it is documented by the software vendor.

What port 9200 is used for

  • Search on websites and online stores: websites and stores send search queries to Elasticsearch and get fast, ranked results.
  • Log and data analysis: logs and metrics are stored in Elasticsearch, and Kibana displays them in charts and dashboards.
  • REST API: every operation, from adding documents to checking the cluster status, is done with HTTP requests and JSON on port 9200.

Port 9200 in the firewall

The Elastic documentation states that an unprotected Elasticsearch server must not be exposed to the internet. When the application and Elasticsearch are on the same server, keep port 9200 closed in the firewall. When another application server needs access, allow it only from that server's address:

  • UFW: ufw allow from 203.0.113.10 to any port 9200 proto tcp
  • firewalld: firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.10" port port="9200" protocol="tcp" accept'

When you restrict access to specific addresses, also delete any earlier rule that opened the port to everyone, or that general rule will keep allowing access from any address.

Open port 9300 only between the servers of the cluster itself.

Risks and security

In new installations, the first time the service starts, Elasticsearch automatically turns on TLS encryption for the HTTP interface and for communication between the servers, and sets a password for the elastic user. A few simple settings keep this protection in place:

  • Keep the security features turned on, and don't turn them off to make connecting an application easier.
  • Create users or API keys for applications with only the permissions they need, instead of using the elastic user.
  • Don't change the listening address (network.host) to a public address without suitable firewall rules.
  • Set up regular backups (snapshots) of the data.

Commands to check and configure

  • curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200

    Checks that Elasticsearch is running and responding on port 9200, and shows the server details. The elastic password is prompted for separately.

  • curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic "https://localhost:9200/_cat/health?v"

    Shows the cluster status (green, yellow, or red) and the number of servers in it.

  • /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic

    Resets the password of the elastic user and shows a new password (on an installation from an RPM or DEB package).

  • systemctl status elasticsearch

    Shows whether the Elasticsearch service is running, and the last lines of its log.

  • ss -tlnp | grep ':9200 '

    Checks which address Elasticsearch is listening on: 127.0.0.1 means local access only (requires root privileges).

  • ufw allow from 203.0.113.10 to any port 9200 proto tcp

    Allows access to port 9200 only from the specified IP address (UFW).

  • firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.10" port port="9200" protocol="tcp" accept'

    Allows access to port 9200 in firewalld only from the specified IP address. Then run firewall-cmd --reload.

Port 9200 in the IANA registry

Port Protocol Service IANA registry description
9200 TCP wap-wsp WAP connectionless session service
9200 UDP wap-wsp WAP connectionless session service

Data source: IANA Service Name and Transport Protocol Port Number Registry (opens in a new tab)

Port 9200 FAQ

Do I need to open port 9200 for my website to use Elasticsearch?

No. When the website and Elasticsearch are on the same server, there is no need to open it. In that case the website connects to localhost, and the port stays closed in the firewall. Open it only for another server that needs to connect, and only for its IP address.

What's the difference between port 9200 and port 9300?

Port 9200 carries the HTTP interface, where applications and tools send requests to Elasticsearch. On port 9300, the servers of the cluster communicate with each other. That's why port 9300 is opened only between the cluster servers.

How do I check that Elasticsearch is running?

Run curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200 on the server and enter the password. The response shows the cluster name and the server details. The curl commands page has more options for sending HTTP requests.

What do I do if I forget the elastic user's password?

Run /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic on the server. The tool sets a new password and shows it, and then you update it in the tools that use it.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement