QuestionQ112

System Administration Fundamentals

The net.ipv4.ip_forward kernel parameter must be enabled and persist through reboots. Which commands should be used to accomplish this?

  • A cat /proc/sys/net/ipv4/ip_forwardsysctl -w net.ipv4.ip_forward=1
  • B sysctl -w net.ipv4.ip_forward=1reboot
  • C echo "net.ipv4.ip_forward=1" >> /etc/sysctl.confsysctl --system
  • D sysctl net.ipv4.ip_forwardsysctl -w net.ipv4.ip_forward=l
Explanation

Setting net.ipv4.ip_forward to 1 enables IPv4 forwarding. A sysctl configuration assignment stored in /etc/sysctl.conf persists across reboots, and sysctl --system applies the configured values immediately. Kernel documentation defines ip_forward value 1 as enabled; systemd’s sysctl configuration is applied at boot.

Learn more

Community Discussion

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