QuestionQ33
System MaintenanceOn a Linux router, IPv4 packet forwarding has been enabled. After rebooting, the system no longer forwards IP packets originating from other hosts. The command echo 1 > /proc/sys/net/ipv4/ip_forward temporarily fixes the problem.
Which of the following is the best way to ensure this setting persists across system restarts?
- A Add echo 1 > /proc/sys/net/ipv4/ip_forward to the root user login script
- B Add echo 1 > /proc/sys/net/ipv4/ip_forward to any user login script
- C In /etc/sysct1.conf change net.ipv4.ip_forward to 1
- D In /etc/rc.local add net.ipv4.ip_forward = 1
- E In /etc/sysconfig/iptables-config add ipv4.ip_forward = 1
Community Discussion