Sending the firewall's logs to netsec
This started as housekeeping. The hand-off file that the agent sessions leave each other had grown a “waiting on the owner” section with a dozen entries in it, and I had a feeling a good half of them were already done. So I asked for a list of the stale ones, phrased as questions I could answer, with the caveat that anything it could check for itself it should just go and check. It did a surprising amount of that: it looked at which session my desktop was actually running under (the right one, as it turns out), confirmed the terminal packages I’d been told to remove were gone from both machines, and found the login credentials on the laptop that proved I’d finished setting that up. The rest I ticked off in a couple of dialogs, and nine items went off to the history file.
That left a second section, “waiting on the network session”, which was a list of things other sessions had asked the network session to do on their behalf. The rule here is that only one session at a time touches the firewall, so requests pile up in the hand-off instead of everyone poking at OPNsense at once. The network session had last written anything about nine hours earlier, so I gave this session sudo everywhere plus the firewall elevation and told it to take the list over and clear it.
The main item was getting OPNsense’s logs onto netsec, where Wazuh has been sitting with a syslog listener open since this morning, waiting. The first small surprise was that OPNsense’s remote logging lets you filter by program, but the list of programs it offers doesn’t include sshd, which was one of the things we specifically wanted. The workaround was two destinations instead of one: one filtered by program (firewall, DHCP, audit, WireGuard and the general system stuff), and one filtered by the syslog facility, so anything logged as authentication goes across regardless of who logged it. Both went in through the API, and a packet capture on netsec showed both connections up and a steady stream arriving.
Wazuh, meanwhile, showed nothing at all. Not an alert, not an error. The connections were established, the listener was reading them, and the alert log had stopped well before the first message arrived. So it tried the obvious control experiment, which was to send a test line from the identity server (the only other thing allowed to send syslog there), and that showed up immediately. So the receiver worked, and the firewall’s stream specifically was vanishing somewhere. After a restart of Wazuh’s listener, OPNsense reconnected and the archive filled up at about 750 events a minute. The best guess is that the first connections were opened while the listener was in the middle of restarting and never quite got attached to anything, which is not a very satisfying explanation, but it hasn’t recurred.
Even then, there were no alerts from the firewall, which looked like the same problem again for a bit. It wasn’t. Running one of the captured lines through Wazuh’s test tool showed it decoded perfectly into a firewall drop event, and the rule that matches a single drop has a no_log option on it, by design. One blocked packet is not news; the rule that actually alerts is the one for eighteen of them from the same source within 45 seconds. Which is reasonable, if only because the internet throws a few blocked packets at every home connection per second and I don’t want my phone buzzing for each of them. The other thing I learned is that most of what’s coming across is the firewall logging its own default pass rules, which is a GUI setting I may or may not turn off (Zeek already records every flow, so it’s a bit redundant).
The rest went more smoothly. netsec got a proper Let’s Encrypt certificate for its dashboard, through the same OPNsense ACME setup every other host uses, so the browser warning is gone and the uptime monitor now checks the certificate strictly instead of being told to ignore it. The four VMs built on svchost2 earlier today got their change-log rows and plan ticks, the reservation descriptions that still claimed svchost1 hosted half the house were corrected, they went into the list of repos on GitLab, and they each got an SSH check in Gatus (all green). The two requests that genuinely depend on future work, the Wazuh agent on the firewall and the Home Assistant firewall rules, were moved next to the work they depend on rather than left in a list for a session that may never come back to them.
And while it was in netsec’s Suricata config anyway, I had it disable the rule that fires on Steam’s HTTP user agent. It was about the tenth most common alert on the network, and as we know, a house with a Steam Machine and four Steam Decks in it is going to have a lot of Steam traffic.