HIGH
Source
CloudSploit
ID
open-all-ports-egress

Open All Ports Egress

Ensure no firewall rules allow egress to all ports and protocols.

Allowing outbound traffic to all protocols and ports can lead to internal resources accessing unwanted and untrusted resources. It is a best practice to follow the principle of least privilege, and grant access to only required protocols and ports.

Follow the appropriate remediation steps below to resolve the issue.

  1. Log into the Google Cloud Platform Console.

  2. Scroll down the left navigation panel and choose the “Networking” to select the “Firewall rules” option under the “VPC network.”Step

  3. On the “Firewall rules” page, select the “Firewall rule” which needs to be verified if it allows egress to all port and protocols. Step

  4. On the selected “Firewall rules”, if all ports are open to the public then the selected “Firewall rule” is not as per the best standards. Step

  5. Repeat steps number 2 - 4 to verify another “Firewall rule” in the network.

  6. Navigate to “VPC network” and choose the “Firewall rules” option under the “Networking” and select the “Firewall rule” which needs to restrict outbound traffic to known IP addresses.Step

  7. On the “Firewall rules” page, click on the “Edit” button at the top and enter the “Destination IP ranges” and select the “Specified protocols and ports” as per the requirements then click on the “Save” button at the bottom to make the changesStep

  8. Repeat steps number 6 - 8 to restrict ports to known IP addresses.