XK0-005 · Question #502
A systems administrator needs to reconfigure a Linux server to allow persistent IPv4 packet forwarding. Which of the following commands is the correct way to accomplish this task?
The correct answer is B. sysctl -w net.ipv4.ip_forward=1. The command sysctl -w net.ipv4.ip_forward=1 enables IPv4 packet forwarding temporarily by setting the kernel parameter net.ipv4.ip_forward to 1. To make this change persistent, the administrator needs to edit the file /etc/sysctl.conf and add the line net.ipv4.ip_forward = 1.
Question
A systems administrator needs to reconfigure a Linux server to allow persistent IPv4 packet forwarding. Which of the following commands is the correct way to accomplish this task?
Options
- Aecho 1 > /proc/sys/net/ipv4/ipv_forward
- Bsysctl -w net.ipv4.ip_forward=1
- Cfirewall-cmd --enable ipv4_forwarding
- Dsystemctl start ipv4_forwarding
How the community answered
(33 responses)- A3% (1)
- B91% (30)
- D6% (2)
Explanation
The command sysctl -w net.ipv4.ip_forward=1 enables IPv4 packet forwarding temporarily by setting the kernel parameter net.ipv4.ip_forward to 1. To make this change persistent, the administrator needs to edit the file /etc/sysctl.conf and add the line net.ipv4.ip_forward = 1.
Topics
Community Discussion
No community discussion yet for this question.