Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I open port 1121 for specified ips? I have memcache installed, and I need to access to memcache from another server for this in /etc/memcached.conf I set my ip -l But after this anyone can get access to my memcache server via telnet 11211.

share|improve this question

A secure way would be to allow only localhost and then use a vpn or ssh tunnel to access that from the connecting server.

share|improve this answer

Use iptables (I assume you are using linux), to restrict what hosts have access to the port memcached is listening on.

share|improve this answer

The official documentation says: "By default memcached listens on TCP and UDP ports, both 11211. -l allows you to bind to specific interfaces or IP addresses. Memcached does not spend much, if any, effort in ensuring its defensibility from random internet connections. So you must not expose memcached directly to the internet, or otherwise any untrusted users. Using SASL authentication here helps, but should not be totally trusted."

You limit access to memcached by not allowing connections to the world wide web.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.