【问题标题】:firewalld command alternative of iptables -P FORWARD ACCEPTfirewalld 命令替代 iptables -P FORWARD ACCEPT
【发布时间】:2020-07-04 20:08:22
【问题描述】:

firewalld 命令替代 iptables -P FORWARD ACCEPT 我必须运行 iptables -P FORWARD ACCEPT 才能运行 kubernetes 集群并使用服务名称从 pod 进行通信。

问题是我在centos7上运行k8s集群并使用firewalld而不是iptables,这是cenots中的默认设置,没有运行iptables服务我无法保存规则iptables -P FORWARD ACCEPT并且重启后生效,如果可以获得firwalld iptables -P FORWARD ACCEPT 的替代品,然后我可以在重新启动时轻松保留它。

【问题讨论】:

  • 你有多少个节点?
  • 3 个节点,1 个主节点和 2 个工作节点

标签: kubernetes centos7 iptables firewalld


【解决方案1】:

sudo firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -d 0.0.0.0/0 -j ACCEPT sudo firewall-cmd --reload

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多