What port does Memcached use?
Memcached uses port 11211 over TCP/UDP.
| Port | Protocol | Name | What it is for |
|---|---|---|---|
| 11211 | TCP/UDP | Memcached | Distributed memory cache. |
Exposing it
The UDP interface was used for record-breaking amplification attacks in 2018. Disable UDP and bind to localhost.
Checking it is listening
sudo lsof -i :11211 # macOS, Linux
netstat -ano | findstr :11211 # Windows
nc -zv host 11211 # from elsewhere
An "address already in use" error on a port nothing appears to be holding usually means the socket is in TIME_WAIT rather than that a process has it — the ports reference covers that and the ephemeral range.
Frequently asked questions
What port does Memcached use?
Memcached uses port 11211 over TCP/UDP. Distributed memory cache.
Is port 11211 safe to expose to the internet?
The UDP interface was used for record-breaking amplification attacks in 2018. Disable UDP and bind to localhost.
How do I check whether Memcached is listening?
sudo lsof -i :11211 on macOS or Linux, netstat -ano | findstr :11211 on Windows. From another machine, nc -zv host 11211 says whether anything answers.
Other services
- What port does Elasticsearch use?
- What port does DNS use?
- What port does NTP use?
- What port does SMB use?
- What port does NFS use?
- What port does SNMP use?
- What port does Syslog use?
- What port does RabbitMQ use?
- What port does Prometheus use?
- What port does SMTP use?
- What port does IMAP use?
- What port does POP3 use?