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.
修正方法
修正方法: ガイダンスまたは IaC パッチ
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