PostgreSQL
TMA-POSTGRES-5.2
Ensure PostgreSQL is Bound to an IP Address
中等級 1人工審核postgres
說明
By default, listen_addresses is set to localhost which prevents any and all remote TCP connections to the PostgreSQL port. Some Docker images may set listen_addesses to *. * corresponds to all available IP interfaces; thus, the PostgreSQL server then accepts TCP connections on all the server's IPv6 and IPv4 interfaces.
檢查方式
稽核方法: 人工審核
此項建議無法自動檢查。當您傳入 --include-manual 時,掃描結果會列出此項目並附帶這些說明。
Run SHOW listen_addresses; If * or 0.0.0.0 is returned, PostgreSQL listens on every interface and this is a fail.
修補方式
修補方法: 操作指南或基礎設施修補檔
ALTER SYSTEM SET listen_addresses = 'localhost,<specific IP>'; (or set it in postgresql.conf) and restart PostgreSQL.
屬性
- 作業系統
- 不限
- 標籤
- postgresdatabasenetworkmanual
- 參考資料
- CIS PostgreSQL 18 Benchmark v1.0.0 - 5.2 Ensure PostgreSQL is Bound to an IP Address