Salomea
V2EX  ›  Docker

docker 的 iptables 如何与 ufw 共存

  •  
  •   Salomea · Dec 17, 2023 · 2759 views
    This topic created in 1062 days ago, the information mentioned may be changed or developed.
    rt ,发现一个问题,因为我的 docker 默认是关闭 iptables 的,避免和 ufw 冲突,昨天尝试用 docker 部署一个 qd 框架,结果发现容器内部一直无网络,开启 iptables 后就有了,如何操作才能实现 docker 的 iptables 开启的情况下,同样使 ufw 正常工作
    3 replies  •  2023-12-17 15:44:08 +08:00
    PolarBears
    PolarBears
    Dec 17, 2023
    1
    试试`sudo ufw allow in on docker0`
    OOKAMI
    OOKAMI
    Dec 17, 2023❤️1
    2
    目前我用的是 ufw-docker 这个项目解决,但是 ipv6 有问题
    https://github.com/chaifeng/ufw-docker
    qq565425677
    qq565425677
    Dec 17, 2023
    3
    现在没有完美的解决方案,有也比较别扭,还可能有各种问题。。。我现在直接要么用 host ,要么 host 的 nginx 反代 bridge 容器,bridge 容器不暴露端口
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2481 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:37 · PVG 18:37 · LAX 02:37 · JFK 05:37
    ♥ Do have faith in what you're doing.