Salomea
V2EX  ›  Docker

docker 的 iptables 如何与 ufw 共存

  •  
  •   Salomea · Dec 17, 2023 · 2244 views
    This topic created in 878 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
        1
    PolarBears  
       Dec 17, 2023
    试试`sudo ufw allow in on docker0`
    OOKAMI
        2
    OOKAMI  
       Dec 17, 2023   ❤️ 1
    目前我用的是 ufw-docker 这个项目解决,但是 ipv6 有问题
    https://github.com/chaifeng/ufw-docker
    qq565425677
        3
    qq565425677  
       Dec 17, 2023
    现在没有完美的解决方案,有也比较别扭,还可能有各种问题。。。我现在直接要么用 host ,要么 host 的 nginx 反代 bridge 容器,bridge 容器不暴露端口
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3406 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 10:56 · PVG 18:56 · LAX 03:56 · JFK 06:56
    ♥ Do have faith in what you're doing.