Bird
0
0

What will be the result of running sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT followed by sudo iptables -L?

medium📝 Command Output Q5 of 15
Linux CLI - System Administration
What will be the result of running sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT followed by sudo iptables -L?
AThe rule will delete existing rules on port 443
BA rule allowing TCP traffic on port 443 will be added to the INPUT chain
CAn error will occur because <code>-A</code> is invalid
DA rule blocking TCP traffic on port 443 will be added to the OUTPUT chain
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the iptables command

    -A INPUT appends a rule to the INPUT chain; -p tcp --dport 443 matches TCP traffic on port 443; -j ACCEPT accepts matching packets.
  2. Step 2: Check expected output of iptables -L

    The new rule will appear in the INPUT chain allowing TCP port 443 traffic.
  3. Final Answer:

    A rule allowing TCP traffic on port 443 will be added to the INPUT chain -> Option B
  4. Quick Check:

    iptables -A INPUT adds accept rule for TCP port 443 [OK]
Quick Trick: Append rules with -A to INPUT chain for incoming traffic [OK]
Common Mistakes:
  • Confusing INPUT and OUTPUT chains
  • Thinking -A deletes rules

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes