forked from ansible-lockdown/RHEL9-CIS
sysctl control improvements
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
fb1c6e9232
commit
33ebfea653
4 changed files with 118 additions and 72 deletions
|
|
@ -2,19 +2,22 @@
|
|||
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled"
|
||||
block:
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled | Disable IPv4 forwarding | Set Fact"
|
||||
set_fact:
|
||||
sysctl_update: true
|
||||
flush_ipv4_route: true
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled | Disable IPv4 forwarding"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/60-netipv4_sysctl.conf"
|
||||
notify:
|
||||
- update sysctl
|
||||
- sysctl flush ipv4 route table
|
||||
- block:
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled | Disable IPv6 forwarding | Set Fact"
|
||||
set_fact:
|
||||
flush_ipv6_route: true
|
||||
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled | Disable IPv6 forwarding"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/60-netipv6_sysctl.conf"
|
||||
notify:
|
||||
- update sysctl
|
||||
- sysctl flush ipv6 route table
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled | Disable IPv6 forwarding"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/60-netipv6_sysctl.conf"
|
||||
|
||||
when: rhel9cis_ipv6_required
|
||||
when:
|
||||
- not rhel9cis_is_router
|
||||
|
|
@ -28,11 +31,14 @@
|
|||
- rule_3.2.1
|
||||
|
||||
- name: "3.2.2 | PATCH | Ensure packet redirect sending is disabled"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/60-netipv4_sysctl.conf"
|
||||
notify:
|
||||
- update sysctl
|
||||
- sysctl flush ipv4 route table
|
||||
block:
|
||||
- name: "3.2.2 | PATCH | Ensure packet redirect sending is disabled | Set Fact"
|
||||
set_fact:
|
||||
sysctl_update: true
|
||||
flush_ipv4_route: true
|
||||
- name: "3.2.2 | PATCH | Ensure packet redirect sending is disabled"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/60-netipv4_sysctl.conf"
|
||||
when:
|
||||
- not rhel9cis_is_router
|
||||
- rhel9cis_rule_3_2_2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue