fortios_system_np6 – Configure NP6 attributes in Fortinet’s FortiOS and FortiGate.

New in version 2.10.

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify system feature and np6 category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

FortiOS Version Compatibility


v6.0.0 v6.0.5 v6.0.11 v6.2.0 v6.2.3 v6.2.5 v6.2.7 v6.4.0 v6.4.1 v6.4.4 v7.0.0
fortios_system_np6 yes yes yes yes yes yes yes yes yes yes yes

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: False
  • enable_log - Enable/Disable logging for task. type: bool required: False default: False
  • vdom - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. type: str default: root
  • state - Indicates whether to create or remove the object. type: str required: True choices: present, absent
  • system_np6 - Configure NP6 attributes. type: dict more...
    • fastpath - Enable/disable NP4 or NP6 offloading (also called fast path). type: str choices: disable, enable more...
    • fp_anomaly - NP6 IPv4 anomaly protection. trap-to-host forwards anomaly sessions to the CPU. type: dict more...
      • icmp_csum_err - Invalid IPv4 ICMP checksum anomalies. type: str choices: drop, trap-to-host more...
      • icmp_frag - Layer 3 fragmented packets that could be part of layer 4 ICMP anomalies. type: str choices: allow, drop, trap-to-host more...
      • icmp_land - ICMP land anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_csum_err - Invalid IPv4 IP checksum anomalies. type: str choices: drop, trap-to-host more...
      • ipv4_land - Land anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_optlsrr - Loose source record route option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_optrr - Record route option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_optsecurity - Security option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_optssrr - Strict source record route option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_optstream - Stream option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_opttimestamp - Timestamp option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_proto_err - Invalid layer 4 protocol anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv4_unknopt - Unknown option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_daddr_err - Destination address as unspecified or loopback address anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_land - Land anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_optendpid - End point identification anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_opthomeaddr - Home address option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_optinvld - Invalid option anomalies.Invalid option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_optjumbo - Jumbo options anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_optnsap - Network service access point address option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_optralert - Router alert option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_opttunnel - Tunnel encapsulation limit option anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_proto_err - Layer 4 invalid protocol anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_saddr_err - Source address as multicast anomalies. type: str choices: allow, drop, trap-to-host more...
      • ipv6_unknopt - Unknown option anomalies. type: str choices: allow, drop, trap-to-host more...
      • tcp_csum_err - Invalid IPv4 TCP checksum anomalies. type: str choices: drop, trap-to-host more...
      • tcp_fin_noack - TCP SYN flood with FIN flag set without ACK setting anomalies. type: str choices: allow, drop, trap-to-host more...
      • tcp_fin_only - TCP SYN flood with only FIN flag set anomalies. type: str choices: allow, drop, trap-to-host more...
      • tcp_land - TCP land anomalies. type: str choices: allow, drop, trap-to-host more...
      • tcp_no_flag - TCP SYN flood with no flag set anomalies. type: str choices: allow, drop, trap-to-host more...
      • tcp_syn_data - TCP SYN flood packets with data anomalies. type: str choices: allow, drop, trap-to-host more...
      • tcp_syn_fin - TCP SYN flood SYN/FIN flag set anomalies. type: str choices: allow, drop, trap-to-host more...
      • tcp_winnuke - TCP WinNuke anomalies. type: str choices: allow, drop, trap-to-host more...
      • udp_csum_err - Invalid IPv4 UDP checksum anomalies. type: str choices: drop, trap-to-host more...
      • udp_land - UDP land anomalies. type: str choices: allow, drop, trap-to-host more...
    • garbage_session_collector - Enable/disable garbage session collector. type: str choices: disable, enable more...
    • hpe - HPE configuration. type: str more...
    • ipsec_ob_hash_function - Set hash function for IPSec outbound. type: str choices: global-hash, round-robin-global more...
    • ipsec_outbound_hash - Enable/disable hash function for IPsec outbound traffic. type: str choices: disable, enable more...
    • low_latency_mode - Enable/disable low latency mode. type: str choices: disable, enable more...
    • name - Device Name. type: str required: True more...
    • per_session_accounting - Enable/disable per-session accounting. type: str choices: disable, traffic-log-only, enable more...
    • session_collector_interval - Set garbage session collection cleanup interval (1 - 100 sec). type: int more...
    • session_timeout_fixed - {disable | enable} Toggle between using fixed or random timeouts for refreshing NP6 sessions. type: str choices: disable, enable more...
    • session_timeout_interval - Set the fixed timeout for refreshing NP6 sessions (0 - 1000 sec). type: int more...
    • session_timeout_random_range - Set the random timeout range for refreshing NP6 sessions (0 - 1000 sec). type: int more...

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Configure NP6 attributes.
    fortios_system_np6:
      vdom:  "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      system_np6:
        fastpath: "disable"
        fp_anomaly:
            icmp_csum_err: "drop"
            icmp_frag: "allow"
            icmp_land: "allow"
            ipv4_csum_err: "drop"
            ipv4_land: "allow"
            ipv4_optlsrr: "allow"
            ipv4_optrr: "allow"
            ipv4_optsecurity: "allow"
            ipv4_optssrr: "allow"
            ipv4_optstream: "allow"
            ipv4_opttimestamp: "allow"
            ipv4_proto_err: "allow"
            ipv4_unknopt: "allow"
            ipv6_daddr_err: "allow"
            ipv6_land: "allow"
            ipv6_optendpid: "allow"
            ipv6_opthomeaddr: "allow"
            ipv6_optinvld: "allow"
            ipv6_optjumbo: "allow"
            ipv6_optnsap: "allow"
            ipv6_optralert: "allow"
            ipv6_opttunnel: "allow"
            ipv6_proto_err: "allow"
            ipv6_saddr_err: "allow"
            ipv6_unknopt: "allow"
            tcp_csum_err: "drop"
            tcp_fin_noack: "allow"
            tcp_fin_only: "allow"
            tcp_land: "allow"
            tcp_no_flag: "allow"
            tcp_syn_data: "allow"
            tcp_syn_fin: "allow"
            tcp_winnuke: "allow"
            udp_csum_err: "drop"
            udp_land: "allow"
        garbage_session_collector: "disable"
        hpe:
            arp_max: "42"
            enable_shaper: "disable"
            esp_max: "44"
            icmp_max: "45"
            ip_frag_max: "46"
            ip_others_max: "47"
            l2_others_max: "48"
            pri_type_max: "49"
            sctp_max: "50"
            tcp_max: "51"
            tcpfin_rst_max: "52"
            tcpsyn_ack_max: "53"
            tcpsyn_max: "54"
            udp_max: "55"
        ipsec_ob_hash_function: "global-hash"
        ipsec_outbound_hash: "disable"
        low_latency_mode: "disable"
        name: "default_name_59"
        per_session_accounting: "disable"
        session_collector_interval: "61"
        session_timeout_fixed: "disable"
        session_timeout_interval: "63"
        session_timeout_random_range: "64"

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

  • build - Build number of the fortigate image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
  • http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
  • name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
  • path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
  • revision - Internal revision number returned: always type: str sample: 17.0.2.10658
  • serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
  • status - Indication of the operation's result returned: always type: str sample: success
  • vdom - Virtual domain used returned: always type: str sample: root
  • version - Version of the FortiGate returned: always type: str sample: v5.6.3

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.