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 - OS Build Blueprint


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

Remediation - Puppet

include disable_tftp

class disable_tftp {
  service {'tftp':
    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 'tftp.service'
"$SYSTEMCTL_EXEC" disable 'tftp.service'

Remediation - Ansible

- name: Block Disable service tftp
  block:

  - name: Disable service tftp
    block: