ansible-lockdown / UBUNTU22-CIS

Ansible role for Ubuntu22 CIS Baseline
https://ansible-lockdown.readthedocs.io/en/latest/
MIT License
155 stars 68 forks source link

3.3.7 Ensure Reverse Path Filtering is enabled #158

Closed brisky closed 8 months ago

brisky commented 8 months ago

Describe the Issue CIS-CAT assessment reports failure.

Expected Behavior Assessment pass.

Actual Behavior FAIL

Control(s) Affected 3.3.7 Ensure Reverse Path Filtering is enabled

Environment:

Possible Solution

- name: POST | Update usr sysctl
  ansible.builtin.lineinfile:
      dest: /usr/lib/sysctl.d/50-default.conf
      regexp: "{{ item.regexp }}"
      line: "{{ item.line }}"
  loop:
      - { regexp: '^net.ipv4.conf.default.rp_filter', line: 'net.ipv4.conf.default.rp_filter = 1' }
      - { regexp: '^net.ipv4.conf.*.rp_filter', line: 'net.ipv4.conf.*.rp_filter = 1' }
  when:
      - rhel9cis_sysctl_update
      - not system_is_container
      - "'procps-ng' in ansible_facts.packages"
brisky commented 8 months ago

Should have been opened in RHEL9-CIS.