【发布时间】:2017-08-15 11:42:44
【问题描述】:
RabbitMQ 服务以 全局模式 部署有 3 个不同的 vm。 我的目标是阻止到 RabbitMQ 服务容器之一的流量。 尝试使用 iptables 来Reproduce RabbitMQ network partition scenario
通过添加 iptables 链
iptables -A DOCKER-INGRESS -d 10.255.0.33 -p tcp --dport amqp -m state --state ESTABLISHED,RELATED -j DROP
在 RabbitMQ 服务任务容器运行的 2 个 docker 节点上。
10.255.0.33 是来自 swarm 覆盖网络的容器的 ip,取自 docker service inspect 输出。
虽然,流量仍然通过并且网络分区没有被复制。
如何正确阻塞服务容器的流量?
【问题讨论】:
-
是否有可能(在您的情况下)在不同的网络上拥有三个不同的虚拟机?
-
是的,有可能
标签: docker rabbitmq docker-swarm iptables network-partitioning