Which of the following command is used to enable logging in iptables?
A.
$ iptables -B INPUT -j LOG
B.
$ iptables -A OUTPUT -j LOG
C.
$ iptables -A INPUT -j LOG
D.
$ iptables -B OUTPUT -j LOG
The Answer Is:
C
This question includes an explanation.
Explanation:
The command to enable logging in iptables for incoming packets is $ iptables -A INPUT -j LOG. This command appends a rule to the INPUT chain that logs the packet information. The -A flag is used to append the rule to the end of the specified chain, which in this case is INPUT, indicating that the rule applies to incoming packets. The -j LOG part of the command specifies the target of the rule, which is LOG, meaning that the packet will be logged.
References:
EC-Council’s Certified SOC Analyst (CSA) training materials and certification guidelines1
InfraExam 2024, Certified SOC Analyst Part 01, which includes details on iptables commands2
312-39 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"