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
References
Updated



Remediation - Kubernetes Patch

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

Remediation - OS Build Blueprint


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

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - CCE-80285-0
  - disable_strategy

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'

Remediation - Puppet

include disable_squid

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