Exam4Training

Which of the following commands is the correct way to accomplish this task?

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 . systemct1 start ipv4_forwarding

Answer: B

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. The other options are incorrect because they either use the wrong file (/proc/sys/net/ipv4/ipv_forward), the wrong command (firewall-cmd or systemct1), or the wrong option (–enable or start).

Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 12: Managing Network Connections, page 378.

Latest XK0-005 Dumps Valid Version with 136 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version