Least Privilege on Linux Servers: Practical Examples
Apply least privilege on a VPS: separate service users, scoped sudo rules, database grants, file permissions, systemd sandboxing, containers and keys.
Blog
Hardening servers and websites: SSH, firewalls, VPNs and encryption.
Apply least privilege on a VPS: separate service users, scoped sudo rules, database grants, file permissions, systemd sandboxing, containers and keys.
How JSON Web Tokens work: header, payload and signature, HS256 vs RS256, validating exp, aud and iss, token storage, refresh and revocation, mistakes.
Run a Lynis audit on Ubuntu, Debian or RHEL, read the hardening index, warnings and suggestions, prioritise the fixes that matter, and track progress.
Protect Linux and Windows servers from ransomware: common entry points, exposed RDP and databases, immutable backups, least privilege, and recovery.
Troubleshoot SSH connection refused and timeout errors: is sshd running, which port, firewall rules, Fail2Ban bans and using the VNC console.
Monitor Linux servers with Wazuh: manager, indexer and agents, sizing, installing agents, file integrity and log alerts, vulnerability detection, tuning.
Use SSH port forwarding to reach private databases and admin panels, expose a local service, or browse through a SOCKS proxy, with safe settings.
Spot a hacked Linux server: unknown processes and users, crypto-miners, odd cron jobs and SSH keys, spam or attack traffic, how to check, what to do.
Write an nftables firewall from scratch: tables, chains and rules, a complete server ruleset, sets for IP lists, rate limits, NAT, and making it persistent.
Harden a Linux web server layer by layer: OS, SSH, firewall, per-site isolation, Nginx and PHP, HTTPS headers, WAF, backups and monitoring.
Install and run rkhunter and chkrootkit, update baselines after upgrades, handle false positives, schedule scans with reports, and respond to detections.
DDoS attacks explained: UDP floods and amplification, SYN floods, HTTP floods and slowloris, what you can mitigate yourself, and when you need upstream help.
Connect servers or an office network with an encrypted WireGuard tunnel: private addressing, keys, subnet routing, firewall rules and monitoring.
Set up a personal WireGuard VPN on an Ubuntu or Debian VPS: keys, server and client configs, forwarding and NAT, phone and laptop clients.
Connect to a Linux VPS over SSH from Windows, macOS or Linux: first login, SSH keys, a config shortcut, file transfers and common errors.
Install Fail2Ban on Ubuntu or Debian, protect SSH with jail.local, tune bantime and findtime, add Nginx jails, whitelist IPs and unban addresses.
WireGuard vs OpenVPN for a Linux VPN server: how they differ, how to set up each securely, and when you need OpenVPN over TCP 443.
Write Linux firewall rules from the CLI: a complete nftables ruleset, UFW and firewalld equivalents, persistence, and safe testing.
Secure a self-managed Kubernetes cluster: API server access, RBAC, pod security standards, network policies, secrets, images, nodes and upgrades.
Create a sudo user, copy your SSH key, then disable root login over SSH with PermitRootLogin — safely, with testing steps for Ubuntu, Debian and RHEL.
Protect Nginx with Fail2Ban: HTTP auth failures, bad bots, 404 scanners, login brute force, rate-limit violations, custom filters and safe testing.
Encrypt every connection to and from your VPS: HTTPS and modern TLS, encrypted database links, SSH tunnels for admin tools and WireGuard.
Port scans hit every server. Audit open ports, firewall by default, bind services to localhost, harden SSH, and rate-limit connections.
Practical UFW rules for real servers: allow by IP, rate-limit SSH, port ranges, CDN-only web access, per-interface rules, logging and Docker.