🛡️ Google GCE Network has no egress deny Firewall Rule🟢
- Contextual name: 🛡️ GCE Network has no egress deny Firewall Rule🟢
- ID:
/ce/ca/google/vpc/network-egress-deny-rule - Tags:
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logic
Description
Description
This policy identifies Google GCE Networks that lack at least one egress firewall rule configured to explicitly deny outbound traffic.
Rationale
Implementing a default-deny posture for egress traffic is a fundamental security best practice. By default, VPC networks permit all outbound traffic. Creating a low-priority firewall rule that denies all egress traffic ensures that network administrators must deliberately define higher-priority rules to allow only necessary outbound connections. This approach helps prevent data exfiltration, restricts compromised instances from communicating with external servers, and enforces the principle of least privilege for network traffic.
Impact
Enforcing this policy may disrupt legitimate outbound traffic that currently relies on unrestricted firewall rules.
Audit
This policy flags a Google GCE Network as
INCOMPLIANTif it does not have at least one associated Google GCE Firewall Rule that meets the following criteria:
Direction: EGRESSDestination Ranges: 0.0.0.0/0... see more
Remediation
Remediation
Create a Default-Deny Egress Firewall Rule
Creating a firewall rule that denies all egress traffic ensures that no outbound connections are allowed unless explicitly permitted by higher-priority rules.
From gcloud CLI
```sh
gcloud compute firewall-rules create {{firewall-rule-name}} \
--network={{network-name}} \
--action=DENY \
--direction=EGRESS \
--priority=65534 \
--rules=all \
--destination-ranges=0.0.0.0/0 \
--enable-logging
```Notes:
- The
priorityis set high (65534) to ensure it acts as a default-deny rule, allowing higher-priority rules to override it.--enable-loggingis optional but recommended for audit and troubleshooting purposes.
policy.yaml
Linked Framework Sections
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| 💼 Cloudaware Framework → 💼 Secure Access | 57 | no data | |||
| 💼 PCI DSS v3.2.1 → 💼 7.2 Establish an access control system(s) for systems components that restricts access based on a user's need to know, and is set to “deny all” unless specifically allowed. | 3 | 8 | no data |