I keep all my old scanned records in encrypted APFS disk images, one disk image per year. I do have my Mac filesystem encrypted too, which protects against unauthorized access if the machine gets lost or stolen. However, by keeping these records on encrypted disk images that I only mount when they’re in use, I add a bit of protection against rogue software exfiltrating the data.
It’s probably absurd to use this kind of protection for simple stuff like old utility bills, but a little paranoia can prevent a large headache, as the saying goes*.
Today, I wanted to look at an old file, and was getting “Permission denied” errors from the Preview app. Looking at the file information from the finder (and then from the terminal) showed permissions were fine. I tried double clicking on the file, and got the permission denied message — including the name of a different file than the one I was trying to open. [o.shit.emoji]
I ran Disk Utility’s “first aid” on the image, and that said everything was fine, but I continued to get the error. I ran fsck_apfs on the image too (specifically, hdiutil attach -nomount /path/to/my/file and then fsck_apfs -y /dev/disk6s1). That’s probably what Disk Utility was doing under the hood, but I figured I’d try it anyway. Same error.
Then I said “[bleep] it!” and rebooted the system. Mounted the disk image, and everything’s fine. Computers suck 🙁
I clicked on a link to a web page I host on a Rocky Linux 9.7 VPS, and my browser stalled. That seemed strange, so I ssh-ed in to see if the web server was running correctly. ssh timed out.
So I used the VPS provider’s web-based console to log in, and found the networking was all dead. That was unexpected. After trying to remember the service name in this flavor/version, I executed systemctl restart NetworkManager.service and it was back … until I did a dnf update. Then it locked hard, and even the web-based console couldn’t log in for a while.
Tech support helped me track down the problem.
The VPS “only” had 2G of RAM, and that’s not enough on a modern Linux system to run a web server, database, and package manager. The dnf package manager subsystem was consuming all available memory when computing dependencies, and being killed by the oom-killer, leaving the system in weird states.
I ended up resizing the VPS to a mighty 4G RAM. It’s a few bucks more a month.
Makes me think of my first Linux box, which ran Debian Hamm in what I seem to think was 6M of memory.
We were in the middle of watching a streaming TV show / SAG Award nominee, when the spinny wheel started up and the “TV” computer popped up a “network disconnected” message. I figured our new Frontier Fiber had disconnected, but the lights all looked good. Next to it, though, the Netgate firewall appliance had an angry blinking red LED. I plugged in a serial cable. Not good!
Uncorrectable I/O failure? Hm. This turns out to be an actual physical hardware error.
I’d bought this appliance before the start of the pandemic, so it was about six and a half years old. Shortly after I bought it, there was all sorts of drama with the company behind pfSense (not linking, but you can search) which made me wonder how trustworthy the whole thing was. And just a few months ago, when I ditched the cable modem for a fiber connection, the device had corrupted its entire configuration during a routine software update, and stupid-stupid-stupid … I hadn’t kept a recent backup of the config.xml. So I’d just been through the whole reconfigure process, which requires a hidden trick for VLANs on that specific device that’s not required on other hardware configurations, and which kept me befuddled for many hours more than I’m willing to admit.
The storage RAM on the SG-1100 is soldered on, and it’s beyond my ambition to try to replace it. Instead, I ordered a new piece of hardware.
On this new device, I figured I’d try the OpnSense fork of the firewall software on the assumption that I’d be mostly familiar with it. Well, that’s partly true. The web-based configuration is reorganized. Some things require fewer steps, but they weren’t immediately obvious to me. Dammit Jim, I’m a code monkey, not a network engineer.
Anyway, I spent today restoring my network. It’s not all that complicated. I have a LAN, an isolated guest network, an isolated “internet of things” network, and VPN access from outside, all with special sets of rules to allow or prevent access, depending.
It was pretty smooth. A few gotchas that tripped me up whether reasonable or not:
ddclient. I use this for pushing my dynamic IP address to the primary DNS provider for a domain, so I can have name-based access to the home network. It kept failing. Eventually, I had to log in to the firewall, and manually edit the configuration file to place quotes around my password. There’s probably some vulnerability in there if it’s passing unescaped strings to the command line — although you already need credentials to get to the interface that would allow it.
Firewall rules in OpnSense have a “direction” which I don’t remember in pfSense. So when I want to firewall off connections from the Guest network to the LAN, for example, I have to put an “inbound” rule on the Guest network blocking the traffic. “inbound” means that the traffic is blocked when coming to the firewall (I had foolishly thought it was “outbound” to the LAN network). Since rules are specified on interface, network, and can specify both source and destination, I’m not sure why direction is required.
I created and deleted a VPN instance early in the process. There’s still a tab in the firewall rules area, and automatically generated firewall rules for it, even though the instance has been deleted and has no interfaces. I don’t think it’s a big deal, but it’s confusing.
So. many. DHCP. options. There’s the default “Dnsmasq DNS & DHCP”, there’s also “ISC DHCPv4” and “ISC DHCPv6”, and “Kea DHCP.” For my little network, I could do everything in the default, just creating separate DHCP ranges for each interface.
Setup wasn’t so bad. I’ll doubtless gripe here if things don’t work the way I want them to.