My goal is to allow access to port 11211 (memcache) from mydomain.com 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 -- mydomain.com 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 ?