IT upgrades
After a life in IT you'd think I would be better at this stuff. Two things caught me out this week, both around the web server that runs this blog among other things.
The first knocked it offline and I was unaware. The server is a dimimutive Lenovo ThinkCentre M92p and has 4 USB ports but none work which was annoying as I wanted to upgrade Lubuntu but really wanted a decent backup to an external device first. I had another of these systems with working USB ports so I swapped the hard disk between the two - the specs are essentially the same. All went well, apparently. I attached a USB SDD to use as a backup for the pending operating system upgrade.
Then I noticed no incoming email plus I tried to access the blog from an external IP and it failed. Odd. No issues with accessing from the house LAN. Then I remembered having an issue with the PlusNet router but could not remember what so I logged into that to see if my memory would return. And it did. The PlusNet router helpfully follows MAC addresses rather than IP addresses so when I swapped the HDD between systems the MAC address changed. The donor PC had been used before some time ago and so the router assigned all the NAT rules to the IP it expected, i.e. that assigned to the donor. This severed all external connections into the server becuase the NAT rules are of course IP based.
Drat. I've updated my notes!
So, now the server had working USB ports I attached a USB SDD and did a backup and checked that carefully. I'm using a combination of timeshift for the system backup and good old rsync for /home. Off to upgrade then.
The server was running 20.04 so was rather out of date. Yes I know it is far safer to install a fresh system rather than an upgrade but I keep written notes of how each system is set up so I can recreate it entirely from scratch if needed. So I just did the good old do-release-upgrade. That got to 22.04 and a stable system. Off to 24.04... again all went well except for a few oddities, plus once more the blog fell over. The blog was an easy fix as PHP had upgraded from v7 to v8 but the v7 Apache module was still trying to load. But other than that I could not find any of the fail2ban tables in iptables. A search revealed that the system now uses nftables instead of iptables and there is some glue to translate one to the other. So ufw was working but it took me a while to figure out that fail2ban was actually working and I was looking in the wrong place. The server did not start sendmail for no apparent reason, but essentially everything looks ok and this time no PlusNet router sillyness.
But this time upgrading has been a lot less fun than I remember.
The real reason for the upgrade was to retire the Raspberry Pi system that controls the 'smart' aspects of the house and run the various bits of code on the server instead. That needs a working USB port for the Zigbee dongle and a more up to date node.js. But that's for another day...