Skip to content

Disable httpd Service

An XCCDF Rule

Description

The httpd service can be disabled with the following command:
$ sudo systemctl mask --now httpd.service

Rationale

Running web server software provides a network-based avenue of attack, and should be disabled if not needed.

ID
xccdf_org.ssgproject.content_rule_service_httpd_disabled
Severity
Unknown
References
Updated

Remediation Templates

A Puppet Snippet

include disable_httpd
class disable_httpd {
  service {'httpd':
    enable => false,
    ensure => 'stopped',
  }
}

OS Build Blueprint

[customizations.services]
masked = ["httpd"]

An Ansible Snippet

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - NIST-800-53-CM-6(a)
  - NIST-800-53-CM-7(a)