Exam EX200 All QuestionsBrowse all questions from this exam
Question 42

SIMULATION -

Please open the ip_forward, and take effect permanently.

    Correct Answer:

    To make IP forwarding effective permanently, you need to edit the sysctl configuration file and then reload the configuration. The following steps ensures that the change survives a reboot: 1. Open the sysctl configuration file with a text editor, for example, by using the command 'vi /etc/sysctl.conf'. 2. Add the line 'net.ipv4.ip_forward = 1' to the file. 3. Save and close the file. 4. Apply the changes immediately by running the command 'sysctl -p'. We do this to ensure the change is effective right away and will also be applied on reboot.

Discussion
cytron

There is no option -P in RHEL8. You need to use the -w option followed by the argument sysctl -w net.ipv4.ip_forward=1 NOTE: No space before or after "=" sign.

kitkat

Would this survive reboot? Remember exam needs all changes that survives reboot.

Testo321

No, This will echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf sysctl -p

gaven186

you can view the system default line by "sysctl -a | grep ip_forward". "net.ipv4.ip_forward = 0" by system already has 'space' before/after '='. hence it is fine to have 'space'.

sugisho

[root@station ~]# sysctl -a | grep net.ipv4.ip_forward net.ipv4.ip_forward = 0 net.ipv4.ip_forward_update_priority = 1 net.ipv4.ip_forward_use_pmtu = 0 [root@station ~]# sysctl -w net.ipv4.ip_forward=1 net.ipv4.ip_forward = 1 [root@station ~]# sysctl -a | grep net.ipv4.ip_forward net.ipv4.ip_forward = 1 net.ipv4.ip_forward_update_priority = 1 net.ipv4.ip_forward_use_pmtu = 0 [root@station ~]#

gaven186

sysctl -w command cannot survive a reboot. hence others are suggesting to write a line into sysctl.conf. and followed by sysctl -p

kenkct

echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf sysctl -p

ionix

# grep ip_forward /etc/sysctl.d/* /etc/sysctl.d/60-gce-network-security.conf:net.ipv4.ip_forward=0 # vi /etc/sysctl.d/60-gce-network-security.conf net.ipv4.ip_forward=0 # sysctl -w net.ipv4.ip_forward=1

AbidBajwa

vi /etc/sysctl.conf net.ipv4.ip_forward = 1

tinythings

echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/ipforward.conf systemctl reboot

ANI_04

echo " net.ipv4.ip_forward = 1" >> /etc/sysctl.conf