Back openDesk Edu for a sovereign, open-source education — every vote counts.
Vote nowSave products you love by clicking the heart icon.
Complete guide to the LPI DevOps Tools Engineer certification (701-100): exam objectives, study resources, and how it relates to traditional LPI certifications.
Test your LPIC-2 knowledge with free practice questions covering the 201-450 and 202-450 exam objectives. Detailed answers and explanations included.
Die Prüfung LPIC-2 202-450 ist die zweite von zwei Prüfungen, die für die LPIC-2-Zertifizierung erforderlich sind. Sie umfasst DNS und Webdienste, Dateifreigaben mit NFS und Samba, E-Mail- und Verzeichnisdienste, Systemsicherheit sowie operatives Troubleshooting.
Dieser Leitfaden behandelt jedes Ziel mit den Befehlen, Konfigurationsdateien und Konzepten, die in der Prüfung abgefragt werden.
BIND-Konfigurationsdateien:
| Datei | Zweck |
|---|---|
/etc/bind/named.conf | Hauptkonfiguration (Debian) |
/etc/named.conf | Hauptkonfiguration (RHEL) |
/var/named/ | Zonendaten-Dateien |
/etc/bind/db.root | Root Hints |
/etc/bind/rndc.key | RNDC-Authentifizierungsschlüssel |
named.conf-Struktur:
options {
directory "/var/named";
listen-on port 53 { any; };
allow-query { localhost; 192.168.1.0/24; };
recursion yes;
forwarders { 8.8.8.8; 8.8.4.4; };
};
zone "example.com" IN {
type master;
file "db.example.com";
allow-transfer { 192.168.1.2; }; # Slave DNS
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "db.192.168.1";
};
zone "." IN {
type hint;
file "db.root";
};
Forward-Zonendatei (db.example.com):
$TTL 86400
@ IN SOA ns1.example.com. admin.example.com. (
2026071301 ; Serial
3600 ; Refresh
1800 ; Retry
604800 ; Expire
86400 ; Minimum TTL
)
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
@ IN MX 10 mail.example.com.
@ IN A 192.168.1.10
ns1 IN A 192.168.1.10
ns2 IN A 192.168.1.11
mail IN A 192.168.1.20
www IN CNAME example.com.
ftp IN CNAME example.com.
Reverse-Zonendatei (db.192.168.1):
$TTL 86400
@ IN SOA ns1.example.com. admin.example.com. (
2026071301 ; Serial
3600 ; Refresh
1800 ; Retry
604800 ; Expire
86400 ; Minimum TTL
)
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
10 IN PTR ns1.example.com.
10 IN PTR example.com.
11 IN PTR ns2.example.com.
20 IN PTR mail.example.com.
BIND-Management:
named-checkconf /etc/named.conf
named-checkzone example.com /var/named/db.example.com
# Control BIND
rndc status
rndc reload
rndc flush
rndc stop
rndc querylog
systemctl restart named
# DNSSEC
dnssec-keygen -a NSEC3RSASHA1 -b 2048 -n ZONE example.com
dnssec-signzone -o example.com db.example.com
# Logging
channel default_log {
file "/var/log/named.log" versions 3 size 5m;
severity info;
print-time yes;
};
# /etc/resolv.conf
search example.com
nameserver 192.168.1.10
nameserver 8.8.8.8
options timeout:2 attempts:3 rotate
# DNS-Tests
dig example.com
dig @192.168.1.10 example.com
dig -x 192.168.1.10 # Reverse Lookup
dig example.com MX # Mail Exchange Record
dig example.com NS # Name Server Records
dig example.com ANY # Alle Records (veraltet)
host example.com
host -t MX example.com
host -l example.com # Zone Transfer
nslookup
> server 192.168.1.10
> set type=MX
> example.com
# Zone Transfer Test
dig @192.168.1.10 example.com AXFR
# Resolver prüfen
getent hosts example.com
getent services http
cat /etc/nsswitch.conf
cat /etc/dhcp/dhcpd.conf
# DHCP-Konfiguration
option domain-name "example.com";
option domain-name-servers 192.168.1.10, 8.8.8.8;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
option broadcast-address 192.168.1.255;
}
host webserver {
hardware ethernet 00:11:22:33:44:55;
fixed-address 192.168.1.10;
}
# DHCPv6
subnet6 2001:db8::/64 {
range6 2001:db8::100 2001:db8::200;
option dhcp6.name-servers 2001:db8::1;
}
# DHCP-Management
dhcpd -t # Konfiguration testen
dhcpd -d -f # Debug-Modus (Vordergrund)
cat /var/lib/dhcp/dhcpd.leases # Lease-Datenbank
dhcp-lease-list # Aktive Leases anzeigen
systemctl restart isc-dhcp-server
# dhclient
dhclient eth0
dhclient -r eth0 # Release
dhclient -v eth0 # Verbose
# NetworkManager
nmcli connection down eth0
nmcli connection up eth0
# /etc/network/interfaces (Debian)
# auto eth0
# iface eth0 inet dhcp
# systemd-networkd
cat /etc/systemd/network/20-wired.network
# [Match]
# Name=eth0
# [Network]
# DHCP=yes
# Lease-Dateien
cat /var/lib/dhcp/dhclient.leases
cat /var/lib/dhcp/dhclient.eth0.leases
# DHCP-Fehlersuche
dhclient -v eth0 # Aushandlung einsehen
tcpdump -i eth0 port 67 or port 68 # DHCP-Traffic überwachen
Apache configuration files:
| File | Purpose |
|---|---|
/etc/apache2/apache2.conf | Main config (Debian) |
/etc/httpd/conf/httpd.conf | Main config (RHEL) |
/etc/apache2/sites-available/ | Virtual hosts (Debian) |
/etc/apache2/sites-enabled/ | Enabled vhosts (Debian) |
/etc/httpd/conf.d/ | Additional config (RHEL) |
/var/log/apache2/access.log | Access log |
/var/log/apache2/error.log | Error log |
Virtual host configuration:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example
ErrorLog ${APACHE_LOG_DIR}/example-error.log
CustomLog ${APACHE_LOG_DIR}/example-access.log combined
<Directory /var/www/example>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
DocumentRoot /var/www/example
SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.crt
SSLCertificateKeyFile /etc/ssl/private/example.key
<Directory /var/www/example>
Options -Indexes
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Apache management:
# Debian
a2ensite example.com
a2dissite example.com
a2enmod rewrite
a2enmod ssl
a2dismod autoindex
# RHEL
systemctl enable httpd
systemctl restart httpd
# Konfigurationstest
apachectl configtest
apachectl -S # Virtual Hosts anzeigen
apachectl -M # Geladene Module anzeigen
# Log-Analyse
tail -f /var/log/apache2/access.log
awk '{print $1}' access.log | sort | uniq -c | sort -nr | head -10 # Top-IPs
# SSL aktivieren
a2enmod ssl (Debian)
LoadModule ssl_module modules/mod_ssl.so (RHEL)
# Selbstsigniertes Zertifikat generieren
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout /etc/ssl/private/server.key \
-out /etc/ssl/certs/server.crt
# Let's Encrypt (certbot)
certbot --apache -d example.com -d www.example.com
certbot renew --dry-run
# SSL-Konfigurationsdirektiven
SSLCipherSuite HIGH:!aNULL:!MD5
SSLProtocol all -TLSv1 -TLSv1.1
SSLSessionTickets Off
Header always set Strict-Transport-Security "max-age=63072000"
# Squid-Konfiguration
cat /etc/squid/squid.conf
# Zugriffskontrolle
acl localnet src 192.168.1.0/24
acl localhost src 127.0.0.1
acl SSL_ports port 443
acl Safe_ports port 80 21 443 563 70 210 280 488 591 777
http_access allow localnet
http_access deny all
# Cache
cache_dir ufs /var/spool/squid 100 16 256
cache_mem 256 MB
maximum_object_size 4 MB
# Authentifizierung
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid Proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
# Transparenter Proxy
http_port 3128 transparent
# Management
squid -z # Cache-Verzeichnisse initialisieren
squid -k parse # Konfiguration testen
squid -k reconfigure # Neu laden
squid -k shutdown
systemctl restart squid
# Logs
cat /var/log/squid/access.log
cat /var/log/squid/cache.log
# Nginx configuration structure
cat /etc/nginx/nginx.conf
# Virtual host
server {
listen 80;
server_name example.com www.example.com;
root /var/www/example;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
location /images/ {
root /var/www;
expires 30d;
}
location /api/ {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# SSL
listen 443 ssl;
ssl_certificate /etc/ssl/certs/example.crt;
ssl_certificate_key /etc/ssl/private/example.key;
ssl_protocols TLSv1.2 TLSv1.3;
}
# Management
nginx -t # Test config
nginx -s reload
nginx -s stop
systemctl restart nginx
# Logs
tail -f /var/log/nginx/access.log
tail -f /var/log/nginx/error.log
# Apache reverse proxy
a2enmod proxy proxy_http proxy_balancer lbmethod_byrequests
<VirtualHost *:80>
ServerName app.example.com
ProxyPass /app1 http://backend1:8080/
ProxyPassReverse /app1 http://backend1:8080/
ProxyPass /app2 http://backend2:8080/
ProxyPassReverse /app2 http://backend2:8080/
<Proxy balancer://mycluster>
BalancerMember http://app1:8080
BalancerMember http://app2:8080
ProxySet lbmethod=bytraffic
</Proxy>
ProxyPass / balancer://mycluster/
</VirtualHost>
# Nginx reverse proxy
location / {
proxy_pass http://backend_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Nginx load balancing
upstream backend {
server backend1.example.com weight=3;
server backend2.example.com;
server backend3.example.com backup;
}
server {
location / {
proxy_pass http://backend;
}
}
Samba-Konfiguration (/etc/samba/smb.conf):
[global]
workgroup = WORKGROUP
server string = %h Samba Server
netbios name = fileserver
security = user
map to guest = bad user
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
[shared]
path = /srv/samba/shared
browseable = yes
read only = no
guest ok = no
valid users = @staff
create mask = 0644
directory mask = 0755
[public]
path = /srv/samba/public
browseable = yes
read only = yes
guest ok = yes
[homes] browseable = no read only = no valid users = %S
**Samba management:**
```bash
# Test-Konfiguration
testparm
# Samba-Benutzer hinzufügen
smbpasswd -a alice
pdbedit -a -u alice
pdbedit -L # Benutzer auflisten
# Samba-Share mounten
mount -t cifs //server/share /mnt/smb -o username=alice
mount -t cifs //server/share /mnt/smb -o credentials=/etc/smb.txt
# /etc/fstab
//server/share /mnt/smb cifs credentials=/etc/smb.txt,uid=1000,gid=1000 0 0
# Management
smbstatus # Aktive Verbindungen
smbcontrol smbd reload-config
systemctl restart smbd
systemctl restart nmbd # NetBIOS-Namensauflösung
# Logs
tail -f /var/log/samba/log.smbd
NFS server configuration:
# /etc/exports
/nfs/shared 192.168.1.0/24(rw,sync,no_subtree_check)
/nfs/backups 192.168.1.10(rw,sync,no_root_squash)
/nfs/public *(ro,sync,no_subtree_check)
# Export-Optionen
# rw — read-write (Lesen/Schreiben)
# ro — read-only (Nur-Lesen)
# sync — Änderungen synchron schreiben
# async — asynchron schreiben (schneller, weniger sicher)
# no_subtree_check — Subtree-Prüfung deaktivieren
# root_squash — root auf nobody mappen (Standard)
# no_root_squash — root behält Privilegien (gefährlich)
# all_squash — alle Benutzer auf nobody mappen
# NFS-Management
exportfs -a # Alle exportieren
exportfs -r # Nach Änderungen neu exportieren
exportfs -v # Exports anzeigen
exportfs -u 192.168.1.10:/nfs/shared # Export aufheben
showmount -e localhost # Exports anzeigen
showmount -a # Verbindete Clients anzeigen
# NFS-Server-Dienste
systemctl restart nfs-kernel-server # Debian
systemctl restart nfs-server # RHEL
# NFS-Client
mount -t nfs4 server:/nfs/shared /mnt/nfs
mount -t nfs server:/nfs/shared /mnt/nfs -o nfsvers=4
# /etc/fstab
server:/nfs/shared /mnt/nfs nfs4 defaults,timeo=30,retrans=3 0 0
# NFS-Status
nfsstat
cat /proc/fs/nfsd/versions
cat /etc/default/nfs-kernel-server
# NFSv4 ID-Mapping
cat /etc/idmapd.conf
# [General]
# Domain = example.com
# SCP
scp file.txt user@host:/path/
scp -r dir/ user@host:/path/
scp -P 2222 file.txt user@host:/path/ # Benutzerdefinierter Port
# SFTP
sftp user@host
> put local.txt
> get remote.txt
> ls
> cd
# rsync (über SSH)
rsync -avz /local/dir/ user@host:/remote/dir/
rsync -avz --progress user@host:/remote/dir/ /local/dir/
# FTP
# vsftpd Konfiguration: /etc/vsftpd.conf
ftp ftp.example.com
> get file.txt
> put local.txt
> ls
> binary # Binärer Transfermodus
> ascii # Text-Transfermodus
# wget
wget https://example.com/file.tar.gz
wget -c https://example.com/large-file.iso # Fortsetzen (Resume)
wget -r https://example.com/dir/ # Rekursiv
# curl
curl -O https://example.com/file.tar.gz
curl -o localname https://example.com/file
curl -L https://example.com/redirect # Redirects folgen
Already covered in 207.3 and 207.4.
# PAM-Konfigurationsdateien
cat /etc/pam.d/login
cat /etc/pam.d/sshd
cat /etc/pam.d/sudo
cat /etc/pam.d/common-auth # Debian
cat /etc/pam.d/system-auth # RHEL
# PAM-Modultypen
# auth — Authentifizierung (Passwort, Biometrie)
# account — Nicht-Auth-Prüfungen (Konto abgelaufen, Zeitbeschränkungen)
# password — Passwortänderungs-Operationen
# session — Session-Setup (Home-Verzeichnis mounten, Log)
# Control-Flags
# required — muss erfolgreich sein, macht bei Fehler dennoch weiter
# requisite — muss erfolgreich sein, stoppt bei Fehler sofort
# sufficient — wenn erfolgreich, werden restliche Module übersprungen
# optional — nicht erforderlich
# Beispiel: /etc/pam.d/sshd
auth required pam_securetty.so
auth requisite pam_nologin.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_loginuid.so
session optional pam_keyinit.so force revoke
session include system-auth
# PAM-Module
pam_unix.so # Standard Unix-Auth (/etc/passwd, /etc/shadow)
pam_ldap.so # LDAP-Authentifizierung
pam_krb5.so # Kerberos-Authentifizierung
pam_limits.so # /etc/security/limits.conf
pam_deny.so # Immer ablehnen (Standard)
pam_permit.so # Immer erlauben
pam_wheel.so # Beschränkung auf die Wheel-Gruppe
pam_tally2.so # Sperren nach fehlgeschlagenen Versuchen
pam_cracklib.so # Prüfung der Passwortstärke
pam_listfile.so # Beschränkung basierend auf Dateilisten
# PAM verwalten
pam_tally2 --user alice --reset # Zähler fehlgeschlagener Logins zurücksetzen
# OpenLDAP Client-Konfiguration
cat /etc/ldap/ldap.conf
# BASE dc=example,dc=com
# URI ldap://ldap.example.com
# TLS_CACERT /etc/ssl/certs/ca.crt
# LDAP-Suche
ldapsearch -x -b "dc=example,dc=com" "(uid=alice)"
ldapsearch -x -H ldap://ldap.example.com -b "dc=example,dc=com" "(&(uid=alice)(objectClass=posixAccount))"
# Bind als Benutzer
ldapsearch -x -D "cn=admin,dc=example,dc=com" -W -b "dc=example,dc=com"
# LDAP-Fehlerbehebung
ldapwhoami -x -D "cn=admin,dc=example,dc=com" -W
ldapadd -x -D "cn=admin,dc=example,dc=com" -W -f newuser.ldif
ldapmodify -x -D "cn=admin,dc=example,dc=com" -W -f modify.ldif
ldapdelete -x -D "cn=admin,dc=example,dc=com" -W "uid=bob,dc=example,dc=com"
# LDIF-Format
# dn: uid=alice,ou=people,dc=example,dc=com
# objectClass: inetOrgPerson
# objectClass: posixAccount
# cn: Alice Smith
# sn: Smith
# uid: alice
# uidNumber: 1001
# gidNumber: 100
# homeDirectory: /home/alice
# loginShell: /bin/bash
# userPassword: {SSHA}encryptedpassword
# nsswitch.conf mit LDAP
cat /etc/nsswitch.conf
# passwd: files ldap
# group: files ldap
# shadow: files ldap
# Postfix Queue-Management
mailq # Queue anzeigen
postqueue -p # Gleiches wie mailq
postqueue -f # Queue leeren (Flush)
postsuper -d ALL # Alle Nachrichten löschen
postsuper -d queue_id # Spezifische Nachricht löschen
postsuper -r queue_id # Requeue (Zustellung erneut versuchen)
postsuper -H queue_id # Nachricht zurückhalten (Hold)
postsuper -h queue_id # Hold aufheben
postqueue -s # Aufgeschobene Zustellung planen
# Speicherorte der Mail-Queue
/var/spool/postfix/maildrop/ # Eingehend
/var/spool/postfix/incoming/ # In der Queue
/var/spool/postfix/active/ # Wird verarbeitet
/var/spool/postfix/deferred/ # Aufgeschoben (Zustellung fehlgeschlagen)
/var/spool/postfix/defer/ # Details zum Aufschub
/var/spool/postfix/bounce/ # Bounce-Nachrichten
/var/spool/postfix/hold/ # Zurückgehaltene Nachrichten
# Hauptkonfiguration
cat /etc/postfix/main.cf
# Basis-Konfiguration
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetworks = 127.0.0.0/8, 192.168.1.0/24
# Relay-Steuerung
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
# Virtuelle Domains
virtual_alias_domains = example.com
virtual_alias_maps = hash:/etc/postfix/virtual
# Einschränkungen
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
# Zugriffskontrolle
cat /etc/postfix/access
# spammer@example.com REJECT
# example.com OK
postmap /etc/postfix/access
# Management
postfix check # Konfiguration prüfen
postfix reload
postfix stop
postfix start
systemctl restart postfix
# Postfix-Logs
tail -f /var/log/mail.log # Debian
tail -f /var/log/maillog # RHEL
# Log-Analyse
pflogsumm /var/log/mail.log # Postfix Log-Zusammenfassung
grep "status=sent" /var/log/mail.log | wc -l # Anzahl gesendeter Mails
grep "status=bounced" /var/log/mail.log | wc -l # Anzahl Bounces
grep "reject" /var/log/mail.log | tail -20
# Postfix-Aktivität
postfix flush # Zustellungsversuch erzwingen
qshape deferred # Muster der aufgeschobenen Queue
mailq | grep -c "^[0-9A-F]" # Queue-Größe
# Spezifische E-Mail verfolgen
grep "alice@example.com" /var/log/mail.log
# Kernel-Netzwerkparameter
sysctl net.ipv4.ip_forward
sysctl net.ipv4.conf.all.rp_filter=1 # Reverse Path Filtering
sysctl net.ipv4.conf.default.accept_source_route=0
sysctl net.ipv4.tcp_syncookies=1 # SYN-Flood-Schutz
sysctl net.ipv4.conf.all.accept_redirects=0
sysctl net.ipv6.conf.all.accept_redirects=0
sysctl net.ipv4.conf.all.log_martians=1
# iptables-Regeln
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
# NAT/Forwarding
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.1.10:80
# Speichern und Wiederherstellen
iptables-save > /etc/iptables.rules
iptables-restore < /etc/iptables.rules
cat /etc/ssh/sshd_config
# Security Hardening
Port 2222 # Nicht-standardmäßiger Port
PermitRootLogin no # Root-Login deaktivieren
PasswordAuthentication no # Nur Key-Authentifizierung
PubkeyAuthentication yes
PubkeyAcceptedAlgorithms ssh-ed25519,rsa-sha2-512
AllowUsers alice bob # Benutzer einschränken
AllowGroups ssh-users # Gruppen einschränken
MaxAuthTries 3 # Max. Authentifizierungsversuche
ClientAliveInterval 300 # Keepalive
ClientAliveCountMax 0
UseDNS no # DNS-Reverse-Lookup überspringen (schneller)
X11Forwarding no # X11-Forwarding deaktivieren
AllowTcpForwarding yes # Für Port-Forwarding
# SSH-Client-Konfiguration (~/.ssh/config)
Host *.example.com
User alice
Port 2222
IdentityFile ~/.ssh/ed25519
ForwardAgent yes
Host myserver
HostName 192.168.1.10
User alice
LocalForward 8080 localhost:80 # Lokales Port-Forwarding
RemoteForward 9090 localhost:80 # Remote-Forwarding
# SSH-Tunneling
ssh -L 8080:localhost:80 user@host # Lokaler Tunnel
ssh -R 9090:localhost:80 user@host # Remote-Tunnel
ssh -D 1080 user@host # SOCKS-Proxy
# SSH-Agent-Forwarding
ssh -A user@host
# Leitet den lokalen SSH-Agenten für verkettete Logins weiter
# SSH-Key-Management
ssh-keygen -t ed25519 -f ~/.ssh/server_key
ssh-copy-id -i ~/.ssh/server_key.pub user@host
ssh-add ~/.ssh/server_key
# Key auf spezifische Befehle einschränken
cat ~/.ssh/authorized_keys
# command="/usr/bin/rsync --server -vlogDtprze.iLsf . /backup" ssh-ed25519 AAAA...
# Port-Scanning
nmap localhost
nmap -sV 192.168.1.0/24 # Erkennung der Service-Version
nmap -O 192.168.1.10 # OS-Erkennung
nmap -sS -p 1-65535 host # SYN-Scan aller Ports
# Intrusion Detection (Einbruchserkennung)
rkhunter --check # Rootkit Hunter
chkrootkit # Alternative Rootkit-Prüfung
tripwire --check # Datei-Integritätsprüfung
aide --check # Erweiterte Einbruchserkennung
# Sicherheit offener Dateien
lsof -i :22 # Wer ist auf Port 22 verbunden
lsof +D /var/www # Offene Dateien im Verzeichnis
fuser -v /var/www # Prozesse, die das Verzeichnis nutzen
fuser 80/tcp # Prozess, der Port 80 nutzt
# System-Audit
auditctl -l # Audit-Regeln auflisten
auditctl -a exit,always -S execve # Alle Befehlsausführungen auditieren
ausearch -c /usr/bin/ssh # Audit-Log durchsuchen
aureport -x # Zusammenfassung der ausführbaren Dateien
# Logwatch
logwatch --detail High --mailto admin@example.com
# psacct / acct Prozessbuchhaltung
accton /var/log/account/pacct
lastcomm # Zuletzt ausgeführte Befehle anzeigen
sa # Zusammenfassung der Prozessbuchhaltung
# Server-Konfiguration
cat /etc/openvpn/server.conf
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.0.0 255.255.255.0
push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 192.168.1.10"
keepalive 10 120
cipher AES-256-CBC
auth SHA256
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
# Keys generieren
cd /etc/openvpn/easy-rsa
./easyrsa init-pki
./easyrsa build-ca nopass
./easyrsa gen-dh
./easyrsa build-server-full server nopass
./easyrsa build-client-full client1 nopass
openvpn --genkey --secret ta.key # TLS-Auth-Key
# Client-Konfiguration
cat client.ovpn
client
dev tun
proto udp
remote vpn.example.com 1194
resolv-retry infinite
nobind
ca ca.crt
cert client1.crt
key client1.key
remote-cert-tls server
cipher AES-256-CBC
auth SHA256
verb 3
# Management
systemctl start openvpn@server
systemctl enable openvpn@server
tail -f /var/log/openvpn.log
# AppArmor
aa-status # Profile anzeigen
aa-enforce /path/to/binary # Profil erzwingen (Enforce)
aa-complain /path/to/binary # Nur Verstöße protokollieren (Complain)
cat /etc/apparmor.d/bin.ping
# SELinux
getenforce # Modus anzeigen (Enforcing/Permissive/Disabled)
setenforce 0 # Auf permissive setzen
setenforce 1 # Auf enforcing setzen
sestatus # Vollständiger SELinux-Status
ls -Z /etc/shadow # Sicherheitskontext
chcon -t httpd_sys_content_t /var/www/html/index.html
restorecon -v /var/www/html/index.html
semanage port -a -t http_port_t -p tcp 8080
ausearch -m avc # SELinux-Denial-Audit
# chroot jail
chroot /newroot /bin/bash
# Klassisches chroot jail: Binärdateien und Bibliotheken kopieren
mkdir -p /jail/{bin,lib64,etc}
cp /bin/bash /jail/bin/
ldd /bin/bash # Erforderliche Bibliotheken finden
cp /lib64/lib* /jail/lib64/
chroot /jail /bin/bash
# systemd security
systemd-analyze security sshd.service # Security Score
cat /etc/systemd/system/service.d/override.conf
# [Service]
# ProtectSystem=full
# ProtectHome=true
# PrivateTmp=true
# NoNewPrivileges=true
# CapabilityBoundingSet=CAP_NET_BIND_SERVICE
# Debugging bei Boot-Fehlern
# 1. Kernel-Meldungen prüfen
dmesg | grep -i error
dmesg | grep -i fail
# 2. systemd journal prüfen
journalctl -xb # Boot-Log mit Erklärungen
journalctl -p err # Priorität: Fehler
journalctl -k # Kernel-Meldungen für diesen Bootvorgang
# 3. Dateisystem prüfen
fsck /dev/sda1
fsck -y /dev/sda1 # Automatische Reparatur
# 4. Hardware-Check
lshw
dmidecode # BIOS/DMI-Informationen
cat /proc/cpuinfo
cat /proc/meminfo
# Schritte für Rescue-Medien
# 1. Booten von Live-CD/USB
# 2. Root-Dateisystem mounten
# 3. Chroot
# 4. Probleme beheben (GRUB neu installieren, fstab korrigieren, Pakete reparieren)
# GRUB rescue
# Am grub> Prompt:
ls # Laufwerke auflisten
set root=(hd0,msdos1)
linux /vmlinuz root=/dev/sda1
initrd /initrd.img
boot
# CPU
top -b -n 1 | head -20
htop
mpstat -P ALL 2 5
perf top # Live-Profiling
strace -p PID # System-Calls
ltrace -p PID # Library-Calls
# Memory
free -h
vmstat 2 10
cat /proc/meminfo
ps aux --sort=-%mem | head -10
smem -t -k # Pro Prozess inklusive Shared Memory
# Disk I/O
iostat -x 2 5
iotop
pidstat -d 2 5
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,FSTYPE,MODEL
# Network
ss -tulpn
ss -tan state established
netstat -i # Interface-Statistiken
ethtool eth0 # NIC-Diagnose
mii-tool eth0 # Link-Status (legacy)
# Segfault-Analyse
dmesg | tail -20 # kernel: segfault at ...
coredumpctl list
coredumpctl info PID
gdb -c core /usr/bin/program
# strace (System Call Trace)
strace ls /tmp
strace -e open,read ls
strace -p 1234 # An einen laufenden Prozess anhängen
strace -f command # Forks verfolgen
strace -c command # Nur Zusammenfassung
# ltrace (Library Call Trace)
ltrace ls
ltrace -e malloc+free command # Speicherallokation verfolgen
# lsof (Liste offener Dateien)
lsof
lsof /var/log/syslog
lsof -u alice
lsof -i :80
lsof -p 1234
# tcpdump
tcpdump -i eth0 port 80 or port 443
tcpdump -i eth0 -w /tmp/capture.pcap
tcpdump -r /tmp/capture.pcap | head -50
# Systemrettung
# dmesg auf Hardwarefehler prüfen
# /var/log/syslog auf Dienstausfälle prüfen
# Festplattenspeicher mit df -h prüfen
# Inode-Auslastung mit df -i prüfen
# Auf Zombie-Prozesse prüfen mit ps aux | grep Z
Bereit, dieses Wissen auf die Probe zu stellen? Die interaktive LPI-Übungsplattform auf courses.graphwiz.ai enthält über 400 realistische Fragen zu den Zertifizierungen LPIC-1, LPIC-2, LPIC-3 und DevOps Tools Engineer — inklusive Lernmodus, zeitgesteuerten Prüfungen, Domain-Auswertungen, Schwachstellenanalyse und Spaced-Repetition-Flashcards.
Jetzt üben auf courses.graphwiz.ai →