For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/default_rules/a7x-nea-bz9.md. A documentation index is available at /llms.txt.

The Docker daemon should be allowed to configure the firewall rules

docker

Classification:

compliance

Framework:

cis-docker

Control:

2.4

Description

Docker should manage the iptables rules of its networks.

Rationale

Docker writes the iptables rules that its container networking and published ports need. With iptables management off, the administrator must write those rules by hand, and a mistake can expose containers or break their networking.

Audit

Look for iptables on the dockerd command line and in daemon.json:

ps -o args= -C dockerd
grep '"iptables"' /etc/docker/daemon.json

Datadog reads --iptables on the dockerd command line or, if it isn’t set there, iptables in daemon.json. It passes the rule when the setting is true or unset, and fails it when it is false.

Remediation

Remove --iptables=false from the dockerd command line and "iptables": false from daemon.json. Then restart the daemon with systemctl restart docker.

Impact

None.

Default value

Docker manages iptables.

References

  1. https://docs.docker.com/reference/cli/dockerd/
  2. https://docs.docker.com/engine/network/packet-filtering-firewalls/