0
0
Intro to Computingfundamentals~10 mins

Firewalls and network protection in Intro to Computing - Interactive Code Practice

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

Complete the code to define a firewall rule that blocks incoming traffic on port 80.

Intro to Computing
firewall_rule = {"action": "block", "port": [1], "direction": "inbound"}
Drag options to blanks, or click blank then click option'
A22
B443
C80
D25
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing port 22 blocks SSH instead of web traffic.
Choosing port 443 blocks secure web traffic, not HTTP.
2fill in blank
medium

Complete the code to allow only outbound traffic from the local network.

Intro to Computing
firewall_rule = {"action": "allow", "direction": [1], "source": "192.168.1.0/24"}
Drag options to blanks, or click blank then click option'
Aoutbound
Binbound
Cboth
Dlocal
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing inbound allows incoming traffic, not outbound.
Choosing both allows all traffic, not just outbound.
3fill in blank
hard

Fix the error in the firewall rule that should block all traffic except from IP 10.0.0.5.

Intro to Computing
firewall_rule = {"action": "block", "source": "[1]", "direction": "inbound"}
Drag options to blanks, or click blank then click option'
Alocalhost
B10.0.0.5
C255.255.255.255
D0.0.0.0/0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 10.0.0.5 as source blocks only that IP, not all others.
Using localhost blocks only local machine traffic.
4fill in blank
hard

Fill both blanks to create a firewall rule that allows inbound HTTPS traffic only from a specific IP.

Intro to Computing
firewall_rule = {"action": "[1]", "port": [2], "source": "203.0.113.10", "direction": "inbound"}
Drag options to blanks, or click blank then click option'
Aallow
Bblock
C443
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Using block action prevents the traffic instead of allowing it.
Using port 80 allows HTTP, not HTTPS.
5fill in blank
hard

Fill all three blanks to define a firewall rule that allows outbound SMTP traffic to a trusted mail server.

Intro to Computing
firewall_rule = {"action": "[1]", "port": [2], "destination": "[3]", "direction": "outbound"}
Drag options to blanks, or click blank then click option'
Aallow
B25
Cmail.trustedserver.com
Dblock
Attempts:
3 left
💡 Hint
Common Mistakes
Using block action prevents traffic to the trusted server.
Using wrong port allows other traffic.
Using wrong destination allows SMTP to untrusted servers.