QuestionQ33

VerifiedSystem Maintenance

On 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?

Explanation

net.ipv4.ip_forward is the sysctl parameter that controls IPv4 forwarding; setting it to 1 enables forwarding between interfaces. Persisting that assignment in the system sysctl configuration causes it to be applied at boot. Modern systems commonly use /etc/sysctl.d/*.conf for this purpose; /etc/sysctl.conf is the traditional equivalent configuration location.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!