Skip to content

Disable Squid

An XCCDF Rule

Description

The squid service can be disabled with the following command:

$ sudo systemctl mask --now squid.service

Rationale

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

ID
xccdf_org.ssgproject.content_rule_service_squid_disabled
Severity
Unknown
Updated



Remediation - Puppet

include disable_squid

class disable_squid {
  service {'squid':
    enable => false,
    ensure => 'stopped',

Remediation - OS Build Blueprint


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

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - disable_strategy
  - low_complexity

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if ( [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && rpm --quiet -q squid ); then

SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'squid.service'
"$SYSTEMCTL_EXEC" disable 'squid.service'