YUX
V2EX  ›  问与答

docker 直接无视防火墙么,如何能优雅地把端口堵上

  •  
  •   YUX ·
    PRO
    · Feb 24, 2020 · 2138 views
    This topic created in 2285 days ago, the information mentioned may be changed or developed.

    能不能不卸载 firewalld 安装 iptables

    centos7

    Supplement 1  ·  Feb 24, 2020

    -p port1:port2 改成 -p 127.0.0.1:port1:port2 可以限制仅限本地访问

    1 replies    2020-02-24 18:08:06 +08:00
    xupefei
        1
    xupefei  
       Feb 24, 2020   ❤️ 1
    可以,但目前 firewalld 还没做适配: https://github.com/firewalld/firewalld/issues/461
    现在的唯一办法就是给 docker-user 链手写规则。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1071 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 466ea39e · 34ms · UTC 18:41 · PVG 02:41 · LAX 11:41 · JFK 14:41
    ♥ Do have faith in what you're doing.