0
0
GCPcloud~20 mins

Firewall rules concept in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Firewall Rules Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Firewall Rule Priority in GCP

In Google Cloud Platform, firewall rules have a priority number. What happens when two firewall rules apply to the same VM and have conflicting actions but different priorities?

AThe rule with the lower priority number (smaller number) is applied.
BBoth rules are applied, and the VM blocks traffic if either rule blocks it.
CThe rule with the higher priority number (larger number) is applied.
DThe rule created first is applied regardless of priority.
Attempts:
2 left
💡 Hint

Think about priority as a ranking where smaller numbers mean higher importance.

service_behavior
intermediate
2:00remaining
Effect of Firewall Rule Direction on Traffic

You create a firewall rule in GCP with direction set to INGRESS. Which traffic does this rule control?

ATraffic inside the VM itself.
BTraffic leaving the VM to the internet.
CTraffic between two VMs in different regions.
DTraffic entering the VM from outside sources.
Attempts:
2 left
💡 Hint

Ingress means 'coming in'.

Configuration
advanced
2:00remaining
Firewall Rule to Allow SSH Access Only from Specific IP

You want to create a GCP firewall rule that allows SSH (port 22) access only from the IP address 203.0.113.5. Which configuration is correct?

AAllow egress TCP traffic on port 22 to destination IP range 203.0.113.5/32.
BAllow ingress UDP traffic on port 22 from source IP range 203.0.113.5/32.
CAllow ingress TCP traffic on port 22 from source IP range 203.0.113.5/32.
DAllow ingress TCP traffic on port 22 from source IP range 0.0.0.0/0.
Attempts:
2 left
💡 Hint

SSH uses TCP protocol and port 22. The source IP must be exact.

security
advanced
2:00remaining
Impact of a Firewall Rule with Deny Action and High Priority

You create a firewall rule with deny action, priority 100, and source IP range 10.0.0.0/8. Another rule allows all traffic with priority 200. What will happen to traffic from 10.0.0.5?

ATraffic from 10.0.0.5 is allowed because the allow rule has lower priority number.
BTraffic from 10.0.0.5 is denied because the deny rule has higher priority (lower number).
CTraffic from 10.0.0.5 is allowed because deny rules are ignored if allow rules exist.
DTraffic from 10.0.0.5 is dropped randomly due to conflicting rules.
Attempts:
2 left
💡 Hint

Remember that lower priority numbers mean higher priority and deny rules block traffic.

Architecture
expert
3:00remaining
Designing Firewall Rules for Multi-Tier Application in GCP

You have a multi-tier application with web servers, app servers, and database servers in separate subnetworks. You want to allow web servers to talk to app servers on port 8080, app servers to talk to database servers on port 5432, and block all other traffic between tiers. Which firewall rule setup achieves this?

ACreate allow ingress rules on app servers for TCP port 8080 from web servers' subnet, allow ingress on database servers for TCP port 5432 from app servers' subnet, and deny all other traffic between subnets.
BCreate allow egress rules on web servers for TCP port 8080 to app servers' subnet, allow egress on app servers for TCP port 5432 to database servers' subnet, and allow all other traffic between subnets.
CCreate allow ingress rules on all servers for all ports from all subnets, then deny ingress on database servers for port 5432.
DCreate deny ingress rules on app servers and database servers for all ports, then allow ingress on web servers for port 8080.
Attempts:
2 left
💡 Hint

Think about controlling incoming traffic on each server tier from the correct source subnet and port.