Disable xinetd Service
An XCCDF Rule
Description
The xinetd
service can be disabled with the following command:
$ sudo systemctl mask --now xinetd.service
Rationale
The xinetd service provides a dedicated listener service for some programs, which is no longer necessary for commonly-used network services. Disabling it ensures that these uncommon services are not running, and also prevents attacks against xinetd itself.
- ID
- xccdf_org.ssgproject.content_rule_service_xinetd_disabled
- Severity
- Medium
- References
- Updated
Remediation - Puppet
include disable_xinetd
class disable_xinetd {
service {'xinetd':
enable => false,
ensure => 'stopped',
Remediation - OS Build Blueprint
[customizations.services]
masked = ["xinetd"]
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- NIST-800-171-3.4.7
- NIST-800-53-CM-6(a)
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'xinetd.service'
"$SYSTEMCTL_EXEC" disable 'xinetd.service'