Toolman

What port does Memcached use?

Memcached uses port 11211 over TCP/UDP.

PortProtocolNameWhat it is for
11211TCP/UDPMemcachedDistributed 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

Port 11211 in full · Every service · All port numbers