-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix set_ip6tables_default_rule for ubuntu
- fixed path for ip6tables persistent rules - move away from using awk in SCE - defined few tests for ubuntu
- Loading branch information
Showing
7 changed files
with
38 additions
and
5 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
6 changes: 6 additions & 0 deletions
6
...em/network/network-iptables/iptables_activation/set_ip6tables_default_rule/bash/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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# platform = multi_platform_all | ||
{{% if 'ubuntu' in product %}} | ||
{{{ bash_package_install("iptables-persistent") }}} | ||
sed -i 's/^:INPUT ACCEPT.*/:INPUT DROP [0:0]/g' /etc/iptables/rules.v6 | ||
{{% else %}} | ||
sed -i 's/^:INPUT ACCEPT.*/:INPUT DROP [0:0]/g' /etc/sysconfig/ip6tables | ||
{{% endif %}} | ||
|
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
8 changes: 8 additions & 0 deletions
8
...ork/network-iptables/iptables_activation/set_ip6tables_default_rule/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,8 @@ | ||
# platform = multi_platform_ubuntu | ||
# packages = iptables,iptables-persistent | ||
|
||
apt purge -y nftables ufw | ||
|
||
ip6tables -P INPUT DROP | ||
ip6tables -P FORWARD DROP | ||
ip6tables -P OUTPUT DROP |
7 changes: 7 additions & 0 deletions
7
...twork-iptables/iptables_activation/set_ip6tables_default_rule/tests/ipv6_disabled.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,7 @@ | ||
# platform = multi_platform_ubuntu | ||
# packages = iptables,iptables-persistent | ||
|
||
apt purge -y nftables ufw | ||
|
||
ip6tables -P INPUT ACCEPT | ||
sysctl net.ipv6.conf.all.disable_ipv6=1 |
9 changes: 9 additions & 0 deletions
9
...twork/network-iptables/iptables_activation/set_ip6tables_default_rule/tests/wrong.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,9 @@ | ||
# platform = multi_platform_ubuntu | ||
# remediation = none | ||
# packages = iptables,iptables-persistent | ||
|
||
apt purge -y nftables ufw | ||
|
||
ip6tables -P INPUT ACCEPT | ||
ip6tables -P FORWARD DROP | ||
ip6tables -P OUTPUT DROP |