Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 192.0.0.106. But after this anyone can get access to my memcache server via telnet 192.0.0.106 11211.

share|improve this question

3 Answers 3

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

 
discard

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.