Docker、WireGuard、firewalld

Docker、WireGuard、firewalld

环境:

  1. Ubuntu 20.04 LTS
  2. Docker
  3. WireGuard
  4. 防火墙

我检查了 systemctl status firewalld

我有此消息

Mar 10 23:04:29 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER' failed: iptables: No cha>
Mar 10 23:04:29 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION-STAGE-1' failed>
Mar 10 23:04:29 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION-STAGE-1' failed>
Mar 10 23:04:29 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION-STAGE-2' failed>
Mar 10 23:04:29 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION-STAGE-2' failed>
Mar 10 23:04:29 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION' failed: iptabl>
Mar 10 23:04:29 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION' failed: iptabl>
Mar 10 23:04:29 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-5efaa402a4d3 -o br-5efaa402a>
Mar 10 23:04:30 vpnwaw firewalld[542]: 1;38;5;185mWARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j
 DROP' fai>Mar 10 23:04:31 vpnwaw firewalld[542]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j

答案1

SystemD 在 Docker 中无法可靠运行,请使用它的替代品

下载文件并将其复制到你的docker。

COPY ./systemctl3.py .
RUN chmod +x *.py && cp -f systemctl3.py /usr/bin/systemctl

相关内容