Docker
TMA-DOCKER-2.17
Ensure Userland Proxy is Disabled
ThấpCấp 1Tự độngdocker
Mô tả
The userland proxy (docker-proxy) adds attack surface; hairpin NAT through iptables is preferred. Compliant when userland-proxy is set to false. The audit reads the running dockerd command line (ps) together with /etc/docker/daemon.json.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
args=$(ps -eo args 2>/dev/null) || exit 1; s=$(printf '%s\n' "$args" | grep '[d]ockerd'; cat /etc/docker/daemon.json 2>/dev/null); printf '%s\n' "$s" | grep -Eq -e '--userland-proxy[= ]+false|"userland-proxy"[[:space:]]*:[[:space:]]*false' && echo compliant || echo missing- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Set "userland-proxy": false in /etc/docker/daemon.json and restart the Docker daemon.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- dockerdaemonnetwork
- Tham chiếu
- CIS Docker Benchmark v1.9.0 - 2.17 Ensure Userland Proxy is Disabled
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
shell
tmaegis scan --target docker