More Info:

Determines if TCP port 5432 for PostgreSQL is open to the public

Risk Level

Medium

Address

Security

Compliance Standards

SOC2, GDPR, HITRUST, NISTCSF, PCIDSS, FedRAMP

Triage and Remediation

Remediation

To remediate the PostgreSQL port being open on GCP using the GCP console, follow these steps:

  1. Open the GCP Console and navigate to the GCP project where the PostgreSQL instance is located.

  2. In the left-hand menu, click on “SQL” to open the Cloud SQL Instances page.

  3. Locate the PostgreSQL instance that has the open port and click on its name to open the instance details page.

  4. Click on the “Edit” button at the top of the page to open the Edit instance page.

  5. Scroll down to the “Connections” section and locate the “Authorized networks” field.

  6. Click on the “Add network” button to add a new network.

  7. In the “Network” field, enter the IP address range or CIDR block that you want to authorize to access the instance.

  8. Click on the “Save” button to save the changes.

  9. Repeat steps 6-8 for any additional networks that need to be authorized.

  10. Scroll down to the bottom of the Edit instance page and click on the “Save” button to apply the changes.

By following the above steps, you have successfully remediated the PostgreSQL port being open on GCP using the GCP console.

Additional Reading: