Skip to content

Verify Group Who Owns /etc/ipsec.conf File

An XCCDF Rule

Description

To properly set the group owner of /etc/ipsec.conf, run the command:

$ sudo chgrp root /etc/ipsec.conf

Rationale

The ownership of the /etc/ipsec.conf file by the root group is important because this file hosts Libreswan configuration. Protection of this file is critical for system security. Assigning the ownership to root ensures exclusive control of the Libreswan configuration.

ID
xccdf_org.ssgproject.content_rule_file_groupowner_etc_ipsec_conf
Severity
Medium
References
Updated



Remediation - Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q libreswan; then

chgrp -L root /etc/ipsec.conf

else

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - configure_strategy
  - file_groupowner_etc_ipsec_conf