forked from ansible-lockdown/RHEL9-CIS
Updated nftables prereqs for table
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
e915a7ae5d
commit
22a1955948
1 changed files with 10 additions and 4 deletions
|
|
@ -1,5 +1,15 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: "OPTIONAL | PATCH | Create Table if doesn't exist and required"
|
||||||
|
when:
|
||||||
|
- rhel9cis_nft_tables_autonewtable
|
||||||
|
- rhel9cis_rule_4_3_1
|
||||||
|
- rhel9cis_rule_4_3_2
|
||||||
|
- rhel9cis_rule_4_3_3
|
||||||
|
- rhel9cis_rule_4_3_4
|
||||||
|
tags: always
|
||||||
|
ansible.builtin.shell: "nft add table inet {{ rhel9cis_nft_tables_tablename }}"
|
||||||
|
|
||||||
- name: "4.3.1 | PATCH | Ensure nftables base chains exist"
|
- name: "4.3.1 | PATCH | Ensure nftables base chains exist"
|
||||||
when:
|
when:
|
||||||
- rhel9cis_rule_4_3_1
|
- rhel9cis_rule_4_3_1
|
||||||
|
|
@ -72,10 +82,6 @@
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: discovered_nftables_outconnectionrule
|
register: discovered_nftables_outconnectionrule
|
||||||
|
|
||||||
- name: "4.3.2| AUDIT | Ensure nftables established connections are configured | Create table is doesn't exist"
|
|
||||||
when: rhel9cis_nft_tables_autonewtable
|
|
||||||
ansible.builtin.shell: "nft add table inet {{ rhel9cis_nft_tables_tablename }}"
|
|
||||||
|
|
||||||
- name: "4.3.2| PATCH | Ensure nftables established connections are configured | Add input tcp established accept policy"
|
- name: "4.3.2| PATCH | Ensure nftables established connections are configured | Add input tcp established accept policy"
|
||||||
when: '"ip protocol tcp ct state established accept" not in discovered_nftables_inconnectionrule.stdout'
|
when: '"ip protocol tcp ct state established accept" not in discovered_nftables_inconnectionrule.stdout'
|
||||||
ansible.builtin.shell: nft add rule inet "{{ rhel9cis_nft_tables_tablename }}" input ip protocol tcp ct state established accept
|
ansible.builtin.shell: nft add rule inet "{{ rhel9cis_nft_tables_tablename }}" input ip protocol tcp ct state established accept
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue