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

My goal is to allow access to port 11211 (memcache) from by changing the existing iptable.

I used the line: iptables -I INPUT -p tcp -s xx.xx.xx.xx --dport 11211 -j ACCEPT to add the first line in the iptable (xx.xx.xx.xx is the ip of my domain):

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --      anywhere            tcp dpt:11211
ACCEPT     tcp  --  localhost            anywhere            tcp dpt:11211
ACCEPT     tcp  --  domU-12-31-39-01-BC-21.compute-1.internal  anywhere   tcp dpt:11211
DROP       tcp  --  anywhere             anywhere            tcp dpt:11211
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www

Still when I try to access port 11211 it seems to be blocked (in aws security groups it is open, so thats not the reason)

Whats wrong with this setting ?

share|improve this question
Can you try adding COUNT in the line accepting traffic from, then see if it's incrementing as you try? This would at least verify that your traffic is originating from the place you think it is. – Matt Simmons May 18 '11 at 14:57
Also, dumb question, but you do have memcached bound to the external IP, right? – Matt Simmons May 18 '11 at 14:58
To see the packet count use iptables -nvL. – Eduardo Ivanec May 18 '11 at 15:10
In addition to the above, it's not clear from your question if your firewall on the same box as memcache. If it isn't, you need the FORWARD chain, not the INPUT one. – SmallClanger May 18 '11 at 16:58
Did you ever slove this ? If so can you please provide an answer - thanks. – Iain Dec 12 '11 at 21:08
up vote 1 down vote accepted

I'm not sure what the problem was but the line

iptables -I INPUT -p tcp --dport 11211 -j ACCEPT 

Works for opening the port

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.