TMAegisBeta
更多 postgres 规则

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