Using Console
Using CLI
[FIREWALL_RULE_NAME]
with the name of the firewall rule that needs to be updated, and [AUTHORIZED_IP_RANGES]
with the comma-separated list of authorized IP ranges.For example, if the firewall rule name is allow-http
and the authorized IP ranges are 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
, the command would be:gcloud compute firewall-rules list
command again and checking the sourceRanges
field for the updated rule.Using Python
x.x.x.x
and y.y.y.y
are the IP addresses that you want to allow.