Welcome to ShieldedBytes, where cybersecurity meets clarity. This blog offers practical insights, best practices, and in-depth discussions to help you navigate the ever-evolving digital landscape securely.

Explore topics like data protection, network defense, secure coding, and more—all tailored for professionals seeking reliable, actionable advice.

Start exploring, stay informed, and take control of your digital security.

Detecting and Stopping Rogue DNS Leaks on a VPN with resolvectl and systemd‑resolved

Why DNS leaks matter

A VPN’s promise is simple: keep every packet, DNS included, inside the encrypted tunnel.
When a client still talks to the local resolver or the ISP’s DNS server, the very destination of that query is exposed. Even a single leak can give away browsing habits, slip past content filters, or make a user a target for a phishing or man‑in‑the‑middle attack. Detecting and stopping those leaks is a routine part of hardening any VPN‑based deployment.

[Read More]

Rootless Podman on a Raspberry Pi – Solving the “Cannot Bind Mount /home/user/data” Permission Issue

Rootless Podman on a Raspberry Pi – Solving the “Cannot Bind Mount /home/user/data” Permission Issue
The Raspberry Pi has become a favorite platform for home‑lab enthusiasts, and Podman’s rootless mode lets you run containers without granting the container process full system privileges.
On a Pi running Raspberry OS Bookworm (Debian 12), a common stumbling block is the error

Error: cannot bind mount /home/user/data: permission denied

when you try to persist data with -v /home/user/data:/data.
Below is a step‑by‑step guide that explains why the error happens, how to fix it, and what security trade‑offs you should be aware of.

[Read More]

Finding the Most Frequent Syslog Lines in /var/log/syslog with awk, sort, and head

Why you need it

Syslog is the first place you look when something goes wrong. In a busy server or a home lab, the same message can appear thousands of times a day. Knowing which lines dominate the log helps spot misconfigurations, repeated failures, or malicious activity that repeats silently. A quick frequency count is a low‑overhead sanity check that can turn a noisy log into a focused list of suspects.

[Read More]

Preventing Disk Space Woes on a Home NAS by Configuring Logrotate for Docker Container Logs

Why Docker logs can eat a NAS

A home NAS is usually a single‑disk or a small RAID array.
When you run several containers—media servers, databases, CI runners—each one writes a JSON log file under /var/lib/docker/containers/<id>/<id>-json.log.
If you leave the default json-file driver untouched, those files grow indefinitely.
On a 1 TB NAS, a handful of containers can fill the drive in weeks, forcing you to delete data or upgrade hardware.

[Read More]

When firewalld blocks HTTP traffic even though port 80 is open: the services vs ports trap

Why firewalld blocks HTTP even when port 80 is open

I’ve run Fedora, CentOS, and RHEL for the past two decades, and firewalld is the default manager on those distros. It hides the nitty‑gritty nftables/iptables behind zones, services, and ports. That abstraction is handy, but it can also mask a subtle mismatch that ends up dropping HTTP traffic even though you’ve “opened” port 80. The culprit is almost always a services vs. ports trap.

[Read More]

Stuck in emergency mode after adding an NTFS mount to /etc/fstab: how to fix it

Stuck in emergency mode after adding an NTFS mount to /etc/fstab

Adding a Windows‑style partition to a Linux system is a routine part of dual‑booting or sharing data with a PC.
When the entry in /etc/fstab is off by a single character, the initramfs aborts the boot and you end up in emergency mode.
The message is unmistakable:

Failed to mount /mnt/windows.
Failed to mount all filesystems.
Entering emergency mode.

Below is a quick, practical walk‑through to diagnose and fix the problem—no fluff, just what I do on the spot.

[Read More]

Using ACLs to give a group write access to /var/www/html without changing ownership

Why ACLs instead of changing ownership?

When a web server runs as www-data and the dev squad needs to touch files in /var/www/html, the quick fix is usually chgrp the directory and slap a write bit on the group. That swaps the group ownership, which can trip up services that expect the original group or automated deploy scripts that hard‑code the owner. ACLs let you hand out the right permissions without touching the classic ownership columns.

[Read More]

How to make sudo leave a trace: a single auditd rule and logrotate config

Why a single auditd rule is better than scattered syslog entries

When you run sudo, you’re stepping into privileged territory. Most distros ship a sudo wrapper that dumps a message into syslog. That message can be noisy, hard to sift through, and it doesn’t survive a clean‑up or a reboot. A dedicated auditd rule, on the other hand, captures every sudo invocation in a structured, tamper‑evident format. Couple that with a tiny logrotate config, and you get a reliable audit trail that sticks around long after the machine has been rebooted or the disk wiped.

[Read More]