Publish a domain with OPNsense
Unbound DNS override plus HAProxy server, backend, condition and rule.
IPv6 with NAT64 & DNS64
Dual-stack VLAN, DHCPv6, Tayga NAT64 and DNS64 on OPNsense.
Minimal Debian desktop
Install only what you need, then add GNOME, networking and sudo.
Recover data from QNAP RAID 5
Assemble the md array, activate LVM and mount read-only on Linux.
Kubernetes on Talos Linux
Generate configs, bootstrap etcd, join workers, add Flux and recover etcd.
Enroll a host in Fleet
Build an osquery package with fleetctl and install it.
Fix an SSH client error
Swap the obsolete SSSD known-hosts proxy for KnownHostsCommand.
Publish a domain with OPNsense (Unbound + HAProxy)
Goal
- Make
apex.pride.improwised.devreachable for users, served by an internal web server at10.0.15.128:80. - Understand how DNS, a reverse proxy and host-based routing fit together.
How the request flows
The DNS override points the name at the firewall, not at the web server. HAProxy on the firewall then decides which backend gets the request by looking at the HTTP Host header — that's how many sites share one IP.

Add a DNS host override
Services › Unbound DNS › Overrides → + Add. Set Host apex, Domain pride.improwised.dev, Type A, and the firewall's IP as the address. Save, then Apply.

Add the real server
Services › HAProxy › Settings › Real Servers → Add. Name apex.pride.improwised.dev, Type static, FQDN or IP 10.0.15.128, Port 80.

Create a backend pool
Virtual Services › Backend Pools → Add. Name apex, Mode HTTP (Layer 7), Balancing Source-IP Hash, Servers the real server from step 2.

Add a condition (ACL)
Rules & Checks › Conditions → Add. Name apex, Condition type Host matches, Host string apex.pride.improwised.dev.

Add a rule
Rules & Checks › Rules → Add. Name apex, Select conditions apex, Execute function Use specified Backend Pool, Use backend pool apex.

Attach the rule to the public service
Virtual Services › Public Services → edit the public frontend (e.g. Musketeers) → add apex under Select Rules → Save → Test syntax → Apply.

Verify
nslookup apex.pride.improwised.dev # should return the firewall IP
curl -I http://apex.pride.improwised.dev # expect a response from the backend
Shortcut: when a gateway backend already exists
On a gateway such as musketeers3-gw, the backend and rule already exist — you only need the DNS override, a new condition, and to add that condition to the existing rule.


If you clone an existing server, pool, condition or rule, update every value before saving and always run Test syntax before Apply — a bad HAProxy config can take every published site offline.
IPv6 with NAT64 & DNS64 on OPNsense
Goal
- Give a VLAN IPv6 addresses (static gateway + DHCPv6).
- Let IPv6 clients reach the IPv4 internet through NAT64 (Tayga) and DNS64 — even without IPv6 from your ISP.
fd4a:5c4b:23ab::/48.64:ff9b::/96 into IPv4 and back.64:ff9b::/96 so clients send traffic to NAT64.Install the Tayga plugin
System › Firmware › Plugins → search tayga → install os-tayga.

Give the VLAN a static IPv6 address
Interfaces › [vlan_12] → IPv6 Configuration Type Static IPv6 → address fd4a:5c4b:23ab:10::1 / 64.


Hand out addresses with DHCPv6 (and/or Router Advertisements)
Services › ISC DHCPv6 › [vlan_12] → enable → range fd4a:5c4b:23ab:10::100 to ::200. Configure Services › Router Advertisements so clients learn the gateway (and can use SLAAC).

Firewall rules, normalisation and outbound NAT for Tayga
Allow traffic on the Tayga interface, add a normalisation (scrub) rule for it, and add an outbound NAT rule so Tayga's internal IPv4 pool is translated to your WAN address.



Enable DNS64 in Unbound
Services › Unbound DNS › General → enable DNS64 support.

Without IPv6 from your ISP, sites that already have real AAAA records would fail (there is no IPv6 route out). Fix it by synthesising every answer through NAT64 — SSH into OPNsense and create:
vi /usr/local/etc/unbound.opnsense.d/dns64.conf
server:
module-config: "dns64 validator iterator"
dns64-prefix: 64:ff9b::/96
dns64-synthall: yes
dns64-ignore-aaaa: yes
Then restart Unbound.
Test
From an IPv6-only client, an IPv4-only site should resolve to a 64:ff9b::… address and be reachable.
dig AAAA ipv4only.arpa +short # expect 64:ff9b::c000:aa / ::c000:ab
traceroute6 64:ff9b::8.8.8.8
curl -6 -I https://example.com

Minimal Debian desktop
Goal
- Install Debian with no extra bloat — just standard system utilities.
- Add a minimal GNOME desktop, working network management and sudo.
Prepare the installer
Download the ISO from debian.org/distrib, write it to a USB stick (Rufus, balenaEtcher or dd), and boot from it using the boot menu key (often F2, F12 or Del).
# Linux: write the ISO to a USB stick (check the device with lsblk first!)
sudo dd if=debian-*.iso of=/dev/sdX bs=4M status=progress oflag=sync
Start the installer and set the basics
Choose Install, set a hostname, a root password, then create your user account and its password.




Partition manually
Choose Manual partitioning. A simple UEFI layout: a small EFI System Partition and an ext4 root (/). Add swap if you have little RAM. Then Finish partitioning and write changes to disk.


Package manager and software selection
Pick your country's mirror (e.g. India) with archive deb.debian.org. In Software selection, untick everything except standard system utilities.


Install a minimal GNOME desktop
Log in, become root with su -, and install just the pieces you need — --no-install-recommends keeps optional extras out:
su -
apt install --no-install-recommends gdm3 git sudo gnome-terminal gnome-session \
gnome-control-center gnome-shell gnome-text-editor gnome-music nautilus \
firmware-linux gnome-tweaks xdg-user-dirs evince totem firefox-esr network-manager-gnome
reboot
Let NetworkManager manage the network
The installer configured the NIC in /etc/network/interfaces, so NetworkManager ignores it. Set managed=true:
su -
nano /etc/NetworkManager/NetworkManager.conf
# [ifupdown]
# managed=true
systemctl restart NetworkManager

managed=false to true.Configure sudo
Add your user to the sudo group and edit the policy with visudo (it checks syntax before saving). The original notes limit the group to package management only:
su -
usermod -aG sudo <your-user>
visudo
# %sudo ALL=(ALL:ALL) /bin/apt # only apt allowed
# %sudo ALL=(ALL:ALL) ALL # (default) full admin rights

/bin/apt — a nice least-privilege example.Recover data from QNAP RAID 5 on a Linux PC
Scenario
- A QNAP NAS has died. Its disks were a 3-disk RAID 5 (one member already missing — array state
.AA). - QNAP uses Linux software RAID (
md) with LVM on top, so any Linux PC can read the disks.
Golden rules: never run mdadm --create or mkfs on these disks, mount everything read-only, and if a disk is failing, clone it with ddrescue first and work on the copy.
Identify the disks and data partitions
QNAP keeps data on partition 3 of each disk (/dev/sda3, /dev/sdb3…).
sudo fdisk -l
lsblk -o NAME,SIZE,TYPE,FSTYPE
Examine the RAID superblocks
sudo mdadm --examine /dev/sda3 /dev/sdb3 /dev/sdc3
| Field | Example | What it tells you |
|---|---|---|
| Raid Level / Devices | raid5 · 3 | RAID 5 across 3 members |
| Array UUID | 14c29707:… | Must be identical on every member |
| Array State | .AA | A = active, . = missing → running degraded |
| Events | 6959926 | Members with the highest, matching count are the freshest |
| Checksum | correct | Superblock is intact |
Assemble the array (degraded is OK)
--run starts the array even though a member is missing.
sudo mdadm --assemble --run /dev/md2 /dev/sda3 /dev/sdb3 /dev/sdd3
sudo mdadm --detail /dev/md2 # State: clean, degraded
Activate the LVM volumes
sudo vgscan
sudo vgchange -ay
sudo lvscan # check which LVs are ACTIVE
sudo lvdisplay
sudo lvs vg2 # sizes and usage
Identify filesystems and mount read-only
sudo blkid /dev/vg2/lv2 /dev/vg2/lv3 /dev/vg2/lv4
sudo mkdir -p /mnt/lv2 /mnt/lv3 /mnt/lv4
sudo mount -t ext4 -o ro /dev/vg2/lv3 /mnt/lv3
Copy the data off
sudo rsync -aHAX --info=progress2 /mnt/lv3/ /backup/qnap-lv3/
When finished: sudo umount /mnt/lv3 && sudo vgchange -an vg2 && sudo mdadm --stop /dev/md2.
This is exactly why RAID is not a backup: a degraded RAID 5 has no redundancy left. Follow the 3-2-1 rule so a dead NAS is an inconvenience, not a disaster.
Kubernetes on Talos Linux
Goal
- Build a Kubernetes cluster on Talos VMs in Proxmox: control-plane nodes plus workers.
- Bootstrap it, add GitOps with Flux, and know how to recover etcd.
Why Talos?

Create the VMs
In Proxmox: Create VM → ISO talos-v1.7.4-metal-amd64.iso → disk 256 GB on local-lvm → 8 cores → 24 GB RAM → start. Physical machines boot the same ISO from USB.
Install talosctl and generate configs
sudo pacman -S talosctl # Arch/Garuda; see docs for other OSes
talosctl gen config <cluster_name> https://<NODE_IP>:6443 --output-dir _out
# creates _out/controlplane.yaml, _out/worker.yaml and _out/talosconfig
Edit the YAML as needed: hostname, install disk, extra kernel modules and udev rules (e.g. for a Google Coral TPU).
Apply the control-plane config
talosctl apply-config --insecure --nodes <NODE_IP> --file _out/controlplane.yaml
export TALOSCONFIG="_out/talosconfig"
talosctl config endpoint <NODE_IP>
talosctl config node <NODE_IP>
Bootstrap etcd and get a kubeconfig
After 2–3 minutes the console asks you to bootstrap. Run it once, on the first control-plane node only:
talosctl bootstrap # takes 4–5 minutes
talosctl kubeconfig . # writes ./kubeconfig
kubectl get nodes

Join workers and extra control planes
talosctl -n <ANOTHER_NODE_IP> disks # find the install disk first
talosctl apply-config --insecure --nodes <ANOTHER_NODE_IP> --file _out/worker.yaml
# extra masters: same controlplane.yaml, but change machine.network.hostname each time
Add system extensions (e.g. gasket driver)
Extensions are baked into a custom installer image from the Talos Image Factory:
talosctl upgrade --image factory.talos.dev/installer/<schematic-id>:v1.7.4 --preserve
talosctl -n <NODE_IP> read /proc/modules | grep -E "gasket|apex"
GitOps with Flux
flux install --components-extra="image-reflector-controller,image-automation-controller" --export > flux-crds.yaml
kubectl apply -f flux-crds.yaml
flux create secret git github-auth --url=ssh://git@github.com/<org>/<repo> \
--ssh-key-algorithm=ed25519 --export > github-auth-sec.yaml
kubectl apply -f github-auth-sec.yaml
Then add the GitRepository, Kustomizations and HelmRepositories, followed by storage (NFS storage class), monitoring (Prometheus, Grafana, Loki, Robusta, Uptime Kuma) and finally the apps.
Repository layout
cluster/
├── action-runner-controller/ # GitHub Actions self-hosted runners + autoscaler
├── cert-manager/ # ClusterIssuers (prod / staging)
├── flux-system/ # GitRepository, HelmRepositories, Kustomizations
├── ingress-nginx/
├── kube-system/ # registry credentials
├── monitoring/ # grafana, loki, prometheus, robusta
└── <app_name>/
├── _namespace.yaml
├── <app>-configmap.yaml · <app>-secret.yaml
├── <app>-helmrelease.yaml · <app>-db-helmrelease.yaml
└── README.md
Migrating apps from an old cluster
- Back up app data with restic (apps on NFS/local-path storage).
- In
k9s, scale StatefulSets and Deployments to 0 (:sts→ s), then delete the old nodes. - Rebuild the nodes with Talos, bootstrap, install Flux and storage, then restore data with restic and re-apply the apps.
Recovery: reset a node and restore etcd
export TALOSCONFIG=~/Downloads/talosconfig
talosctl -n <NODE_IP> reset
talosctl -n <NODE_IP> apply-config -f controlplane.yaml --insecure
talosctl -n <NODE_IP> bootstrap --recover-from etcd/member/snap/<snapshot>.snap
talosctl -n <NODE_IP> reset --system-labels-to-wipe=EPHEMERAL --graceful=false # reset etcd state
talosconfig is an admin credential for the whole cluster — store it in a password manager or vault, never in Git.
Enroll a host in Fleet (osquery)
Goal
- Install the Fleet agent (fleetd / osquery) on a Linux host so it appears in Fleet for inventory, queries and policies.
Download fleetctl
curl -LO https://github.com/fleetdm/fleet/releases/download/fleet-v4.75.1/fleetctl_v4.75.1_linux_amd64.tar.gz
tar xzf fleetctl_v4.75.1_linux_amd64.tar.gz
cd fleetctl_v4.75.1_linux_amd64
Get the certificate and enroll secret
In Fleet: Hosts › Add hosts › Advanced → download fleet.pem. Find the right secret under Manage enroll secret.
The enroll secret lets any machine join your Fleet. Don't paste it into screenshots, chats or shell history — read it from a variable.
Build and install the package
read -rs FLEET_SECRET # paste the enroll secret (not echoed)
./fleetctl package --type=pkg.tar.zst \
--fleet-url=https://<fleet-server> \
--enroll-secret="$FLEET_SECRET" \
--fleet-certificate=./fleet.pem
sudo pacman -U fleet-osquery-*.pkg.tar.zst # use --type=deb / rpm / msi / pkg on other systems
Verify
The host shows as Online in the host list within a minute or two.

Fix the “obsolete sss_ssh_knownhostsproxy” SSH error
Symptom
Your system is configured to use the obsolete tool sss_ssh_knownhostsproxy.
Please read the sss_ssh_knownhosts(1) man page to learn about its replacement.
Cause
Hosts enrolled in FreeIPA get an SSH client config that uses SSSD to look up host keys. Newer SSSD versions replaced the ProxyCommand helper with KnownHostsCommand.
Edit the SSH client config
sudo -e /etc/ssh/ssh_config # or the IPA drop-in in /etc/ssh/ssh_config.d/
Swap the directive
# ProxyCommand /usr/bin/sss_ssh_knownhostsproxy -p %p %h
KnownHostsCommand /usr/bin/sss_ssh_knownhosts %H
Verify
ssh -G <host> | grep -i knownhostscommand
ssh <user>@<host>
Original documents
The source files these labs were written from. Word files download; PDFs open in a new tab.