documentation_complete: true

title: 'Install ufw Package'

description: |-
    {{{ describe_package_install(package="ufw") }}}

rationale: |-
    <tt>ufw</tt> controls the Linux kernel network packet filtering
    code. <tt>ufw</tt> allows system operators to set up firewalls and IP
    masquerading, etc.

severity: medium

references:
    srg: SRG-OS-000297-GPOS-00115

ocil_clause: 'the package is not installed'

ocil: '{{{ ocil_package(package="ufw") }}}'

{{%- if 'ubuntu' in product %}}
template:
    name: package_installed_guard_var
    vars:
        pkgname: ufw
        variable: var_network_filtering_service
        value: ufw
        operation: pattern match
{{%- else %}}
template:
    name: package_installed
    vars:
        pkgname: ufw
{{%- endif %}}
