Port 27017 — TCP
Common default port for MongoDB client connections.
What is port 27017 used for?
Connections to MongoDB databases.
Transport protocol
TCP
Security precautions
Restrict access to application networks and enable authentication and TLS.
Should we open this port in the firewall?
Allow this port only when a required service uses it. Apply least privilege: restrict authorized sources, destinations and interfaces, and log connections where appropriate.
How do I check this port?
Test-NetConnection SERVER -Port 27017
On Linux, nc -vz SERVER 27017 checks TCP connectivity only. A successful TCP connection does not validate the application, authentication or TLS configuration.
Port-to-service mappings are common conventions. Applications can use a different configured port; confirm the actual service and transport.