More Info:

Determines if all ports are open to the public.

Risk Level

Critical

Address

Security

Compliance Standards

SOC2, NIST, PCIDSS, GDPR

Triage and Remediation

Remediation

To remediate the misconfiguration of having all ports open to the public in GCP, you can follow the below steps using the GCP console:

  1. Open the Google Cloud Platform (GCP) Console and navigate to the project where the misconfiguration exists.
  2. In the left-hand menu, click on “Compute Engine” and then click on “VM instances”.
  3. Select the instance that needs to be remediated.
  4. Click on the “Edit” button at the top of the page.
  5. Scroll down to the “Firewall” section and click on “Networking”.
  6. In the “Firewall rules” section, click on “default-allow-ssh”.
  7. In the “Protocols and ports” section, select “Specified protocols and ports” and enter “tcp:22” in the text box.
  8. Click on “Save” to save the changes.

This will remediate the misconfiguration of having all ports open to the public by limiting access to only the SSH port (port 22).

Additional Reading: