10.5.17. 配置主机防火墙规则

您可以使用 Ansible 配置主机防火墙规则,使其具有持久性。集群必须配置为使用 firewalld,而不是 iptables

注意

iptables 已被弃用。

为主机配置防火墙规则

  1. 在 Manager 计算机上,编辑 ovirt-host-deploy-post-tasks.yml.example 来添加自定义防火墙端口:

    # vi /etc/ovirt-engine/ansible/ovirt-host-deploy-post-tasks.yml.example
    ---
    #
    # Any additional tasks required to be executing during host deploy process can
    # be added below
    #
    - name: Enable additional port on firewalld
      firewalld:
        port: "12345/tcp"
        permanent: yes
        immediate: yes
        state: enabled
  2. 将文件保存为 ovirt-host-deploy-post-tasks.yml

使用更新的防火墙规则配置新的或重新安装的主机。

现有的主机需要通过点 InstallationReinstall 并选择 Automatically configure host firewall 来重新安装。