Debugging flaky DNS on a Raspberry Pi bridge setup with nftables rules

Flaky DNS on a Raspberry Pi Bridge – A Quick Debug Guide

Running a Pi as a network bridge can feel like a walk‑through of a maze. The bridge interface (br0) sits right between your LAN and the Pi’s Wi‑Fi or Ethernet, and if DNS starts to act up, it’s usually the bridge’s handling of UDP or some nftables rule that’s tripping up. Below is a no‑frills, coffee‑talk style walk‑through to isolate and patch the problem while keeping the bridge tight.

[Read More]

Nftables log‑filter tricks to find hidden routing loops on a bridged LAN

Bridged LANs, Routing Loops, and Nftables Log‑Filtering

Bridged LANs are everywhere—from a tiny home lab to a mid‑size office. When a bridge gets a wrong port or a VLAN slips through, packets can start circling forever. The symptoms are subtle: a CPU spike on the bridge, packet loss, and a traffic burst that looks like a DoS. The problem is that the packets never hit a firewall rule that drops them—they just bounce, so you’re left staring at a wall of traffic with no obvious culprit.

[Read More]

When systemd‑resolved stalls: Diagnosing and fixing the 1‑second lookup delay

On a busy host, a 1‑second DNS lookup can feel like a blink, but when it happens on every request, it adds up. In 2026, most distributions ship systemd‑resolved as the default resolver, and the default configuration is usually fine. Yet a handful of real‑world scenarios—high‑traffic web servers, containers, or networks with strict firewall rules—expose a subtle 1‑second delay that can be traced back to systemd‑resolved’s handling of upstream DNS servers.

[Read More]

When /etc/hosts Won’t Resolve: A Quick Systemd‑Resolved Fix

The Symptom

You’re pinging localhost or a custom hostname you added to /etc/hosts and the request hangs or returns “Name or service not known”. The same name resolves fine on another machine, and dig or nslookup against a public DNS server works. The problem is isolated to the local resolver. In most modern distributions this points to a mis‑configured systemd‑resolved service or a stale cache.

Why systemd‑resolved Matters

systemd‑resolved is the default name‑resolution daemon on Fedora, Debian, Ubuntu, Arch, and many other distros since 2015. It replaces the older dnsmasq‑based /etc/resolv.conf approach and offers:

[Read More]

Recovering a Kernel Panic After Adding a New Initramfs Module

Kernel Panic After Adding a New Initramfs Module – How to Recover

Dropping a new module into an initramfs and watching the machine go black is a classic “what‑did‑I‑break‑this” moment. In the real world, the culprit is almost never the module itself; it’s usually a mis‑configured initramfs, a missing dependency, or a kernel‑level feature that got turned off by accident. Below is a practical, step‑by‑step recovery guide that keeps hardening in mind, gives you concrete commands, and explains the trade‑offs you’ll face when rebuilding the initramfs.

[Read More]

Fixing systemd-resolved Ignoring /etc/hosts

Resolving local hostname lookups that fail silently

Ever had a host you added to /etc/hosts just stop answering? I’ve seen this happen after a kernel upgrade or a quick edit that left a stray comment. On Fedora, Debian, and Arch the culprit is almost always the local resolver: systemd‑resolved. It only reads /etc/hosts if the ResolveFile option is enabled and the service is started with --resolve. A tiny mis‑config can silence that hook.


1. Check that systemd‑resolved is actually running

systemctl status systemd-resolved.service

If you see inactive or failed, start it up:

[Read More]

Fixing systemd-resolved Dropping /etc/hosts Entries

When a local service becomes unreachable

systemd‑resolved is the default DNS resolver on most modern distros. It pulls /etc/hosts unless you flip the --no-hosts flag. In 2026 a subtle tweak in its default behaviour started swallowing local hostname lookups, and no one noticed until a service went down.

Why it happens

systemd-resolved now gives the DNS stack a higher priority than the hosts file when you call getaddrinfo(3). If a name shows up in both /etc/hosts and a DNS zone, the DNS answer wins. When the zone is empty or the query times out, it silently falls back to the hosts file. But if the DNS server is unreachable and the hosts entry points to 127.0.0.1 or ::1, the resolver drops that entry and returns ENOTFOUND. The change was meant to stop a compromised DNS server from poisoning local lookups.

[Read More]

Clearing Stale DNS Entries from resolvectl

Fixing resolver caches without restarting NetworkManager

When a host suddenly resolves a domain to an old IP, the first instinct is to restart NetworkManager or reboot the machine. That works, but it’s heavy‑handed and can disrupt services. In a production environment, a brief outage can trigger SLA violations or expose stale data to clients. Below is a concise, hands‑on guide to flushing the systemd‑resolved cache safely, with a focus on security‑aware operators who need minimal downtime.

[Read More]

When ss Shows No Open TCP Ports Even Though Services Are Running

Why ss Might Show No Open TCP Ports Even When Services Are Running

I’ve seen this happen on fresh installs, on servers that have just rebooted, and even on production machines that have been up for months. The symptom is simple: ss -tuln prints nothing, but systemctl status nginx (or whatever daemon you’re checking) says active (running). The mismatch usually boils down to one of three things:

  1. The service is listening on a non‑TCP socket
  2. The service is bound to a Unix domain socket or a local‑only address
  3. The socket is managed by a socket‑activated unit that isn’t yet in use

Below is a quick checklist that will help you zero in on the culprit, plus a few hardening tips that come with each case.

[Read More]

Debugging nftables Dropping HTTP Traffic

A step-by-step port-filter investigation

HTTP is the backbone of most web services. When a client can’t reach a web server, the first instinct is to look at the application logs, DNS, or the network path. A silent drop by nftables is a common, yet often overlooked, culprit. This post walks through a systematic approach to uncovering why nftables is silently discarding HTTP packets, with a focus on the port‑filtering rules that most administrators set up for hardening.

[Read More]