forked from ansible-lockdown/RHEL9-CIS
tidy up sysctl templates
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
8b8aef291b
commit
fef891dc1b
5 changed files with 66 additions and 67 deletions
|
|
@ -1,12 +1,9 @@
|
|||
# Setting added via ansible CIS remediation playbook
|
||||
|
||||
# Network sysctl
|
||||
# IPv4 Network sysctl
|
||||
{% if rhel9cis_rule_3_2_1 %}
|
||||
# CIS 3.2.1
|
||||
net.ipv4.ip_forward = 0
|
||||
{% if rhel9cis_rule_3_2_1 and rhel9cis_ipv6_required %}
|
||||
net.ipv6.conf.all.forwarding = 0
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_2_2 %}
|
||||
# CIS 3.2.2
|
||||
|
|
@ -17,19 +14,11 @@ net.ipv4.conf.default.send_redirects = 0
|
|||
# CIS 3.3.1
|
||||
net.ipv4.conf.all.accept_source_route = 0
|
||||
net.ipv4.conf.default.accept_source_route = 0
|
||||
{% if rhel9cis_rule_3_3_1 and rhel9cis_ipv6_required %}
|
||||
net.ipv6.conf.all.accept_source_route = 0
|
||||
net.ipv6.conf.default.accept_source_route = 0
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_2 %}
|
||||
# CIS 3.3.2
|
||||
net.ipv4.conf.all.accept_redirects = 0
|
||||
net.ipv4.conf.default.accept_redirects = 0
|
||||
{% if rhel9cis_rule_3_3_2 and rhel9cis_ipv6_required %}
|
||||
net.ipv6.conf.all.accept_redirects = 0
|
||||
net.ipv6.conf.default.accept_redirects = 0
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_3 %}
|
||||
# CIS 3.3.3
|
||||
|
|
@ -57,8 +46,3 @@ net.ipv4.conf.default.rp_filter = 1
|
|||
# CIS 3.3.8
|
||||
net.ipv4.tcp_syncookies = 1
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_9 %}
|
||||
# CIS 3.3.9
|
||||
net.ipv6.conf.all.accept_ra = 0
|
||||
net.ipv6.conf.default.accept_ra = 0
|
||||
{% endif %}
|
||||
21
templates/etc/sysctl.d/60-netipv6_sysctl.conf.j2
Normal file
21
templates/etc/sysctl.d/60-netipv6_sysctl.conf.j2
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Setting added via ansible CIS remediation playbook
|
||||
|
||||
# IPv6 Network sysctl
|
||||
{% if rhel9cis_ipv6_required %}
|
||||
{% if rhel9cis_rule_3_2_1 %}
|
||||
net.ipv6.conf.all.forwarding = 0
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_1 %}
|
||||
net.ipv6.conf.all.accept_source_route = 0
|
||||
net.ipv6.conf.default.accept_source_route = 0
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_2 %}
|
||||
net.ipv6.conf.all.accept_redirects = 0
|
||||
net.ipv6.conf.default.accept_redirects = 0
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_9 %}
|
||||
# CIS 3.3.9
|
||||
net.ipv6.conf.all.accept_ra = 0
|
||||
net.ipv6.conf.default.accept_ra = 0
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue