Toolman

Port 27017 — MongoDB

TCP registered

What runs on port 27017

The default MongoDB port.

Security considerations

Older versions bound to all interfaces with no authentication, which led to mass ransoming of exposed databases. Enable auth and bind privately.

Checking whether something is listening

# Linux / macOS — what is bound to the port
sudo lsof -i :27017
sudo ss -lntp | grep :27017

# Windows
netstat -ano | findstr :27017
Get-NetTCPConnection -LocalPort 27017

# is it reachable from outside?
nc -zv example.com 27017
curl -v telnet://example.com:27017

Freeing the port

# find the process, then stop it
sudo lsof -ti :27017 | xargs kill        # Linux / macOS
netstat -ano | findstr :27017            # note the PID, then:
taskkill /PID <pid> /F                    # Windows

Other common ports

All port numbers