nerdexam
LPI

117-202 · Question #248

On a Linux router, packet forwarding for IPv4 has been enabled. After a reboot, the machine no longer forwards IP packets from other hosts. The commanD. echo 1 > /proc/sys/net/ipv4/ip_forward…

The correct answer is C. In /etc/sysctl.conf change net.ipv4.ip_forward to 1. See the full explanation below for the reasoning.

Question

On a Linux router, packet forwarding for IPv4 has been enabled. After a reboot, the machine no longer forwards IP packets from other hosts. The commanD. echo 1 > /proc/sys/net/ipv4/ip_forward temporarily resolves this issue. Which one of the following options is the best way to ensure this setting is saved across system restarts?

Options

  • AAdd echo 1 > /proc/sys/net/ipv4/ip_forward to the root user login script.
  • BAdd echo 1 > /proc/sys/net/ipv4/ip_forward to any user login script.
  • CIn /etc/sysctl.conf change net.ipv4.ip_forward to 1.
  • DIn /etc/rc.local add net.ipv4.ip_forward = 1.
  • EIn /etc/sysconfig/iptables-config add ipv4.ip_foward = 1.

How the community answered

(24 responses)
  • A
    8% (2)
  • C
    83% (20)
  • D
    4% (1)
  • E
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 117-202 Practice