Install ufw Package
An XCCDF Rule
Description
Theufw
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
- Updated
Remediation Templates
A Puppet Snippet
include install_ufw
class install_ufw {
package { 'ufw':
ensure => 'installed',
}
}
An Ansible Snippet
- name: Gather the package facts
package_facts:
manager: auto
tags:
- DISA-STIG-UBTU-20-010433
- enable_strategy
OS Build Blueprint
[[packages]]
name = "ufw"
version = "*"
A 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"
else