Network and Perimeter Security on GCP: VPC Service Controls, IAP, Cloud Armor, Security Command Center and Zero Trust

Google Cloud Platform Architect 55 min min read Updated: Nov 17, 2026 Intermediate
Network and Perimeter Security on GCP: VPC Service Controls, IAP, Cloud Armor, Security Command Center and Zero Trust
Intermediate Topic 3 of 3

Defense in Depth

text Identity (IAM, MFA, federation) └─ Perimeter (VPC Service Controls, Org Policy) └─ Network (VPC, firewall, private access, Cloud Armor) └─ Compute (Shielded VM, OS Login, Binary Authorization) └─ Data (CMEK, DLP, backups) └─ Detect and respond (SCC, logging, alerts)

VPC Service Controls

  • Creates a service perimeter around Google-managed services (BigQuery, Cloud Storage and others) in selected projects
  • Stops data exfiltration: even someone with valid IAM cannot copy data out to a project outside the perimeter
  • Use ingress and egress rules for approved exceptions. Start in dry-run mode to see what would be blocked
  • Complements IAM: IAM says who, VPC-SC says from where
bash gcloud access-context-manager policies list --organization=987654321 gcloud access-context-manager perimeters create data-perimeter --policy=POLICY_ID --title="Data perimeter" \ --resources=projects/123456 --restricted-services=bigquery.googleapis.com,storage.googleapis.com --perimeter-type=regular

Identity-Aware Proxy (IAP) and Zero Trust

  • Zero trust: do not trust a request because of its network. Verify the user, device and context every time
  • IAP puts a login check in front of web apps and SSH/RDP to VMs. No VPN and no public IP needed
  • Access levels can require a managed device, location or time
bash # SSH to a VM that has no external IP, through IAP gcloud compute ssh private-vm --zone=asia-south1-a --tunnel-through-iap gcloud projects add-iam-policy-binding my-proj --member="group:ops@example.com" --role="roles/iap.tunnelResourceAccessor"

Cloud Armor

  • A web application firewall and DDoS defense for the external Application Load Balancer
  • Rules for IP allow or deny lists, geography, OWASP attacks (SQL injection, XSS), rate limiting and bot management
  • Adaptive Protection uses machine learning to spot attacks
bash gcloud compute security-policies create web-policy --description="WAF" gcloud compute security-policies rules create 1000 --security-policy=web-policy --expression="evaluatePreconfiguredWaf('sqli-v33-stable')" --action=deny-403 gcloud compute backend-services update web-backend --security-policy=web-policy --global

Compute and Container Security

FeatureWhat it does
Shielded VMSecure boot and integrity monitoring against rootkits
Confidential VMEncrypts data in use in memory
OS LoginControls SSH with IAM instead of SSH keys
Binary AuthorizationOnly allow signed, trusted container images to deploy
Artifact AnalysisScan images for vulnerabilities
GKE hardeningPrivate clusters, Workload Identity, network policies, node auto-upgrade

Security Command Center (SCC)

  • Central place to see misconfigurations, vulnerabilities and threats
  • Security Health Analytics finds issues such as open firewalls and public buckets
  • Event Threat Detection and Container Threat Detection spot attacks
  • Premium and Enterprise tiers add more features, including compliance reports

Network Security Quick Rules

  1. No public IPs on VMs unless needed (use IAP, Cloud NAT and load balancers)
  2. Private Google Access so private VMs reach Google APIs
  3. Deny by default firewall design, allow by tag or service account
  4. Put Cloud Armor in front of public apps
  5. Enable VPC Flow Logs and Firewall Rules Logging for investigation

Practice

  1. Connect to a VM without a public IP using IAP tunnel
  2. Create a Cloud Armor policy that blocks one IP range
  3. Run a VPC-SC perimeter in dry-run mode and read the violation logs
  4. Find three findings in Security Command Center and decide fixes

Conclusion

Use layers: IAM for identity, VPC Service Controls for data perimeters, IAP for zero trust access, Cloud Armor for web attacks, hardened compute and SCC for detection. Start perimeters in dry-run and remove public IPs where possible.

Quick Summary: defense in depth; VPC-SC; IAP; Cloud Armor; compute security; SCC; rules.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators