LFCS: Networking (25%)
This section covers systemLinux administrationnetworking, taskshostname relatedresolution, totime configuringsynchronization, theOpenSSH, kernel,packet managingfiltering, processes,routing, jobs, software, hardware recovery,bridges, and containers.load balancing.
1. Configure KernelIPv4/IPv6 ParametersNetworking & Hostname Resolution
Learn
TemporaryAssign IP addresses (runtime)staticvs&persistent kernel parameters.dynamic).Tools:Configure hostnames and DNS resolution.
sysctl/etc/hosts, /etc/resolv.conf, and /etc/sysctl.confhostnamectl.
Commands
# ShowView allnetwork parametersinterfaces
sysctlip -aaddr show
ip link show
# Configure static IP (example)
sudo nmcli con mod eth0 ipv4.addresses 192.168.1.100/24
sudo nmcli con mod eth0 ipv4.gateway 192.168.1.1
sudo nmcli con mod eth0 ipv4.dns 8.8.8.8
sudo nmcli con mod eth0 ipv4.method manual
sudo nmcli con up eth0
# Set ahostname
runtimehostnamectl parameterset-hostname sudomyhost
sysctlhostnamectl net.ipv4.ip_forward=1status
# PersistDNS parametercheck
across reboots
echo "net.ipv4.ip_forward = 1" | sudo tee -acat /etc/sysctl.resolv.conf
sudoping sysctl -pgoogle.com
Exercises
EnableAssign a static IPforwardingtotemporarilyan interface andcheckverifystatus.connectivity.MakeChangeIPtheforwardinghostnamepermanent.and update/etc/hostsaccordingly.
2. ManageTime Processes and ServicesSynchronization
Learn
Identify, monitor, and troubleshoot processes.
Commands
# Process management
ps aux | grep <name>
top
htop # if installed
kill <PID>
kill -9 <PID>
# Systemd service management
systemctl status <service>
systemctl start <service>
systemctl stop <service>
systemctl enable <service>
systemctl disable <service>
systemctl restart <service>
systemctl reload <service>
Exercises
3. Manage Scheduled Jobs
Learn
crontab/etc/cron*Commands
# List user cron jobs
crontab -l
# Edit user cron jobs
crontab -e
# At job example
echo "touch /tmp/testfile" | at now + 1 minute
atq # list scheduled at jobs
atrm <job_number>
Exercises
atchrony4. Software Management
Learn
Commands
# Debian/Ubuntu
sudo apt update
sudo apt install <package>
dpkg -l | grep <package>
# RHEL/CentOS
sudo yum install <package>
rpm -qa | grep <package>
Exercises
curl5. Recover from Hardware, OS, or Filesystem Failures
Learn
fsckCommands
sudo fsck /dev/sdX1
sudo mount /dev/sdX1 /mnt
Exercises
6. Virtual Machines (libvirt)
Learn
virshCommands
virsh list --all
virsh start <vm>
virsh shutdown <vm>
virsh destroy <vm> # force shutdown
virsh console <vm>
Exercises
virt-installntpd.
7. Containers (Docker / Podman)
Learn
Commands
# Run container
docker run -it --name mycontainer ubuntu bash
# List running containers
docker ps
# Stop and remove container
docker stop mycontainer
docker rm mycontainer
# List images
docker images
Exercises
curl8. SELinux (Mandatory Access Control)
Learn
Commands
# Check current modetime
sestatustimedatectl
# ChangeSet modetime temporarilyzone
timedatectl set-timezone Europe/Paris
# Sync time using chrony
sudo setenforcesystemctl 0start #chronyd
permissivechronyc sudotracking
setenforcechronyc 1 # enforcing
# Check SELinux logs
ausearch -m avcsources
Exercises
SwitchConfigureSELinuxNTPtosynchronizationpermissivewithmodeaandpublicverify.server.TriggerVerifyantimeSELinuxsyncdenial (e.g., wrong file context) and check logs.status.
Exam3. TipsMonitor & Troubleshoot Networking
Learn
PracticeUseall commands without root shortcuts(sudo)tools tosimulatecheckexamconnectivityconditions.and troubleshoot issues.
Commands
ping <host>
traceroute <host>
ss -tulnp # check listening ports
netstat -rn # routing table
curl -I http://example.com
Exercises
4. OpenSSH Configuration
Learn
Commands
# Start and enable SSH server
sudo systemctl start sshd
sudo systemctl enable sshd
# Connect to remote server
ssh user@remote_host
# Generate keys
ssh-keygen -t rsa -b 4096
ssh-copy-id user@remote_host
Exercises
5. Packet Filtering, Port Redirection, NAT
Learn
iptables or firewalld.
Commands
# Check firewall status
sudo firewall-cmd --state
# Allow port 22
sudo firewall-cmd --add-port=22/tcp --permanent
sudo firewall-cmd --reload
# Example NAT rule
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Exercises
6. Static Routing
Learn
Commands
# Add a static route
sudo ip route add 192.168.2.0/24 via 192.168.1.1 dev eth0
# Show routes
ip route show
Exercises
7. Bridge & Bonding Devices
Learn
Commands
# Create bridge
sudo nmcli con add type bridge con-name br0 ifname br0
sudo nmcli con add type bridge-slave con-name eth0-br0 ifname eth0 master br0
# Bonding example
sudo nmcli con add type bond con-name bond0 ifname bond0 mode active-backup
sudo nmcli con add type bond-slave con-name eth1-bond0 ifname eth1 master bond0
Exercises
8. Reverse Proxies & Load Balancers
Learn
Commands
# Nginx reverse proxy example
sudo nano /etc/nginx/conf.d/reverse.conf
# server { listen 80; location / { proxy_pass http://backend:8080; } }
sudo systemctl reload nginx