Skip to content

Commit cbffd12

Browse files
Kovahjrodewig
authored andcommitted
[DOCS] Add warning about Docker port exposure (#50169)
Docker bypasses the Uncomplicated Firewall (UFW) on Linux by editing the `iptables` config directly, which leads to the exposure of port 9200, even if you blocked it via UFW. This adds a warning along with work-arounds to the docs. Signed-off-by: Kovah <[email protected]>
1 parent 7c5a3bc commit cbffd12

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/reference/setup/install/docker.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ endif::[]
8787
This sample Docker Compose file brings up a three-node {es} cluster.
8888
Node `es01` listens on `localhost:9200` and `es02` and `es03` talk to `es01` over a Docker network.
8989

90+
Please note that this configuration exposes port 9200 on all network interfaces, and given how
91+
Docker manipulates `iptables` on Linux, this means that your {es} cluster is publically accessible,
92+
potentially ignoring any firewall settings. If you don't want to expose port 9200 and instead use
93+
a reverse proxy, replace `9200:9200` with `127.0.0.1:9200:9200` in the docker-compose.yml file.
94+
{es} will then only be accessible from the host machine itself.
95+
9096
The https://docs.docker.com/storage/volumes[Docker named volumes]
9197
`data01`, `data02`, and `data03` store the node data directories so the data persists across restarts.
9298
If they don't already exist, `docker-compose` creates them when you bring up the cluster.

0 commit comments

Comments
 (0)