A GCP VM without an external IP can't reach the internet, and an ingress firewall rule you added for port 8080 doesn't work either.
IntermediateTroubleshootingCloud networking: VPC, firewalls, NAT, VPN and proxies
Answer
Likely causes → No Cloud NAT configured on the Cloud Router for that region/subnet, so there's no egress path. For the ingress rule: GCP firewall rules apply via target tags or service accounts; the VM doesn't have the tag, or a higher-priority deny rule wins.
Diagnose →
gcloud compute routers nats list --router=<router> --region=<region>
gcloud compute instances describe <vm> --zone=<zone> --format='value(tags.items)'
gcloud compute firewall-rules list --filter="network=<vpc>" \
--format='table(name,direction,priority,sourceRanges.list(),allowed[].map().firewall_rule().list(),targetTags.list())'
Connectivity Tests (gcloud network-management connectivity-tests create) shows which rule blocks.
Fix → Create a Cloud Router + Cloud NAT for the subnet, and add the right network tag to the VM (or fix rule priority).
Prevent → Use service-account-based firewall targets and enable firewall rule logging on critical rules.
More on Cloud networking: VPC, firewalls, NAT, VPN and proxies
An EC2 instance in a private subnet hangs on `apt-get update` at `Connecting to archive.ubuntu.com`.BeginnerA new EC2 instance in a "public" subnet can't be reached over SSH from the internet; the SG allows port 22 from your IP.BeginnerThe SG allows inbound 443 and the app works from inside the VPC, but internet clients time out. The subnet NACL allows inbound 443.IntermediateA VPC peering connection is `Active`, but instances in the two VPCs can't ping each other.BeginnerALB targets are `unhealthy` with reason `Target.Timeout`, and VPC Flow Logs show `REJECT` from the ALB's IPs to the instances.BeginnerTwo VPCs are attached to a Transit Gateway, but traffic between them fails.Intermediate