الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

الفصل 9الاسم في الدورة: Host and cluster security

Harden and watch hosts and clusters

Pipelines protect what you ship; these 8 tools protect where it runs: they check servers and clusters against benchmarks, watch for attacks at runtime, record who did what, and test the network from the outside.

  • 9 الدروس
  • 15 الأوامر

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

$ مستخدم عادي# بصلاحية root (أو مع sudo)

المهارات في هذا الفصل

  • أمان الخوادم والعناقيد — 8

9.1

Falco — runtime threat detection

falco watches system calls with eBPF and alerts on suspicious behavior: a shell in a container, reading /etc/shadow, writes below /etc, unexpected network connections. Part of the CKS exam.

helm install falco falcosecurity/falco -n falco --create-namespace --set driver.kind=modern_ebpf
kubectl -n falco logs -l app.kubernetes.io/name=falco -f
falco -V /etc/falco/rules.d/shop.yaml

9.2

kube-bench — CIS benchmark for Kubernetes

kube-bench checks API server flags, kubelet settings, etcd and file permissions against the CIS Kubernetes Benchmark, with fix texts.

kubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml
kube-bench run --targets master,node | grep "^\[FAIL\]"

9.3

Nmap — what is open?

nmap finds hosts, open ports, services and TLS settings — to check that only expected ports are reachable.

sudo nmap -sS -sV --open 192.168.122.11
nmap --script ssl-enum-ciphers -p 443 shop.example.com
ndiff before.xml after.xml

انتبه

Scan only systems you own or have written permission to test.

الأوامر في هذا الدرس

9.4

Fail2ban — block brute force

fail2ban-client manages jails that read logs and ban IPs with too many failed logins (SSH, web logins, mail).

fail2ban-client status sshd
fail2ban-client set sshd unbanip 203.0.113.25

9.5

Lynis — quick hardening audit

lynis runs hundreds of local checks and gives a hardening index and concrete suggestions.

lynis audit system --quick
grep hardening_index /var/log/lynis-report.dat

الأوامر في هذا الدرس

9.6

OpenSCAP — compliance profiles

oscap checks RHEL hosts and images against CIS, STIG or PCI-DSS profiles and generates Bash or Ansible fixes — evidence for auditors.

oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis_server_l1 --report report.html /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
oscap xccdf generate fix --fix-type ansible --profile xccdf_org.ssgproject.content_profile_cis_server_l1 --output cis-fix.yml /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml

الأوامر في هذا الدرس

9.7

AIDE — file integrity monitoring

aide keeps a baseline of file hashes and permissions and reports every added, removed or changed file.

aide --init && mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
aide --check

الأوامر في هذا الدرس

9.8

auditd — who did what

auditctl adds kernel audit rules (watch /etc/passwd, /etc/sudoers, log user commands); ausearch and aureport read them.

auditctl -w /etc/sudoers -p wa -k sudoers
augenrules --load
ausearch -k sudoers -i --start today

9.9

Combine them in layers

No single tool is enough. Use layers:

LayerPreventDetectProve
HostAnsible/OpenSCAP hardening, fail2ban-clientaide, auditctl, falcooscap reports, lynis index
ClusterPod Security, NetworkPolicies, RBACfalco, audit logskube-bench reports
NetworkFirewalls, VPN (wg)nmap + ndiff weeklyscan history

تذكّر

Send all of it to the central logging stack (Loki/Elastic/Sentinel); an attacker with root deletes local logs first.

كل الأوامر في هذا الفصل