【问题标题】:Restrict connections to the Docker daemon - What should be the value of ext_if限制与 Docker 守护程序的连接 - ext_if 的值应该是什么
【发布时间】:2018-03-16 02:06:00
【问题描述】:

我倾向于使用主机 iptables 限制与我的 Docker 守护程序的连接

https://docs.docker.com/network/iptables/#restrict-connections-to-the-docker-daemon

给出的例子是

$ iptables -I DOCKER-USER -i ext_if ! -s 192.168.1.1 -j DROP

我在想,ext_if 的值应该是多少,以及如何计算出ext_if 的值?

【问题讨论】:

    标签: docker iptables


    【解决方案1】:

    这对我来说效果很好

    iptables -I DOCKER-USER -i eth0 -p tcp --dport 5555 -j DROP
    

    但是,我不确定获取eth0 的正确步骤。这只是我的 try-n-error 方式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-12
      • 2020-04-09
      • 1970-01-01
      • 1970-01-01
      • 2016-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多