Skip to content

Commit 28b7817

Browse files
authored
Merge pull request #11189 from dodys/nftables-v0.1.70
Cherry-pick of PR 11180 for v0.1.70
2 parents 2568bef + 05f15d3 commit 28b7817

File tree

1 file changed

+3
-3
lines changed
  • linux_os/guide/system/network/network-nftables/nftables_ensure_default_deny_policy/sce

1 file changed

+3
-3
lines changed

linux_os/guide/system/network/network-nftables/nftables_ensure_default_deny_policy/sce/ubuntu.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# Check if default policy is drop
66
output=$(nft list ruleset)
77

8-
if ! (grep 'hook input' "$output" |& grep -w 'policy drop' &>/dev/null &&\
9-
grep 'hook forward' "$output" |& grep -w 'policy drop' &>/dev/null &&\
10-
grep 'hook output' "$output" |& grep -w 'policy drop' &>/dev/null); then
8+
if ! (echo "$output" | grep 'hook input' |& grep -wq 'policy drop' &&\
9+
echo "$output" | grep 'hook forward' |& grep -wq 'policy drop' &&\
10+
echo "$output" | grep 'hook output' |& grep -wq 'policy drop'); then
1111
exit "${XCCDF_RESULT_FAIL}"
1212
fi
1313

0 commit comments

Comments
 (0)