Disable snmpd Service
An XCCDF Rule
Description
The snmpd
service can be disabled with the following command:
$ sudo systemctl mask --now snmpd.service
Rationale
Running SNMP software provides a network-based avenue of attack, and should be disabled if not needed.
- ID
- xccdf_org.ssgproject.content_rule_service_snmpd_disabled
- Severity
- Low
- References
- Updated
Remediation - OS Build Blueprint
[customizations.services]
disabled = ["snmpd"]
Remediation - Puppet
include disable_snmpd
class disable_snmpd {
service {'snmpd':
enable => false,
ensure => 'stopped',
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if ( [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && rpm --quiet -q net-snmp ); then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'snmpd.service'
"$SYSTEMCTL_EXEC" disable 'snmpd.service'
Remediation - Kubernetes Patch
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition:
version: 3.1.0
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- disable_strategy
- low_complexity