TMAegis
Thêm quy tắc cho redis

TMA-REDIS-BIND

Ensure Redis binds only to specific interfaces

CaoCấp 1Tự độngredis

Mô tả

Without a bind directive, or with 0.0.0.0 / * / ::*, Redis listens on every interface. Compliant when a bind line exists and lists no wildcard address. Checks /etc/redis/redis.conf (SKIP when it does not exist; RHEL uses /etc/redis.conf).

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
f=/etc/redis/redis.conf; [ -r "$f" ] || exit 1; awk '$1 == "bind" {b = 1; for (i = 2; i <= NF; i++) if ($i ~ /^-?(0\.0\.0\.0|\*|::|::\*|::0)$/) w = 1} END {print (b && !w) ? "compliant" : "noncompliant"}' "$f"
Đầ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 'bind 127.0.0.1 -::1' plus only the private addresses clients use in redis.conf and restart Redis

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
redisdatabasenetwork
Tham chiếu
CIS Redis Benchmark - Network Security / Bind Address (verify section number for your release)

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 redis