我的目标是允许通过更改现有的iptable从mydomain.com访问端口11211(memcache)。
我用了:iptables -I INPUT -p tcp -s xx.xx.xx.xx –dport 11211 -j ACCEPT在iptable中添加第一行(xx.xx.xx.xx是我的域的ip ):
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
仍然当我尝试访问端口11211似乎被封锁(在安全组是开放的,所以这不是原因)
这个设置有什么问题?
我不确定问题是什么,但是线路
iptables -I INPUT -p tcp --dport 11211 -j ACCEPT
开放港口的工程