nerdexam
EC-Council

312-39 · Question #105

Which of the following command is used to enable logging in iptables?

The correct answer is C. $ iptables -A INPUT -j LOG. 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…

SOC Fundamentals and Operations

Question

Which of the following command is used to enable logging in iptables?

Exhibit

312-39 question #105 exhibit

Options

  • A$ iptables -B INPUT -j LOG
  • B$ iptables -A OUTPUT -j LOG
  • C$ iptables -A INPUT -j LOG
  • D$ iptables -B OUTPUT -j LOG

How the community answered

(58 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    93% (54)
  • D
    3% (2)

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. 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

Topics

#iptables logging#Linux firewall#log enablement#command syntax

Community Discussion

No community discussion yet for this question.

Full 312-39 Practice