TMAegis
Više pravila za postgres

PostgreSQL

TMA-POSTGRES-5.2

Ensure PostgreSQL is Bound to an IP Address

SrednjaNivo 1Ručni pregledpostgres

Opis

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.

Kako se proverava

Metod provere: Ručni pregled

Ova preporuka se ne može proveriti automatski. Skeniranje je navodi sa ovim uputstvima kada prosledite --include-manual.

Run SHOW listen_addresses; If * or 0.0.0.0 is returned, PostgreSQL listens on every interface and this is a fail.

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

ALTER SYSTEM SET listen_addresses = 'localhost,<specific IP>'; (or set it in postgresql.conf) and restart PostgreSQL.

Svojstva

Operativni sistemi
Bilo koji
Oznake
postgresdatabasenetworkmanual
Referenca
CIS PostgreSQL 18 Benchmark v1.0.0 - 5.2 Ensure PostgreSQL is Bound to an IP Address