-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only check whether the ufw is active after ufw service is enable instead of configuring the ufw.
- Loading branch information
1 parent
7ef2387
commit 6f675aa
Showing
7 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
linux_os/guide/system/network/network-ufw/check_ufw_active/rule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
documentation_complete: true | ||
|
||
title: 'Verify ufw Active' | ||
|
||
description: |- | ||
Verify the ufw is enabled on the system with the following command: | ||
<pre># sudo ufw status</pre> | ||
If the above command returns the status as "inactive" or any type of error, this is a finding. | ||
rationale: |- | ||
Remote access services, such as those providing remote access to network devices and information systems, | ||
which lack automated control capabilities, increase risk and make remote user access management difficult at best. | ||
Remote access is access to DOD nonpublic information systems by an authorized user (or an information system) communicating | ||
through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. | ||
Ubuntu 22.04 LTS functionality (e.g., RDP) must be capable of taking enforcement action if the audit reveals unauthorized activity. | ||
Automated control of remote access sessions allows organizations to ensure ongoing compliance with remote access policies by | ||
enforcing connection rules of remote access applications on a variety of information system components. | ||
severity: medium | ||
|
||
references: | ||
cis@ubuntu2004: 3.5.1.3 | ||
cis@ubuntu2204: 3.5.1.3 | ||
disa: CCI-002314 | ||
stigid@ubuntu2204: UBTU-22-251015 | ||
|
||
fixtext: |- | ||
Enable the ufw by using the following command: | ||
<pre>$ sudo ufw enable</pre> | ||
platform: machine and package[ufw] |
11 changes: 11 additions & 0 deletions
11
linux_os/guide/system/network/network-ufw/check_ufw_active/sce/shared.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
# platform = multi_platform_ubuntu | ||
# check-import = stdout | ||
|
||
result=$XCCDF_RESULT_FAIL | ||
|
||
if ufw status | grep -qw "active"; then | ||
result=${XCCDF_RESULT_PASS} | ||
fi | ||
|
||
exit $result |
5 changes: 5 additions & 0 deletions
5
linux_os/guide/system/network/network-ufw/check_ufw_active/tests/correct.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# package = ufw | ||
|
||
systemctl enable --now ufw | ||
ufw allow ssh | ||
ufw -f enable |
7 changes: 7 additions & 0 deletions
7
linux_os/guide/system/network/network-ufw/check_ufw_active/tests/incorrect.fail.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# package = ufw | ||
# remediation = none | ||
|
||
systemctl enable --now ufw | ||
ufw allow ssh | ||
ufw -f enable || exit 1 | ||
ufw disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters