How to change MAC address on Ubuntu KVM virtual machine

If you’ve tried changing the MAC address on a recent Ubuntu VM running under KVM/QEMU, you may have noticed that changing the address in the VM configuration on the host yields no result in the guest machine. Also, a change done using either Virtualmin’s configuration or the command line on the guest doesn’t survive a reboot.

How to configure WireGuard VPN as gateway on Rocky Linux / CentOS 8

From WireGuard’s perspective, there is no server and client – all points in a WireGuard network are called peers, and they can connect to each other without a central point and not necessarily in a star topology. However, in this particular configuration scenario and because one peer is central to the whole infrastructure I’m setting up (as it’s the only one to always have a static public IP address, open ports and it can also be used to tunnel all other peers’ traffic), I’m calling it a server – while all other peers I will consider clients.

How to correct sensors information with Home Assistant

Some of the smart power plugs I’m using to monitor power usage appear to report incorrect information when viewed in Home Assistant through the Tuya bridge. The information is fine directly in the Tuya app, so the app is probably doing some data processing behind the hood.
Unfortunately, there’s no way of correcting this directly in the entities as managed by Home Assistant. To display (and use) the right sensors values in HA we need to (manually) create some aliases and mathematically correct the values.

How to stop Jellyfin from logging to system log

By default, Jellyfin on CentOS logs to the main system log. This isn’t an issue except in odd instances, like for example when part of library is located on a remote network attached storage that isn’t permanently available.
This makes Jellyfin log thousands of lines of warnings when (re)scanning the libraries and hits the missing media locations which in turn causes lfd to send out alerts about the syslog getting flooded.

How to (try to) recover data from failed RAID0 array

For experimental reasons I was running a RAID0 array (the speed!) off of two Sandisk Cruiser Mini USB sticks connected to a Raspberry PI.

As expected, due to wear and tear one of the flash memories eventually failed causing the array to go read-only and crash everything that was writing to it, including the array activation.

How to password protect Apache site or folder but still allow some IP ranges

There are cases where you’d want a particular site or subfolder to be easily accessible from specific locations (like the intranet) but apply a minimum protection from public eye for the wide internet.

Apache does support this mixed configuration for its sites through its htaccess functionality.

How to upgrade Virtualmin scripts when PHP version checks fail

When things have been running for long enough various updates and configuration changes start adding up with leftovers bound to cause an issue sooner or later.
With Virtualmin, one such issue is the system’s inability to automatically update its scripts to newer versions based on the incorrect detection that an older PHP version is running on the server instead of the actual one.

How to update OpenWRT while retaining existing configuration and all custom packages

OpenWRT upgrades itself by saving configuration files from known locations (plus manually defined files), overwriting the partition with the latest firmware and then restoring the saved configuration.

This usually works for the configuration itself, however the process doesn’t take care of any custom packages that were previously installed manually (either through LuCI or with opkg). These packages need to be noted down beforehand and then reinstalled.