Skip to content

Instantly share code, notes, and snippets.

@paseaf
Last active June 14, 2022 17:14
Show Gist options
  • Save paseaf/7e971687670eb5c045b7c011416fa7ae to your computer and use it in GitHub Desktop.
Save paseaf/7e971687670eb5c045b7c011416fa7ae to your computer and use it in GitHub Desktop.
Add GCP default firewall rules

Rules: https://cloud.google.com/vpc/docs/firewalls#more_rules_default_vpc

Add them with gcloud:

gcloud compute firewall-rules create default-allow-internal --allow tcp:0-65535,udp:0-65535,icmp \
  --source-ranges="10.128.0.0/9" --priority=65534
gcloud compute firewall-rules create default-allow-ssh --allow tcp:22 --priority=65534
gcloud compute firewall-rules create default-allow-rdp --allow tcp:3389 --priority=65534
gcloud compute firewall-rules create default-allow-icmp --allow icmp --priority=65534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment