Disable named Service
An XCCDF Rule
Description
The named
service can be disabled with the following command:
$ sudo systemctl mask --now named.service
Rationale
All network services involve some risk of compromise due to implementation flaws and should be disabled if possible.
- ID
- xccdf_org.ssgproject.content_rule_service_named_disabled
- Severity
- Medium
- References
- Updated
Remediation - OS Build Blueprint
[customizations.services]
disabled = ["named"]
Remediation - Puppet
include disable_named
class disable_named {
service {'named':
enable => false,
ensure => 'stopped',
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'named.service'
"$SYSTEMCTL_EXEC" disable 'named.service'
Remediation - Ansible
- name: Block Disable service named
block:
- name: Disable service named
block: