Bird
0
0

Given the following commands run on a Raspberry Pi, what will be the output of sudo ufw status?

medium📝 Predict Output Q13 of 15
Raspberry Pi - Security and Deployment
Given the following commands run on a Raspberry Pi, what will be the output of sudo ufw status?
sudo ufw enable
sudo ufw allow ssh
sudo ufw deny 80
AError: ufw command not found
BStatus: inactive
CStatus: active No rules defined
DStatus: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 80 DENY Anywhere
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the firewall commands

    sudo ufw enable activates the firewall. sudo ufw allow ssh opens port 22 (SSH). sudo ufw deny 80 blocks HTTP port 80.
  2. Step 2: Understand the status output

    The status shows active firewall with rules allowing SSH (port 22) and denying port 80.
  3. Final Answer:

    Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 80 DENY Anywhere -> Option D
  4. Quick Check:

    Firewall enabled with SSH allow and port 80 deny = Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 80 DENY Anywhere [OK]
Quick Trick: Enable ufw then add rules to see them in status [OK]
Common Mistakes:
MISTAKES
  • Assuming firewall is inactive after enabling
  • Expecting no rules after adding allow/deny
  • Confusing port numbers with service names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes