【发布时间】:2018-10-09 14:36:16
【问题描述】:
如果我输入iptables -L,输出中有这一行:
Chain DOCKER (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere 172.17.0.2 tcp dpt:http-alt
我的容器是公开的,我可以从任何地方请求一个虚拟 http 服务器(经过测试)。我尝试删除该规则,因此仅在我的服务器内公开了 80 个 (localhost:80)。我试过了:
root@ns25252:~# iptables -D DOCKER --destination 172.17.0.2 -p tcp --dport 80 -j ACCEPT
iptables: Bad rule (does a matching rule exist in that chain?).
正如错误所暗示的,它找不到匹配的规则。我应该如何键入删除该行?
【问题讨论】: