0
0
GCPcloud~10 mins

Cloud Armor for DDoS and WAF in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a Cloud Armor security policy.

GCP
gcloud compute security-policies create [1] --description="Block bad traffic"
Drag options to blanks, or click blank then click option'
Ainstance-group
Bfirewall-rule
Cnetwork-route
Dmy-security-policy
Attempts:
3 left
💡 Hint
Common Mistakes
Using instance group or firewall rule names instead of a security policy name.
Confusing network routes with security policies.
2fill in blank
medium

Complete the code to add a rule to block traffic from a specific IP address.

GCP
gcloud compute security-policies rules create 100 --security-policy [1] --expression="origin.ip == '203.0.113.1'" --action=deny-403
Drag options to blanks, or click blank then click option'
Amy-security-policy
Bmy-instance
Cdefault-firewall
Dnetwork-policy
Attempts:
3 left
💡 Hint
Common Mistakes
Using instance or firewall names instead of the security policy name.
Confusing network policies with Cloud Armor policies.
3fill in blank
hard

Fix the error in the command to apply the security policy to a backend service.

GCP
gcloud compute backend-services update [1] --security-policy my-security-policy --global
Drag options to blanks, or click blank then click option'
Amy-instance
Bmy-backend-service
Cmy-firewall
Dmy-network
Attempts:
3 left
💡 Hint
Common Mistakes
Using instance or firewall names instead of backend service names.
Confusing network names with backend services.
4fill in blank
hard

Fill both blanks to create a rule that allows traffic only from a specific country.

GCP
gcloud compute security-policies rules create 200 --security-policy [1] --expression="origin.region_code == '[2]'" --action=allow
Drag options to blanks, or click blank then click option'
Amy-security-policy
BUS
CEU
Ddefault-policy
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect policy names or invalid region codes.
Confusing region codes with IP addresses.
5fill in blank
hard

Fill all three blanks to create a rule that blocks SQL injection attempts.

GCP
gcloud compute security-policies rules create 300 --security-policy [1] --expression="evaluatePreconfiguredExpr('[2]')" --action=[3]
Drag options to blanks, or click blank then click option'
Amy-security-policy
Bsqli-v33-stable
Cdeny-403
Dallow
Attempts:
3 left
💡 Hint
Common Mistakes
Using allow action instead of deny for blocking attacks.
Using incorrect preconfigured expression names.