Port 27017: MongoDB
Port 27017 is the default MongoDB listener. Unsecured MongoDB on this port has caused many data leaks, so enable auth and keep it off the public internet.
TCPDatabasesUnencrypted by defaultIANA assigned
| Port number | 27017 |
|---|---|
| Service | MongoDB database |
| Protocol | TCP |
| Category | Databases |
| Default encryption | No |
Security note. Port 27017 is not encrypted by default. Restrict it to trusted networks, or use an encrypted alternative where one exists, to avoid exposing credentials and data in transit.
Frequently asked questions
What is port 27017 used for?
Port 27017 is the default MongoDB listener. Unsecured MongoDB on this port has caused many data leaks, so enable auth and keep it off the public internet.
Is port 27017 TCP or UDP?
Port 27017 (MongoDB) uses TCP.
Is port 27017 secure?
Port 27017 is not encrypted by default. Where possible, use an encrypted alternative or tunnel it over TLS or a VPN.
Should I open port 27017 on my firewall?
Only if you specifically need MongoDB. Expose it to the smallest set of trusted sources, and never open database or Windows-service ports to the whole internet.