Skip to content

Disable tftp Service

An XCCDF Rule

Description

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

Rationale

Disabling the tftp service ensures the system is not acting as a TFTP server, which does not provide encryption or authentication.

ID
xccdf_org.ssgproject.content_rule_service_tftp_disabled
Severity
High
References
Updated

Remediation Templates

script:kickstart

service disable tftp

A Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'tftp.service'
"$SYSTEMCTL_EXEC" disable 'tftp.service'
"$SYSTEMCTL_EXEC" mask 'tftp.service'

A Puppet Snippet

include disable_tftp
class disable_tftp {
  service {'tftp':
    enable => false,
    ensure => 'stopped',
  }
}

An Ansible Snippet

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

OS Build Blueprint

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

A Kubernetes Patch

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
  config:
    ignition:
      version: 3.1.0