Verify Permissions On /etc/ipsec.conf File
An XCCDF Rule
Description
To properly set the permissions of /etc/ipsec.conf
, run the command:
$ sudo chmod 0644 /etc/ipsec.conf
Rationale
Setting correct permissions on the /etc/ipsec.conf file is important because this file hosts Libreswan configuration. Protection of this file is critical for system security. Restricting the permissions ensures exclusive control of the Libreswan configuration.
- ID
- xccdf_org.ssgproject.content_rule_file_permissions_etc_ipsec_conf
- Severity
- Medium
- References
- Updated
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-86393-6
- configure_strategy
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q libreswan; then
chmod u-xs,g-xws,o-xwt /etc/ipsec.conf
else