Skip to content

Install ufw Package

An XCCDF Rule

Description

The ufw package can be installed with the following command:

$ apt-get install ufw

Rationale

ufw controls the Linux kernel network packet filtering code. ufw allows system operators to set up firewalls and IP masquerading, etc.

ID
xccdf_org.ssgproject.content_rule_package_ufw_installed
Severity
Medium
References
Updated



Remediation - Puppet

include install_ufw

class install_ufw {
  package { 'ufw':
    ensure => 'installed',
  }

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - DISA-STIG-UBTU-20-010433
  - enable_strategy

Remediation - OS Build Blueprint


[[packages]]
name = "ufw"
version = "*"

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if dpkg-query --show --showformat='${db:Status-Status}
' 'kernel' 2>/dev/null | grep -q installed; then

DEBIAN_FRONTEND=noninteractive apt-get install -y "ufw"