STIGQter STIGQter: STIG Summary: PostgreSQL 9.x Security Technical Implementation Guide Version: 1 Release: 6 Benchmark Date: 25 Oct 2019: PostgreSQL must be configured to prohibit or restrict the use of organization-defined functions, ports, protocols, and/or services, as defined in the PPSM CAL and vulnerability assessments.

DISA Rule

SV-87493r2_rule

Vulnerability Number

V-72841

Group Title

SRG-APP-000142-DB-000094

Rule Version

PGS9-00-000100

Severity

CAT II

CCI(s)

Weight

10

Fix Recommendation

Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content 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.

Next, restart the database:

# SYSTEMD SERVER ONLY
$ sudo systemctl restart postgresql-${PGVER?}

# INITD SERVER ONLY
$ sudo service postgresql-${PGVER?} restart

Note: psql uses the default 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

Check Contents

As the database administrator, run the following SQL:

$ psql -c "SHOW port"

If the currently defined port configuration is deemed prohibited, this is a finding.

Vulnerability Number

V-72841

Documentable

False

Rule Version

PGS9-00-000100

Severity Override Guidance

As the database administrator, run the following SQL:

$ psql -c "SHOW port"

If the currently defined port configuration is deemed prohibited, this is a finding.

Check Content Reference

M

Target Key

3087

Comments