exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 43 discussion

Actual exam question from RedHat's EX200
Question #: 43
Topic #: 1
[All EX200 Questions]

SIMULATION -
Please open the ip_forward, and take effect permanently.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
vim /etc/sysctl.conf net.ipv4.ip_forward = 1
sysctl ג€"w (takes effect immediately)
If no ג€sysctl.confג€ option, use these commands:
sysctl ג€"a |grep net.ipv4
sysctl ג€"P net.ipv4.ip_forward = 1
sysctl -w

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
cytron
Highly Voted 4 years ago
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.
upvoted 9 times
gaven186
5 months ago
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'.
upvoted 1 times
...
kitkat
2 years, 5 months ago
Would this survive reboot? Remember exam needs all changes that survives reboot.
upvoted 2 times
Testo321
1 year ago
No, This will echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf sysctl -p
upvoted 3 times
...
...
...
sugisho
Highly Voted 3 years, 3 months ago
[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 ~]#
upvoted 8 times
gaven186
5 months ago
sysctl -w command cannot survive a reboot. hence others are suggesting to write a line into sysctl.conf. and followed by sysctl -p
upvoted 2 times
...
...
tinythings
Most Recent 1 year, 8 months ago
echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/ipforward.conf systemctl reboot
upvoted 2 times
...
kenkct
2 years, 9 months ago
echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf sysctl -p
upvoted 5 times
...
ANI_04
3 years, 1 month ago
echo " net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
upvoted 2 times
...
AbidBajwa
3 years, 1 month ago
vi /etc/sysctl.conf net.ipv4.ip_forward = 1
upvoted 3 times
...
ionix
3 years, 8 months ago
# 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
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 ...