exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 16 discussion

Actual exam question from CompTIA's XK0-005
Question #: 16
Topic #: 1
[All XK0-005 Questions]

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?

  • A. echo 1 > /proc/sys/net/ipv4/ipv_forward
  • B. sysctl -w net.ipv4.ip_forward=1
  • C. firewall-cmd --enable ipv4_forwarding
  • D. systemctl start ipv4_forwarding
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linux_admin
Highly Voted 8 months, 4 weeks ago
B. sysctl -w net.ipv4.ip_forward=1 The sysctl command is used to configure the Linux kernel parameters at runtime. To enable IPv4 packet forwarding, the administrator needs to set the value of the net.ipv4.ip_forward parameter to 1. This can be done with the following command: sysctl -w net.ipv4.ip_forward=1 This command sets the value of net.ipv4.ip_forward to 1, enabling IPv4 packet forwarding. The -w option specifies that the change should be written to the running system and not just displayed.
upvoted 8 times
linux_admin
8 months, 4 weeks ago
Note that this change will only persist until the next reboot. To make the change persistent across reboots, the administrator needs to add the following line to the /etc/sysctl.conf file: net.ipv4.ip_forward=1 After adding this line, the administrator can run the sysctl -p command to reload the /etc/sysctl.conf file and apply the changes.
upvoted 5 times
...
...
lizb7223
Most Recent 9 months, 1 week ago
B https://linuxconfig.org/how-to-turn-on-off-ip-forwarding-in-linux
upvoted 1 times
...
Hava_2013
12 months ago
https://linuxconfig.org/how-to-turn-on-off-ip-forwarding-in-linux
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago