nerdexam
CompTIA

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.

System Management

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)
  • A
    3% (1)
  • B
    91% (30)
  • D
    6% (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

#Linux Networking#Kernel Parameters#System Configuration#sysctl

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice