Skip to content

Latest commit

 

History

History
1194 lines (1150 loc) · 53.6 KB

fortios_application_list.rst

File metadata and controls

1194 lines (1150 loc) · 53.6 KB
source:fortios_application_list.py
orphan:

fortios_application_list -- Configure application control lists in Fortinet's FortiOS and FortiGate.

.. versionadded:: 2.0.0

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

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

  • ansible>=2.14

Using member operation to add an element to an existing object.


Supported Version Ranges
fortios_application_list v6.0.0 -> latest

  • 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
  • member_path - Member attribute path to operate on. type: str
  • member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
  • state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
  • application_list - Configure application control lists. type: dict more...
    Supported Version Ranges
    application_list v6.0.0 -> latest
    • app_replacemsg - Enable/disable replacement messages for blocked applications. type: str choices: disable, enable more...
      Supported Version Ranges
      app_replacemsg v6.0.0 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest
    • comment - Comments. type: str more...
      Supported Version Ranges
      comment v6.0.0 -> latest
    • control_default_network_services - Enable/disable enforcement of protocols over selected ports. type: str choices: disable, enable more...
      Supported Version Ranges
      control_default_network_services v6.2.0 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest
    • deep_app_inspection - Enable/disable deep application inspection. type: str choices: disable, enable more...
      Supported Version Ranges
      deep_app_inspection v6.0.0 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest
    • default_network_services - Default network service entries. type: list member_path: default_network_services:id more...
      Supported Version Ranges
      default_network_services v6.2.0 -> latest
      • id - Entry ID. see Notes. type: int required: true more...
        Supported Version Ranges
        id v6.2.0 -> latest
      • port - Port number. type: int more...
        Supported Version Ranges
        port v6.2.0 -> latest
      • services - Network protocols. type: list choices: http, ssh, telnet, ftp, dns, smtp, pop3, imap, snmp, nntp, https more...
        Supported Version Ranges
        services v6.2.0 -> latest
        [http] v6.0.0 -> latest
        [ssh] v6.0.0 -> latest
        [telnet] v6.0.0 -> latest
        [ftp] v6.0.0 -> latest
        [dns] v6.0.0 -> latest
        [smtp] v6.0.0 -> latest
        [pop3] v6.0.0 -> latest
        [imap] v6.0.0 -> latest
        [snmp] v6.0.0 -> latest
        [nntp] v6.0.0 -> latest
        [https] v6.0.0 -> latest
      • violation_action - Action for protocols not in the allowlist for selected port. type: str choices: pass, monitor, block more...
        Supported Version Ranges
        violation_action v6.2.0 -> latest
        [pass] v6.0.0 -> latest
        [monitor] v6.0.0 -> latest
        [block] v6.0.0 -> latest
    • enforce_default_app_port - Enable/disable default application port enforcement for allowed applications. type: str choices: disable, enable more...
      Supported Version Ranges
      enforce_default_app_port v6.2.0 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest
    • entries - Application list entries. type: list member_path: entries:id more...
      Supported Version Ranges
      entries v6.0.0 -> latest
      • action - Pass or block traffic, or reset connection for traffic from this application. type: str choices: pass, block, reset more...
        Supported Version Ranges
        action v6.0.0 -> latest
        [pass] v6.0.0 -> latest
        [block] v6.0.0 -> latest
        [reset] v6.0.0 -> latest
      • application - ID of allowed applications. type: list member_path: entries:id/application:id more...
        Supported Version Ranges
        application v6.0.0 -> latest
        • id - Application IDs. see Notes. type: int required: true more...
          Supported Version Ranges
          id v6.0.0 -> latest
      • behavior - Application behavior filter. type: list
      • category - Category ID list. type: list member_path: entries:id/category:id more...
        Supported Version Ranges
        category v6.0.0 -> latest
        • id - Application category ID. see Notes. type: int required: true more...
          Supported Version Ranges
          id v6.0.0 -> latest
      • exclusion - ID of excluded applications. type: list member_path: entries:id/exclusion:id more...
        Supported Version Ranges
        exclusion v6.2.7 -> v6.2.7 v6.4.4 -> latest
        • id - Excluded application IDs. see Notes. type: int required: true more...
          Supported Version Ranges
          id v6.2.7 -> v6.2.7 v6.4.4 -> latest
      • id - Entry ID. see Notes. type: int required: true more...
        Supported Version Ranges
        id v6.0.0 -> latest
      • log - Enable/disable logging for this application list. type: str choices: disable, enable more...
        Supported Version Ranges
        log v6.0.0 -> latest
        [disable] v6.0.0 -> latest
        [enable] v6.0.0 -> latest
      • log_packet - Enable/disable packet logging. type: str choices: disable, enable more...
        Supported Version Ranges
        log_packet v6.0.0 -> latest
        [disable] v6.0.0 -> latest
        [enable] v6.0.0 -> latest
      • parameters - Application parameters. type: list member_path: entries:id/parameters:id more...
        Supported Version Ranges
        parameters v6.0.0 -> latest
        • id - Parameter tuple ID. see Notes. type: int required: true more...
          Supported Version Ranges
          id v6.0.0 -> latest
        • members - Parameter tuple members. type: list member_path: entries:id/parameters:id/members:id more...
          Supported Version Ranges
          members v6.4.0 -> latest
          • id - Parameter. see Notes. type: int required: true more...
            Supported Version Ranges
            id v6.4.0 -> latest
          • name - Parameter name. type: str more...
            Supported Version Ranges
            name v6.4.0 -> latest
          • value - Parameter value. type: str more...
            Supported Version Ranges
            value v6.4.0 -> latest
        • value - Parameter value. type: str more...
          Supported Version Ranges
          value v6.0.0 -> v6.2.7
      • per_ip_shaper - Per-IP traffic shaper. Source firewall.shaper.per-ip-shaper.name. type: str more...
        Supported Version Ranges
        per_ip_shaper v6.0.0 -> latest
      • popularity - Application popularity filter (1 - 5, from least to most popular). type: list choices: 1, 2, 3, 4, 5 more...
        Supported Version Ranges
        popularity v6.0.0 -> latest
        [1] v6.0.0 -> latest
        [2] v6.0.0 -> latest
        [3] v6.0.0 -> latest
        [4] v6.0.0 -> latest
        [5] v6.0.0 -> latest
      • protocols - Application protocol filter. type: list
      • quarantine - Quarantine method. type: str choices: none, attacker more...
        Supported Version Ranges
        quarantine v6.0.0 -> latest
        [none] v6.0.0 -> latest
        [attacker] v6.0.0 -> latest
      • quarantine_expiry - Duration of quarantine. (Format type: str more...
        Supported Version Ranges
        quarantine_expiry v6.0.0 -> latest
      • quarantine_log - Enable/disable quarantine logging. type: str choices: disable, enable more...
        Supported Version Ranges
        quarantine_log v6.0.0 -> latest
        [disable] v6.0.0 -> latest
        [enable] v6.0.0 -> latest
      • rate_count - Count of the rate. type: int more...
        Supported Version Ranges
        rate_count v6.0.0 -> latest
      • rate_duration - Duration (sec) of the rate. type: int more...
        Supported Version Ranges
        rate_duration v6.0.0 -> latest
      • rate_mode - Rate limit mode. type: str choices: periodical, continuous more...
        Supported Version Ranges
        rate_mode v6.0.0 -> latest
        [periodical] v6.0.0 -> latest
        [continuous] v6.0.0 -> latest
      • rate_track - Track the packet protocol field. type: str choices: none, src-ip, dest-ip, dhcp-client-mac, dns-domain more...
        Supported Version Ranges
        rate_track v6.0.0 -> latest
        [none] v6.0.0 -> latest
        [src-ip] v6.0.0 -> latest
        [dest-ip] v6.0.0 -> latest
        [dhcp-client-mac] v6.0.0 -> latest
        [dns-domain] v6.0.0 -> latest
      • risk - Risk, or impact, of allowing traffic from this application to occur (1 - 5; Low, Elevated, Medium, High, and Critical). type: list member_path: entries:id/risk:level more...
        Supported Version Ranges
        risk v6.0.0 -> latest
        • level - Risk, or impact, of allowing traffic from this application to occur (1 - 5; Low, Elevated, Medium, High, and Critical). see Notes. type: int required: true more...
          Supported Version Ranges
          level v6.0.0 -> latest
      • session_ttl - Session TTL (0 = default). type: int more...
        Supported Version Ranges
        session_ttl v6.0.0 -> latest
      • shaper - Traffic shaper. Source firewall.shaper.traffic-shaper.name. type: str more...
        Supported Version Ranges
        shaper v6.0.0 -> latest
      • shaper_reverse - Reverse traffic shaper. Source firewall.shaper.traffic-shaper.name. type: str more...
        Supported Version Ranges
        shaper_reverse v6.0.0 -> latest
      • sub_category - Application Sub-category ID list. type: list member_path: entries:id/sub_category:id more...
        Supported Version Ranges
        sub_category v6.0.0 -> v6.2.7
        • id - Application sub-category ID. see Notes. type: int required: true more...
          Supported Version Ranges
          id v6.0.0 -> v6.2.7
      • technology - Application technology filter. type: list
      • vendor - Application vendor filter. type: list
    • extended_log - Enable/disable extended logging. type: str choices: enable, disable more...
      Supported Version Ranges
      extended_log v6.0.0 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest
    • force_inclusion_ssl_di_sigs - Enable/disable forced inclusion of SSL deep inspection signatures. type: str choices: disable, enable more...
      Supported Version Ranges
      force_inclusion_ssl_di_sigs v6.2.0 -> v6.2.0 v6.2.5 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest
    • name - List name. type: str required: true more...
      Supported Version Ranges
      name v6.0.0 -> latest
    • options - Basic application protocol signatures allowed by default. type: list choices: allow-dns, allow-icmp, allow-http, allow-ssl, allow-quic more...
      Supported Version Ranges
      options v6.0.0 -> latest
      [allow-dns] v6.0.0 -> latest
      [allow-icmp] v6.0.0 -> latest
      [allow-http] v6.0.0 -> latest
      [allow-ssl] v6.0.0 -> latest
      [allow-quic] v6.0.0 -> v7.2.2
    • other_application_action - Action for other applications. type: str choices: pass, block more...
      Supported Version Ranges
      other_application_action v6.0.0 -> latest
      [pass] v6.0.0 -> latest
      [block] v6.0.0 -> latest
    • other_application_log - Enable/disable logging for other applications. type: str choices: disable, enable more...
      Supported Version Ranges
      other_application_log v6.0.0 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest
    • p2p_black_list - P2P applications to be black listed. type: list choices: skype, edonkey, bittorrent more...
      Supported Version Ranges
      p2p_black_list v6.0.0 -> v6.4.4
      [skype] v6.0.0 -> latest
      [edonkey] v6.0.0 -> latest
      [bittorrent] v6.0.0 -> latest
    • p2p_block_list - P2P applications to be block listed. type: list choices: skype, edonkey, bittorrent more...
      Supported Version Ranges
      p2p_block_list v7.0.0 -> latest
      [skype] v6.0.0 -> latest
      [edonkey] v6.0.0 -> latest
      [bittorrent] v6.0.0 -> latest
    • replacemsg_group - Replacement message group. Source system.replacemsg-group.name. type: str more...
      Supported Version Ranges
      replacemsg_group v6.0.0 -> latest
    • unknown_application_action - Pass or block traffic from unknown applications. type: str choices: pass, block more...
      Supported Version Ranges
      unknown_application_action v6.0.0 -> latest
      [pass] v6.0.0 -> latest
      [block] v6.0.0 -> latest
    • unknown_application_log - Enable/disable logging for unknown applications. type: str choices: disable, enable more...
      Supported Version Ranges
      unknown_application_log v6.0.0 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- name: Configure application control lists.
  fortinet.fortios.fortios_application_list:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      application_list:
          app_replacemsg: "disable"
          comment: "Comments."
          control_default_network_services: "disable"
          deep_app_inspection: "disable"
          default_network_services:
              -
                  id: "8"
                  port: "0"
                  services: "http"
                  violation_action: "pass"
          enforce_default_app_port: "disable"
          entries:
              -
                  action: "pass"
                  application:
                      -
                          id: "16"
                  behavior: "<your_own_value>"
                  category:
                      -
                          id: "19"
                  exclusion:
                      -
                          id: "21"
                  id: "22"
                  log: "disable"
                  log_packet: "disable"
                  parameters:
                      -
                          id: "26"
                          members:
                              -
                                  id: "28"
                                  name: "default_name_29"
                                  value: "<your_own_value>"
                          value: "<your_own_value>"
                  per_ip_shaper: "<your_own_value> (source firewall.shaper.per-ip-shaper.name)"
                  popularity: "1"
                  protocols: "<your_own_value>"
                  quarantine: "none"
                  quarantine_expiry: "<your_own_value>"
                  quarantine_log: "disable"
                  rate_count: "0"
                  rate_duration: "60"
                  rate_mode: "periodical"
                  rate_track: "none"
                  risk:
                      -
                          level: "<you_own_value>"
                  session_ttl: "0"
                  shaper: "<your_own_value> (source firewall.shaper.traffic-shaper.name)"
                  shaper_reverse: "<your_own_value> (source firewall.shaper.traffic-shaper.name)"
                  sub_category:
                      -
                          id: "48"
                  technology: "<your_own_value>"
                  vendor: "<your_own_value>"
          extended_log: "enable"
          force_inclusion_ssl_di_sigs: "disable"
          name: "default_name_53"
          options: "allow-dns"
          other_application_action: "pass"
          other_application_log: "disable"
          p2p_black_list: "skype"
          p2p_block_list: "skype"
          replacemsg_group: "<your_own_value> (source system.replacemsg-group.name)"
          unknown_application_action: "pass"
          unknown_application_log: "disable"

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
  • This module is not guaranteed to have a backwards compatible interface.
  • 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.