Security
A technician is turning a Linux server with two network interfaces into a router between two subnets. Hosts on both subnets can reach the server, but packets sent through it to the other subnet are dropped. The command 'sysctl net.ipv4.ip_forward' returns 0. Which action will enable forwarding immediately and keep it enabled after a reboot?
Show the answer
Correct answerD. Run 'sysctl -w net.ipv4.ip_forward=1' and add 'net.ipv4.ip_forward = 1' to a file in /etc/sysctl.d/
Setting the value with sysctl -w changes the running kernel, and the entry in /etc/sysctl.d/ makes it persist at boot. Writing to /proc takes effect at once but is lost on reboot. Changing the iptables FORWARD policy does not turn on kernel forwarding.