202-450 practice question 14 of 25
On a Linux router, packet forwarding for IPv4 has been enabled. After a reboot, the machine no longer forwards IP packets from other hosts. The command: echo 1 > /proc/sys/net/ipv4/ip_forward temporarily resolves this issue. Which one of the following options is the best way to ensure this setting is saved across system restarts?
Full set: 119 questionsThe /proc/sys/ filesystem provides a temporary way to modify kernel parameters. To make these changes persistent across reboots, the standard method is to use the sysctl interface. The configuration file /etc/sysctl.conf (or files in /etc/sysctl.d/) is read at boot time to apply these settings. The parameter net.ipv4.ipforward in this file corresponds directly to the /proc/sys/net/ipv4/ipforward kernel parameter. Setting its value to 1 ensures that IPv4 forwarding is enabled automatically after every system restart.
A. A root login script only runs when the root user logs in, not necessarily at boot, making it an unreliable method for a system service.
B. A regular user's login script is inappropriate for a system-wide setting and lacks the necessary privileges to modify kernel parameters.
D. The syntax net.ipv4.ipforward = 1 is for sysctl.conf, not a shell command for /etc/rc.local, which is also a legacy method.
E. The file /etc/sysconfig/iptables-config is specific to RHEL-based systems for configuring the iptables service, not for general kernel parameters.
- sysctl.conf(5) man page. Section "DESCRIPTION" states: "/etc/sysctl.conf is a simple file containing sysctl values to be read in and set by sysctl at boot time."
- Red Hat Enterprise Linux 7 Documentation, "Networking Guide", Chapter 3. Kernel Tuning, Section 3.2. "Persistent Module Loading". It specifies using /etc/sysctl.conf or files in /etc/sysctl.d/ for persistent changes.
- Debian Wiki, "KernelModuleBlacklisting". The page also discusses kernel parameter tuning, stating: "To make the change permanent, you need to add the line... to /etc/sysctl.conf".
Keep practicing
Take the free 202-450 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 202-450 practice questions
- Question 1Which command is used to administer IPv6 netfilter rules?
- Question 2Which of the following PAM modules sets and unsets environment variables?
- Question 4Which of the following PAM modules allows the system administrator to use an arbitrary fi…
- Question 5Which configuration parameter on a Postfix server modifies only the sender address and no…
- Question 6Which of the following commands can be used to connect and interact with remote TCP netwo…
- Question 8Which netfilter table contains built-in chains called INPUT, OUTPUT and FORWARD?
