Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

$memcache_obj = memcache_connect('My server's IP address', 11211);

Using this php code, could anyone can connect to my Memcached server and put something using memcached_get()?

Is it a security problem? How can I block access to it?

share|improve this question
up vote 3 down vote accepted

Until recently (1.4.3) memcached had no support for authentication, so anyone who could connect to memcached could do whatever they wanted.

You can set up authentication if you wish, and your version of memcached is recent enough.

You also should firewall the port, allowing only specific IP addresses in your network to connect to memcached. This will help regardless of version.

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.