mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
updates
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
c6caa90059
commit
19a218390d
6 changed files with 22 additions and 21 deletions
7
templates/etc/sysctl.d/60-disable_ipv6.conf.j2
Normal file
7
templates/etc/sysctl.d/60-disable_ipv6.conf.j2
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Setting added via ansible CIS remediation playbook
|
||||
|
||||
# IPv6 disable
|
||||
{% if rhel9cis_rule_3_1_1 and rhel9cis_ipv6_required %}
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
{% endif %}
|
||||
8
templates/etc/sysctl.d/60-kernel_sysctl.conf.j2
Normal file
8
templates/etc/sysctl.d/60-kernel_sysctl.conf.j2
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Setting added via ansible CIS remediation playbook
|
||||
|
||||
|
||||
{% if rhel9cis_rule_1_5_3 %}
|
||||
# Kernel sysctl
|
||||
# CIS 1.5.3
|
||||
kernel.randomize_va_space = 2
|
||||
{% endif %}
|
||||
64
templates/etc/sysctl.d/99-sysctl.conf.j2
Normal file
64
templates/etc/sysctl.d/99-sysctl.conf.j2
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# Setting added via ansible CIS remediation playbook
|
||||
|
||||
# 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
|
||||
net.ipv4.conf.all.send_redirects = 0
|
||||
net.ipv4.conf.default.send_redirects = 0
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_1 %}
|
||||
# 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
|
||||
net.ipv4.conf.all.secure_redirects = 0
|
||||
net.ipv4.conf.default.secure_redirects = 0
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_4 %}
|
||||
# CIS 3.3.4
|
||||
net.ipv4.conf.all.log_martians = 1
|
||||
net.ipv4.conf.default.log_martians = 1
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_5 %}
|
||||
# CIS 3.3.5
|
||||
net.ipv4.icmp_echo_ignore_broadcasts = 1
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_6 %}
|
||||
# CIS 3.3.6
|
||||
net.ipv4.icmp_ignore_bogus_error_responses = 1
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_7 %}
|
||||
# CIS 3.3.7
|
||||
net.ipv4.conf.default.rp_filter = 1
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_3_3_8 %}
|
||||
# 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 %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue