By default Docker listens only on the local Unix socket /var/run/docker.sock. If the daemon is started with -H tcp://0.0.0.0:2375, the Docker API is reachable on port 2375/TCP without encryption and without authentication. The TLS-protected variant uses port 2376 with client certificates.
Never open it publicly. Anyone who reaches the API can start containers, mount host directories and so effectively gain root on the host; exposed Docker APIs are actively scanned for this, for example for crypto miners. Better: remote access over SSH, such as docker -H ssh://admin@docker.example.com ps, or 2376 with TLS client certificate verification and a firewall restriction.
Typical: a tutorial recommends 2375 for CI or Portainer – a test from outside then shows the open API. Remove the daemon option, restart the service and delete the port forward.
Check
curl -s http://docker.example.com:2375/version