Port 11211 is the default Memcached port (both TCP and UDP). Like Redis, Memcached has no authentication or TLS by default. In 2018, Memcached servers with UDP port 11211 exposed to the internet were used in massive DDoS amplification attacks (1:51000 amplification ratio). Always bind to localhost and never expose port 11211.
Port Number
11211
Protocol
TCP/UDP
Service
Memcached In-Memory Cache
Range
IANA Registered (1024–49151)
Basic stats – version, connections, memory usage
echo 'stats' | nc -q1 localhost 11211 | grep -E '(version|curr_connections|bytes)'List slab classes with item counts (shows what is cached)
echo 'stats items' | nc -q1 localhost 11211Check if UDP 11211 is listening (should NOT be)
ss -ulnp sport = :11211Test if UDP Memcached is exposed (if it responds, you are vulnerable to DDoS amplification)
nmap -sU -p 11211 targetmemcached -l 127.0.0.1 -p 11211
echo 'stats' | nc localhost 11211
echo 'set key 0 0 5
hello
' | nc localhost 11211Memcached was created by Brad Fitzpatrick for LiveJournal in 2003. Port 11211 was registered with IANA. It became the standard web caching layer (Facebook, Wikipedia, YouTube) before Redis emerged as an alternative with more data structures. The 2018 DDoS amplification attacks led to UDP being disabled by default in newer packages.
Memcached vs Redis?
Memcached: simpler (key-value only), multi-threaded (uses all cores natively), slightly faster for pure caching. Redis: richer data structures (lists, sets, sorted sets, streams), persistence, Lua scripting, pub-sub. Use Memcached for simple page/query caching. Use Redis when you need data structures or persistence.
How do I check if my Memcached is vulnerable to DDoS amplification?
Run: nmap -sU -p 11211 your-public-ip. If it responds, you are exposed. Fix: memcached -U 0 (disable UDP), memcached -l 127.0.0.1 (bind localhost only), and firewall UDP 11211 at the perimeter.