0
点赞
收藏
分享

微信扫一扫

iptables: No chain/target/match by that name.


问题描述

  • 重设宿主机网关、重启宿主机 network .
  • docker 容器处于运行状态,同网段机器不能访问 .
  • 宿主机执行开放端口命令,提示如下:

[root@localhost ~]# /sbin/iptables -A INPUT -p tcp --dport 8686 -j ACCEPT

解决办法

  • 1 查看最新防火墙配置
  • ​iptables -L​
  • 2 重启 Docker 服务

service

经验解释

  • 重启docker后,通过 以下 命令可以查看最新防火墙配置:
  • ​iptables -L​
  • 应该看到​​iptables​​ 配置中 Chain Docker设置已更新(与1中历史结果进行对比)
  • 原因解释
  • 重新设置网关后,iptables( firewalld )被激活,docker chain 设置未更新 !
  • 重启docker服务,促使最新设置被加入到 iptables 中。

参考链接

  • ​​docker0: iptables: No chain/target/match by that name​​


举报

相关推荐

0 条评论