<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>System administration on Benjamin Italiaander</title><link>https://tlnd.org/topic/sysadmin/</link><description>Recent content in System administration on Benjamin Italiaander</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 28 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tlnd.org/topic/sysadmin/index.xml" rel="self" type="application/rss+xml"/><item><title>Backups with BorgBackup</title><link>https://tlnd.org/Linux/backup/borg_backup/</link><pubDate>Sat, 28 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/backup/borg_backup/</guid><description>&lt;h1 id="-backups-with-borgbackup"&gt;🗄️ Backups with BorgBackup&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://www.borgbackup.org/" class="external-link" target="_blank" rel="noopener"&gt;BorgBackup&lt;/a&gt; (borg) is, like &lt;a href="https://tlnd.org/Linux/backup/restic_desktop_backups/"&gt;restic&lt;/a&gt;, a backup program that &lt;strong&gt;encrypts&lt;/strong&gt; everything and stores every piece of data only once (&lt;strong&gt;deduplication&lt;/strong&gt;). After the first backup, a new one only adds what changed, so you can keep a snapshot of every day for years without filling the disk.&lt;/p&gt;
&lt;p&gt;I use borg especially for backups to my &lt;strong&gt;own server&lt;/strong&gt; over SSH: borg on the server side makes it fast, and the server can be locked down so that it can only receive backups.&lt;/p&gt;</description></item><item><title>Desktop Backups with restic (and the 3-2-1 Rule)</title><link>https://tlnd.org/Linux/backup/restic_desktop_backups/</link><pubDate>Sat, 28 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/backup/restic_desktop_backups/</guid><description>&lt;h1 id="-desktop-backups-with-restic"&gt;💾 Desktop backups with restic&lt;/h1&gt;
&lt;p&gt;For servers I use &lt;a href="https://tlnd.org/Linux/backup/tape/bearos-start-point/"&gt;Bareos and tape&lt;/a&gt;. For my own laptop that is far too much: there I use &lt;strong&gt;&lt;a href="https://restic.net/" class="external-link" target="_blank" rel="noopener"&gt;restic&lt;/a&gt;&lt;/strong&gt;. It is one program, it encrypts everything, and it only stores what changed, so a daily backup takes seconds.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-3-2-1-rule"&gt;The 3-2-1 rule&lt;/h2&gt;
&lt;p&gt;A backup is only a backup if it survives the disaster:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;&lt;/th&gt;
 &lt;th&gt;Rule&lt;/th&gt;
 &lt;th&gt;Example&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;three copies of your data&lt;/td&gt;
 &lt;td&gt;the original + two backups&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;on two different media&lt;/td&gt;
 &lt;td&gt;laptop SSD + USB disk&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;one copy somewhere else&lt;/td&gt;
 &lt;td&gt;a server, a cloud bucket, or a disk at a friend&amp;rsquo;s house&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;And the hidden fourth rule: &lt;strong&gt;test your restores&lt;/strong&gt;. A backup you have never restored is a hope, not a backup.&lt;/p&gt;</description></item><item><title>Harden an SSH Server: sshd, Firewall and fail2ban</title><link>https://tlnd.org/Linux/ssh/ssh_server_hardening/</link><pubDate>Sat, 28 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/ssh/ssh_server_hardening/</guid><description>&lt;h1 id="-harden-an-ssh-server"&gt;🛡️ Harden an SSH server&lt;/h1&gt;
&lt;p&gt;Every server with port 22 open to the internet gets thousands of login attempts a day. These four steps make them harmless.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Keep your current SSH session open&lt;/strong&gt; while you change these settings, and test with a &lt;strong&gt;second&lt;/strong&gt; session. If something is wrong, you can still fix it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id="1-log-in-with-a-key-first"&gt;1. Log in with a key first&lt;/h2&gt;
&lt;p&gt;Make sure you can log in with an SSH key before you turn passwords off:&lt;/p&gt;</description></item><item><title>Linux Networking Cheatsheet: ip, nmcli, DNS and WireGuard</title><link>https://tlnd.org/Linux/networking/</link><pubDate>Sat, 28 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/networking/</guid><description>&lt;h1 id="-linux-networking-cheatsheet"&gt;🌐 Linux networking cheatsheet&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;ifconfig&lt;/code&gt;, &lt;code&gt;route&lt;/code&gt; and &lt;code&gt;netstat&lt;/code&gt; are old; on current Linux systems you use &lt;strong&gt;&lt;code&gt;ip&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;ss&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;nmcli&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="addresses-links-and-routes-ip"&gt;Addresses, links and routes: ip&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip -br a &lt;span class="c1"&gt;# all interfaces and addresses, one line each&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip a show dev eth0 &lt;span class="c1"&gt;# one interface, in detail&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip -br link &lt;span class="c1"&gt;# link state (UP/DOWN) and MAC addresses&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip r &lt;span class="c1"&gt;# routing table (IPv4)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip -6 r &lt;span class="c1"&gt;# routing table (IPv6)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip route get 1.1.1.1 &lt;span class="c1"&gt;# which interface and gateway are used for this address?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip neigh &lt;span class="c1"&gt;# ARP / neighbour table: who is on the local network&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip -s link show dev eth0 &lt;span class="c1"&gt;# packet counters and errors&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Temporary changes (gone after a reboot):&lt;/p&gt;</description></item><item><title>systemd Basics: Services, Logs and Timers</title><link>https://tlnd.org/Linux/systemd/</link><pubDate>Sat, 28 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/systemd/</guid><description>&lt;h1 id="-systemd-basics"&gt;⚙️ systemd basics&lt;/h1&gt;
&lt;p&gt;systemd starts and watches everything on a modern Linux system: services, timers, mounts, and the logs. Two commands do almost everything: &lt;strong&gt;&lt;code&gt;systemctl&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;journalctl&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="services-with-systemctl"&gt;Services with systemctl&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl status nginx &lt;span class="c1"&gt;# is it running? last log lines&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl start nginx &lt;span class="c1"&gt;# start now&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl stop nginx &lt;span class="c1"&gt;# stop now&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl restart nginx &lt;span class="c1"&gt;# stop + start&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl reload nginx &lt;span class="c1"&gt;# re-read the config without stopping (if supported)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; --now nginx &lt;span class="c1"&gt;# start now AND at every boot&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl disable --now nginx &lt;span class="c1"&gt;# stop now and don&amp;#39;t start at boot&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl is-enabled nginx &lt;span class="c1"&gt;# enabled / disabled&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl --failed &lt;span class="c1"&gt;# everything that went wrong&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl list-units --type&lt;span class="o"&gt;=&lt;/span&gt;service &lt;span class="c1"&gt;# all loaded services&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Change a setting of a service without editing the original file (it is overwritten by updates):&lt;/p&gt;</description></item></channel></rss>