← Back to all network ports
TCP
Vulnerable
27017 MongoDB
MongoDB instances use port 27017 for database traffic, replication, and admin tooling.
Security Context
Port 27017 is high-risk when broadly exposed. Treat it as an attack-surface decision, not just a connectivity setting, and confirm whether the listener truly needs to be reachable.
- !Internet-exposed MongoDB has repeatedly led to leaked or wiped datasets.
Nmap Check
Use a version probe first so you confirm whether the expected service is really what is listening on this port.
nmap -sV -p 27017 <host>Firewall Commands
UFW
sudo ufw allow 27017/tcpiptables
sudo iptables -A INPUT -p tcp --dport 27017 -j ACCEPT