fortinet.fortios.fortios_firewall_ssl_ssh_profile 模块 – 在 Fortinet 的 FortiOS 和 FortiGate 中配置 SSL/SSH 协议选项。
注意
此模块是 fortinet.fortios 集合(版本 2.3.8)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install fortinet.fortios。您需要进一步的要求才能使用此模块,有关详细信息,请参阅 要求。
要在 playbook 中使用它,请指定:fortinet.fortios.fortios_firewall_ssl_ssh_profile。
fortinet.fortios 2.0.0 中的新增功能
概要
- 此模块能够通过允许用户设置和修改防火墙功能和 ssl_ssh_profile 类别来配置 FortiGate 或 FortiOS (FOS) 设备。 示例包括所有参数,需要在使用前将值调整为数据源。 在 FOS v6.0.0 上测试。 
要求
执行此模块的主机需要满足以下要求。
- ansible>=2.15 
参数
| 参数 | 注释 | 
|---|---|
| 基于令牌的身份验证。 从 Fortigate 的 GUI 生成。 | |
| 启用/禁用任务的日志记录。 选择 
 | |
| 配置 SSL/SSH 协议选项。 | |
| 启用/禁用通过 FortiGuard 允许列表豁免服务器。 选择 
 | |
| 启用/禁用通过 FortiGuard 证书黑名单阻止基于 SSL 的僵尸网络通信。 选择 
 | |
| 启用/禁用通过 FortiGuard 证书阻止列表阻止基于 SSL 的僵尸网络通信。 选择 
 | |
| SSL 检查使用的 CA 证书。 源 vpn.certificate.local.name。 | |
| 可选注释。 | |
| 配置 DNS over TLS 选项。 | |
| 基于证书验证失败的操作。 选择 
 | |
| 基于证书验证超时的操作。 选择 
 | |
| 基于收到的客户端证书的操作。 选择 
 | |
| 基于服务器证书过期的操作。 选择 
 | |
| 在建立 TCP 三次握手后(而不是之前)代理流量。 选择 
 | |
| QUIC 检查状态。 选择 
 | |
| 基于服务器证书被吊销的操作。 选择 
 | |
| 使用返回的服务器证书中的 CN 或 SAN 字段检查客户端 hello 消息中的 SNI。 选择 
 | |
| 配置协议检查状态。 选择 
 | |
| 基于使用的 SSL 密码不受支持的操作。 选择 
 | |
| 基于使用的 SSL 协商不受支持的操作。 选择 
 | |
| 基于使用的 SSL 版本不受支持的操作。 选择 
 | |
| 基于服务器证书不是由受信任的 CA 颁发的操作。 选择 
 | |
| 要阻止的 ClientHelloOuter SNI。 | |
| ClientHelloOuter SNI 名称。 | |
| 要阻止的 ClientHelloOuter SNI。 | |
| 配置 FTPS 选项。 | |
| 启用后,允许服务器证书验证失败的 SSL 会话。 选择 
 | |
| 基于证书验证失败的操作。 选择 
 | |
| 基于证书验证超时的操作。 选择 
 | |
| 基于客户端证书请求的操作。 选择 
 | |
| 基于收到的客户端证书的操作。 选择 
 | |
| 基于服务器证书过期的操作。 选择 
 | |
| 允许或阻止无效的 SSL 会话服务器证书。 选择 
 | |
| 允许的最低 SSL 版本。 选择 
 | |
| 用于扫描的端口 (1 - 65535)。 | |
| 基于服务器证书被吊销的操作。 选择 
 | |
| 使用返回的服务器证书中的 CN 或 SAN 字段检查客户端 hello 消息中的 SNI。 选择 
 | |
| 配置协议检查状态。 选择 
 | |
| 基于使用的 SSL 加密不受支持的操作。 选择 
 | |
| 基于使用的 SSL 密码不受支持的操作。 选择 
 | |
| 基于使用的 SSL 协商不受支持的操作。 选择 
 | |
| 基于使用的 SSL 版本不受支持的操作。 选择 
 | |
| 允许、忽略或阻止不受信任的 SSL 会话服务器证书。 选择 
 | |
| 基于服务器证书不是由受信任的 CA 颁发的操作。 选择 
 | |
| 配置 HTTPS 选项。 | |
| 启用后,允许服务器证书验证失败的 SSL 会话。 选择 
 | |
| 基于证书探测失败的操作。 选择 
 | |
| 基于证书验证失败的操作。 选择 
 | |
| 基于证书验证超时的操作。 选择 
 | |
| 基于客户端证书请求的操作。 选择 
 | |
| 基于收到的客户端证书的操作。 选择 
 | |
| 基于加密客户端 hello 的存在阻止/允许会话。 选择 
 | |
| 基于服务器证书过期的操作。 选择 
 | |
| 允许或阻止无效的 SSL 会话服务器证书。 选择 
 | |
| 允许的最低 SSL 版本。 选择 
 | |
| 用于扫描的端口 (1 - 65535)。 | |
| 在建立 TCP 三次握手后(而不是之前)代理流量。 选择 
 | |
| QUIC 检查状态。 选择 
 | |
| 基于服务器证书被吊销的操作。 选择 
 | |
| 使用返回的服务器证书中的 CN 或 SAN 字段检查客户端 hello 消息中的 SNI。 选择 
 | |
| 配置协议检查状态。 选择 
 | |
| 基于使用的 SSL 加密不受支持的操作。 选择 
 | |
| 基于使用的 SSL 密码不受支持的操作。 选择 
 | |
| 基于使用的 SSL 协商不受支持的操作。 选择 
 | |
| 基于使用的 SSL 版本不受支持的操作。 选择 
 | |
| 允许、忽略或阻止不受信任的 SSL 会话服务器证书。 选择 
 | |
| 基于服务器证书不是由受信任的 CA 颁发的操作。 选择 
 | |
| 配置 IMAPS 选项。 | |
| 启用后,允许服务器证书验证失败的 SSL 会话。 选择 
 | |
| 基于证书验证失败的操作。 选择 
 | |
| 基于证书验证超时的操作。 选择 
 | |
| 基于客户端证书请求的操作。 选择 
 | |
| 基于收到的客户端证书的操作。 选择 
 | |
| 基于服务器证书过期的操作。 选择 
 | |
| 允许或阻止无效的 SSL 会话服务器证书。 选择 
 | |
| 用于扫描的端口 (1 - 65535)。 | |
| 在建立 TCP 三次握手后(而不是之前)代理流量。 选择 
 | |
| 基于服务器证书被吊销的操作。 选择 
 | |
| 使用返回的服务器证书中的 CN 或 SAN 字段检查客户端 hello 消息中的 SNI。 选择 
 | |
| 配置协议检查状态。 选择 
 | |
| 基于使用的 SSL 加密不受支持的操作。 选择 
 | |
| 基于使用的 SSL 密码不受支持的操作。 选择 
 | |
| 基于使用的 SSL 协商不受支持的操作。 选择 
 | |
| 基于使用的 SSL 版本不受支持的操作。 选择 
 | |
| 允许、忽略或阻止不受信任的 SSL 会话服务器证书。 选择 
 | |
| 基于服务器证书不是由受信任的 CA 颁发的操作。 选择 
 | |
| 启用/禁用通过 HTTPS 的 MAPI 检查。 选择 
 | |
| 名称。 | |
| 配置 POP3S 选项。 | |
| 启用后,允许服务器证书验证失败的 SSL 会话。 选择 
 | |
| 基于证书验证失败的操作。 选择 
 | |
| 基于证书验证超时的操作。 选择 
 | |
| 基于客户端证书请求的操作。 选择 
 | |
| 基于收到的客户端证书的操作。 选择 
 | |
| 基于服务器证书过期的操作。 选择 
 | |
| 允许或阻止无效的 SSL 会话服务器证书。 选择 
 | |
| 用于扫描的端口 (1 - 65535)。 | |
| 在建立 TCP 三次握手后(而不是之前)代理流量。 选择 
 | |
| 基于服务器证书被吊销的操作。 选择 
 | |
| 使用返回的服务器证书中的 CN 或 SAN 字段检查客户端 hello 消息中的 SNI。 选择 
 | |
| 配置协议检查状态。 选择 
 | |
| 基于使用的 SSL 加密不受支持的操作。 选择 
 | |
| 基于使用的 SSL 密码不受支持的操作。 选择 
 | |
| 基于使用的 SSL 协商不受支持的操作。 选择 
 | |
| 基于使用的 SSL 版本不受支持的操作。 选择 
 | |
| 允许、忽略或阻止不受信任的 SSL 会话服务器证书。 选择 
 | |
| 基于服务器证书不是由受信任的 CA 颁发的操作。 选择 
 | |
| 启用/禁用通过 HTTPS 的 RPC 检查。 选择 
 | |
| SSL 检查用于替换服务器证书的证书。 源 vpn.certificate.local.name。 | |
| 证书列表。 源 vpn.certificate.local.name。 | |
| 重新签名或替换服务器的证书。 选择 
 | |
| 配置 SMTPS 选项。 | |
| 启用后,允许服务器证书验证失败的 SSL 会话。 选择 
 | |
| 基于证书验证失败的操作。 选择 
 | |
| 基于证书验证超时的操作。 选择 
 | |
| 基于客户端证书请求的操作。 选择 
 | |
| 基于收到的客户端证书的操作。 选择 
 | |
| 基于服务器证书过期的操作。 选择 
 | |
| 允许或阻止无效的 SSL 会话服务器证书。 选择 
 | |
| 用于扫描的端口 (1 - 65535)。 | |
| 在建立 TCP 三次握手后(而不是之前)代理流量。 选择 
 | |
| 基于服务器证书被吊销的操作。 选择 
 | |
| 使用返回的服务器证书中的 CN 或 SAN 字段检查客户端 hello 消息中的 SNI。 选择 
 | |
| 配置协议检查状态。 选择 
 | |
| 基于使用的 SSL 加密不受支持的操作。 选择 
 | |
| 基于使用的 SSL 密码不受支持的操作。 选择 
 | |
| 基于使用的 SSL 协商不受支持的操作。 选择 
 | |
| 基于使用的 SSL 版本不受支持的操作。 选择 
 | |
| 允许、忽略或阻止不受信任的 SSL 会话服务器证书。 选择 
 | |
| 基于服务器证书不是由受信任的 CA 颁发的操作。 选择 
 | |
| 配置 SSH 选项。 | |
| SSL 检查级别。 选择 
 | |
| 用于扫描的端口 (1 - 65535)。 | |
| 在建立 TCP 三次握手后(而不是之前)代理流量。 选择 
 | |
| 协商期间接受的加密算法的相对强度。 选择 
 | |
| 启用/禁用 SSH 策略检查。 选择 
 | |
| 启用/禁用 SSH 隧道策略检查。 选择 
 | |
| 配置协议检查状态。 选择 
 | |
| 基于 SSH 版本不受支持的操作。 选择 
 | |
| 配置 SSL 选项。 | |
| 启用后,允许服务器证书验证失败的 SSL 会话。 选择 
 | |
| 基于证书探测失败的操作。 选择 
 | |
| 基于证书验证失败的操作。 选择 
 | |
| 基于证书验证超时的操作。 选择 
 | |
| 基于客户端证书请求的操作。 选择 
 | |
| 基于收到的客户端证书的操作。 选择 
 | |
| 基于加密客户端 hello 的存在阻止/允许会话。 选择 
 | |
| 基于服务器证书过期的操作。 选择 
 | |
| SSL 检查级别。 选择 
 | |
| 允许或阻止无效的 SSL 会话服务器证书。 选择 
 | |
| 允许的最低 SSL 版本。 选择 
 | |
| 基于服务器证书被吊销的操作。 选择 
 | |
| 使用返回的服务器证书中的 CN 或 SAN 字段检查客户端 hello 消息中的 SNI。 选择 
 | |
| 基于使用的 SSL 加密不受支持的操作。 选择 
 | |
| 基于使用的 SSL 密码不受支持的操作。 选择 
 | |
| 基于使用的 SSL 协商不受支持的操作。 选择 
 | |
| 基于使用的 SSL 版本不受支持的操作。 选择 
 | |
| 允许、忽略或阻止不受信任的 SSL 会话服务器证书。 选择 
 | |
| 基于服务器证书不是由受信任的 CA 颁发的操作。 选择 
 | |
| 启用/禁用记录 SSL 异常。 选择 
 | |
| 启用/禁用记录 SSL 异常。 选择 
 | |
| 要豁免 SSL 检查的服务器。 | |
| IPv4 地址对象。 源 firewall.address.name firewall.addrgrp.name。 | |
| IPv6 地址对象。 源 firewall.address6.name firewall.addrgrp6.name。 | |
| FortiGuard 类别 ID。 | |
| ID 号。 请参阅 <a href=’#notes’>说明</a>。 | |
| 通过正则表达式豁免服务器。 | |
| 地址对象的类型(IPv4 或 IPv6)或 FortiGuard 类别。 选择 
 | |
| 通过通配符 FQDN 豁免服务器。来源:防火墙.通配符-fqdn.自定义.名称 防火墙.通配符-fqdn.组.名称。 | |
| 启用/禁用基于 IP 的 URL 评级。 选择 
 | |
| 启用/禁用 SSL 豁免的日志记录。 选择 
 | |
| 启用/禁用 SSL 豁免的日志记录。 选择 
 | |
| 启用/禁用 TLS 握手的日志记录。 选择 
 | |
| 启用/禁用 SSL 协商事件的日志记录。 选择 
 | |
| 用于客户端证书请求的 SSL 服务器设置。 | |
| 在 FTPS 握手期间基于客户端证书请求的操作。 选择 
 | |
| 在 FTPS 握手期间基于接收到的客户端证书的操作。 选择 
 | |
| 在 HTTPS 握手期间基于客户端证书请求的操作。 选择 
 | |
| 在 HTTPS 握手期间基于接收到的客户端证书的操作。 选择 
 | |
| SSL 服务器 ID。请参阅 <a href=’#notes’>注释</a>。 | |
| 在 IMAPS 握手期间基于客户端证书请求的操作。 选择 
 | |
| 在 IMAPS 握手期间基于接收到的客户端证书的操作。 选择 
 | |
| SSL 服务器的 IPv4 地址。 | |
| 在 POP3S 握手期间基于客户端证书请求的操作。 选择 
 | |
| 在 POP3S 握手期间基于接收到的客户端证书的操作。 选择 
 | |
| 在 SMTPS 握手期间基于客户端证书请求的操作。 选择 
 | |
| 在 SMTPS 握手期间基于接收到的客户端证书的操作。 选择 
 | |
| 在 SSL 协议握手期间基于客户端证书请求的操作。 选择 
 | |
| 在 SSL 协议握手期间基于接收到的客户端证书的操作。 选择 
 | |
| 启用/禁用服务器证书信息的日志记录。 选择 
 | |
| 配置 ALPN 选项。 选择 
 | |
| SSL 检查使用的不受信任的 CA 证书。来源:vpn.certificate.local.name。 | |
| 启用/禁用使用 SSL 服务器表进行 SSL 卸载。 选择 
 | |
| 启用/禁用通过 FortiGuard 白名单豁免服务器。 选择 
 | |
| 要操作的成员属性路径。 如果有多个属性,则用斜杠字符分隔。 带有 member_path 标记的参数对于执行成员操作是合法的。 | |
| 在指定的属性路径下添加或删除成员。 当指定 member_state 时,将忽略 state 选项。 选择 
 | |
| 指示是创建还是删除对象。 选择 
 | |
| 虚拟域,在之前定义的那些之中。vdom 是 FortiGate 的虚拟实例,可以配置并用作不同的单元。 默认值:  | 
注释
注意
- 旧的 fortiosapi 已弃用,httpapi 是运行 playbook 的首选方式 
- 该模块支持 check_mode。 
示例
- name: Configure SSL/SSH protocol options.
  fortinet.fortios.fortios_firewall_ssl_ssh_profile:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      firewall_ssl_ssh_profile:
          allowlist: "enable"
          block_blacklisted_certificates: "disable"
          block_blocklisted_certificates: "disable"
          caname: "<your_own_value> (source vpn.certificate.local.name)"
          comment: "Optional comments."
          dot:
              cert_validation_failure: "allow"
              cert_validation_timeout: "allow"
              client_certificate: "bypass"
              expired_server_cert: "allow"
              proxy_after_tcp_handshake: "enable"
              quic: "inspect"
              revoked_server_cert: "allow"
              sni_server_cert_check: "enable"
              status: "disable"
              unsupported_ssl_cipher: "allow"
              unsupported_ssl_negotiation: "allow"
              unsupported_ssl_version: "allow"
              untrusted_server_cert: "allow"
          ech_outer_sni:
              -
                  name: "default_name_23"
                  sni: "<your_own_value>"
          ftps:
              allow_invalid_server_cert: "enable"
              cert_validation_failure: "allow"
              cert_validation_timeout: "allow"
              client_cert_request: "bypass"
              client_certificate: "bypass"
              expired_server_cert: "allow"
              invalid_server_cert: "allow"
              min_allowed_ssl_version: "ssl-3.0"
              ports: "<your_own_value>"
              revoked_server_cert: "allow"
              sni_server_cert_check: "enable"
              status: "disable"
              unsupported_ssl: "bypass"
              unsupported_ssl_cipher: "allow"
              unsupported_ssl_negotiation: "allow"
              unsupported_ssl_version: "allow"
              untrusted_cert: "allow"
              untrusted_server_cert: "allow"
          https:
              allow_invalid_server_cert: "enable"
              cert_probe_failure: "allow"
              cert_validation_failure: "allow"
              cert_validation_timeout: "allow"
              client_cert_request: "bypass"
              client_certificate: "bypass"
              encrypted_client_hello: "allow"
              expired_server_cert: "allow"
              invalid_server_cert: "allow"
              min_allowed_ssl_version: "ssl-3.0"
              ports: "<your_own_value>"
              proxy_after_tcp_handshake: "enable"
              quic: "inspect"
              revoked_server_cert: "allow"
              sni_server_cert_check: "enable"
              status: "disable"
              unsupported_ssl: "bypass"
              unsupported_ssl_cipher: "allow"
              unsupported_ssl_negotiation: "allow"
              unsupported_ssl_version: "allow"
              untrusted_cert: "allow"
              untrusted_server_cert: "allow"
          imaps:
              allow_invalid_server_cert: "enable"
              cert_validation_failure: "allow"
              cert_validation_timeout: "allow"
              client_cert_request: "bypass"
              client_certificate: "bypass"
              expired_server_cert: "allow"
              invalid_server_cert: "allow"
              ports: "<your_own_value>"
              proxy_after_tcp_handshake: "enable"
              revoked_server_cert: "allow"
              sni_server_cert_check: "enable"
              status: "disable"
              unsupported_ssl: "bypass"
              unsupported_ssl_cipher: "allow"
              unsupported_ssl_negotiation: "allow"
              unsupported_ssl_version: "allow"
              untrusted_cert: "allow"
              untrusted_server_cert: "allow"
          mapi_over_https: "enable"
          name: "default_name_87"
          pop3s:
              allow_invalid_server_cert: "enable"
              cert_validation_failure: "allow"
              cert_validation_timeout: "allow"
              client_cert_request: "bypass"
              client_certificate: "bypass"
              expired_server_cert: "allow"
              invalid_server_cert: "allow"
              ports: "<your_own_value>"
              proxy_after_tcp_handshake: "enable"
              revoked_server_cert: "allow"
              sni_server_cert_check: "enable"
              status: "disable"
              unsupported_ssl: "bypass"
              unsupported_ssl_cipher: "allow"
              unsupported_ssl_negotiation: "allow"
              unsupported_ssl_version: "allow"
              untrusted_cert: "allow"
              untrusted_server_cert: "allow"
          rpc_over_https: "enable"
          server_cert:
              -
                  name: "default_name_109 (source vpn.certificate.local.name)"
          server_cert_mode: "re-sign"
          smtps:
              allow_invalid_server_cert: "enable"
              cert_validation_failure: "allow"
              cert_validation_timeout: "allow"
              client_cert_request: "bypass"
              client_certificate: "bypass"
              expired_server_cert: "allow"
              invalid_server_cert: "allow"
              ports: "<your_own_value>"
              proxy_after_tcp_handshake: "enable"
              revoked_server_cert: "allow"
              sni_server_cert_check: "enable"
              status: "disable"
              unsupported_ssl: "bypass"
              unsupported_ssl_cipher: "allow"
              unsupported_ssl_negotiation: "allow"
              unsupported_ssl_version: "allow"
              untrusted_cert: "allow"
              untrusted_server_cert: "allow"
          ssh:
              inspect_all: "disable"
              ports: "<your_own_value>"
              proxy_after_tcp_handshake: "enable"
              ssh_algorithm: "compatible"
              ssh_policy_check: "disable"
              ssh_tun_policy_check: "disable"
              status: "disable"
              unsupported_version: "bypass"
          ssl:
              allow_invalid_server_cert: "enable"
              cert_probe_failure: "allow"
              cert_validation_failure: "allow"
              cert_validation_timeout: "allow"
              client_cert_request: "bypass"
              client_certificate: "bypass"
              encrypted_client_hello: "allow"
              expired_server_cert: "allow"
              inspect_all: "disable"
              invalid_server_cert: "allow"
              min_allowed_ssl_version: "ssl-3.0"
              revoked_server_cert: "allow"
              sni_server_cert_check: "enable"
              unsupported_ssl: "bypass"
              unsupported_ssl_cipher: "allow"
              unsupported_ssl_negotiation: "allow"
              unsupported_ssl_version: "allow"
              untrusted_cert: "allow"
              untrusted_server_cert: "allow"
          ssl_anomalies_log: "disable"
          ssl_anomaly_log: "disable"
          ssl_exempt:
              -
                  address: "<your_own_value> (source firewall.address.name firewall.addrgrp.name)"
                  address6: "<your_own_value> (source firewall.address6.name firewall.addrgrp6.name)"
                  fortiguard_category: "0"
                  id: "165"
                  regex: "<your_own_value>"
                  type: "fortiguard-category"
                  wildcard_fqdn: "<your_own_value> (source firewall.wildcard-fqdn.custom.name firewall.wildcard-fqdn.group.name)"
          ssl_exemption_ip_rating: "enable"
          ssl_exemption_log: "disable"
          ssl_exemptions_log: "disable"
          ssl_handshake_log: "disable"
          ssl_negotiation_log: "disable"
          ssl_server:
              -
                  ftps_client_cert_request: "bypass"
                  ftps_client_certificate: "bypass"
                  https_client_cert_request: "bypass"
                  https_client_certificate: "bypass"
                  id: "179"
                  imaps_client_cert_request: "bypass"
                  imaps_client_certificate: "bypass"
                  ip: "<your_own_value>"
                  pop3s_client_cert_request: "bypass"
                  pop3s_client_certificate: "bypass"
                  smtps_client_cert_request: "bypass"
                  smtps_client_certificate: "bypass"
                  ssl_other_client_cert_request: "bypass"
                  ssl_other_client_certificate: "bypass"
          ssl_server_cert_log: "disable"
          supported_alpn: "http1-1"
          untrusted_caname: "<your_own_value> (source vpn.certificate.local.name)"
          use_ssl_server: "disable"
          whitelist: "enable"
返回值
通用返回值记录在此处,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| FortiGate 映像的构建号 返回值: 始终 示例:  | |
| 上次用于将内容配置到 FortiGate 中的方法 返回值: 始终 示例:  | |
| FortiGate 在上次应用的操作中给出的最后结果 返回值: 始终 示例:  | |
| 在上次调用 FortiGate 时使用的主键 (id) 返回值: 成功 示例:  | |
| 用于满足请求的表的名称 返回值: 始终 示例:  | |
| 用于满足请求的表的路径 返回值: 始终 示例:  | |
| 内部修订号 返回值: 始终 示例:  | |
| 设备的序列号 返回值: 始终 示例:  | |
| 操作结果的指示 返回值: 始终 示例:  | |
| 使用的虚拟域 返回值: 始终 示例:  | |
| FortiGate 的版本 返回值: 始终 示例:  | 
