Security
15 articles, grouped by kind; the order follows the tracks.
Concepts 8
-
PAM: login checks, password policy and lockout
The module stack in /etc/pam.d decides whether to let a user in, which password to accept and when to lock them out.
15 mingrep -vpam-auth-update --enableecho -
Firewall — nftables / ufw
The Linux firewall: filtering traffic with simple ufw and low-level nftables, checking the rules.
6 minufw allowufw statusufw default -
The classic iptables firewall
The classic Linux firewall — chains, rules, NAT, and why nftables replaced it.
5 miniptables -Liptables -Aiptables -I -
Capabilities: root split into parts
Parts of root's rights: a process or a file gets only the one it needs, e.g. CAP_NET_BIND_SERVICE for a low port.
12 mingrepcapshgetpcaps -
Service hardening: User=, ProtectSystem, NoNewPrivileges
Unit settings that strip a service of root, system writes and new privileges; systemd-analyze security rates them.
13 minsystemd-analyze securitysystemctl showsystemctl edit -
AppArmor
Mandatory access control on Ubuntu — service profiles, enforce/complain modes.
8 minaa-statusjournalctl -kaa-complain -
TLS and certificates — openssl, the chain, verification
A TLS certificate binds a server key to a site name; openssl reads its fields, checks the chain and issues a new one.
11 minopensslopenssl verifycurl --cacert -
WireGuard — VPN on keys
A fast VPN on a key pair instead of passwords; the private key in wg0.conf needs permissions, like an SSH key.
4 minwg genkeywg-quick upwg show
Commands 3
-
sudo — running commands as another user
Grants temporary root rights via sudoers; edit the file only through visudo, or a mistake locks everyone out of sudo.
5 minapt updatesudoeditvisudo -f -
visudo — edit sudoers safely
The visudo command edits /etc/sudoers and files in /etc/sudoers.d and refuses to save a rule with a grammar error.
6 minvisudovisudo -fchmod -
GPG — encryption and signatures
GnuPG: GPG keys, encrypting files, signing and verifying, symmetric mode with a passphrase.
5 mingpg -cgpg -dgpg -e
Services 4
-
auditd — security auditing
Kernel-level auditing — who did what and when; watch rules and event search.
8 minauditctl -wauditctl -aauditctl -l -
sshd — the SSH server
The OpenSSH server; edit the config with a second session open — a mistake in PermitRootLogin locks you out immediately.
5 minsshd -tsshd -Tsystemctl reload -
unattended-upgrades: security updates with no one at the keyboard
Ubuntu's service that installs updates from allowed origins once a day on an apt timer; by default only security ones.
12 minsystemctl list-timerscatapt-config dump -
fail2ban
Log-based banning — protecting SSH and services from brute force; jails, status, unban.
7 minfail2ban-client statusfail2ban-client setfail2ban-regex
Nothing found. Try a shorter query.