SV-261889r1043177_rule
V-261889
SRG-APP-000142-DB-000094
CD16-00-003500
CAT II
10
Note: The following instructions use the PGDATA and PGVER environment variables. Refer to APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.
To change the listening port of the database, as the database administrator, change the following setting in postgresql.conf:
$ sudo su - postgres
$ vi $PGDATA/postgresql.conf
Change the port parameter to the desired port.
To change the listening address of the database, as the database administrator, change the following setting in postgresql.conf:
listen_addresses = '10.0.0.1, 127.0.0.1'
Restart the database:
# SYSTEMD SERVER ONLY
$ sudo systemctl restart postgresql-${PGVER?}
Note: psql uses the port 5432 by default. This can be changed by specifying the port with psql or by setting the PGPORT environment variable:
$ psql -p 5432 -c "SHOW port"
$ export PGPORT=5432
As the database administrator, run the following SQL:
$ psql -c "SHOW port"
$ psql -c "SHOW listen_addresses"
If the currently defined address:port configuration is deemed prohibited, this is a finding.
V-261889
False
CD16-00-003500
As the database administrator, run the following SQL:
$ psql -c "SHOW port"
$ psql -c "SHOW listen_addresses"
If the currently defined address:port configuration is deemed prohibited, this is a finding.
M
5598