Your System is going to use as a Router for two networks. One Network is 192.168.0.0/24 and Another Network is 192.168.1.0/24. Both network's IP address has assigned. How will you forward the packets from one network to another network?
Solution:
echo "1" >/proc/sys/net/ipv4/ip_forward
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
If you want to use the Linux System as a Router to make communication between different networks, you need enable the IP forwarding. To enable on running session just set value 1 to
/proc/sys/net/ipv4/ip_forward. As well as automatically turn on the IP forwarding features on next boot set on /etc/sysctl.conf file.
Does this meet the goal?
Correct Answer:
A
Configure /var/tmp/fstab Permission.
Copy the file /etc/fstab to /var/tmp/fstab. Configure var/tmp/fstab permissions as the following: Owner of the file /var/tmp/fstab is Root, belongs to group root
File /var/tmp/fstab cannot be executed by any user
User natasha can read and write /var/tmp/fstab
User harry cannot read and write /var/tmp/fstab
All other users (present and future) can read var/tmp/fstab.
Solution:
cp /etc/fstab /var/tmp/
/var/tmp/fstab view the owner setfacl -m u:natasha:rw- /var/tmp/fstab setfacl -m u:haryy:--/var/tmp/fstab
Use getfacl /var/tmp/fstab to view permissions
Does this meet the goal?
Correct Answer:
A
Part 2 (on Node2 Server)
Task 1 [Controlling the Boot Process]
Interrupt the boot process and reset the root password. Change it to kexdrams to gain access to the system
Solution:
*
* 1. Reboot the server pressing by Ctrl+Alt+Del
* 2. When the boot-loader menu appears, press the cursor keys to highlight the default boot-loader entry
* 3. Press e to edit the current entry.
* 4. Use the cursor keys to navigate to the line that starts with linux.
* 5. Press End to move the cursor to the end of the line.
* 6. Append rd.break to the end of the line.
* 7. Press Ctrl+x to boot using the modified configuration.
* 8. At the switch_root prompt
*
switch_root:/# mount -o remount,rw /sysroot
switch_root:/# chroot /sysroot
sh-4.4# echo kexdrams | passwd --stdin root
Changing password for user root.
passwd: all authentication tokens updated successfully.
sh-4.4# touch /.autorelabel
sh-4.4# exit; exit
*
Type exit twice to continue booting your system as usual.
Does this meet the goal?
Correct Answer:
A
Configure NTP.
Configure NTP service, Synchronize the server time, NTP server: classroom.example.com
Solution:
Configure the client:
Yum -y install chrony
Vim /etc/chrony.conf
Add: server classroom.example.com iburst
Start: systemctl enable chronyd
systemctl restart chronyd
Validate: timedatectl status
Does this meet the goal?
Correct Answer:
A
Search files.
Find out files owned by jack, and copy them to directory /root/findresults
Solution:
mkdir/root/findfiles
find / -user jack -exec cp -a {} /root/findfiles/ ; ls /root/findresults
Does this meet the goal?
Correct Answer:
A