<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ALS-OPS LLC]]></title><description><![CDATA[Practical Linux server security for small teams: SSH hardening, intrusion detection and VPS checklists from Al's-Ops LLC, maker of Vigilhold.
]]></description><link>https://als-ops.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6b00987cac072aeef49f2586/14c5fd83-367b-4f7a-b196-3ebdea220089.jpg</url><title>ALS-OPS LLC</title><link>https://als-ops.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Dec 2026 01:05:52 GMT</lastBuildDate><atom:link href="https://als-ops.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[osquery on Linux servers: install it, ask useful questions, and trust the answers]]></title><description><![CDATA[Install osquery on Debian, Ubuntu or RHEL, run the security queries worth knowing, avoid answers that come back silently incomplete, and schedule osqueryd.]]></description><link>https://als-ops.hashnode.dev/osquery-on-linux-servers-install-it-ask-useful-questions-and-trust-the-answers</link><guid isPermaLink="true">https://als-ops.hashnode.dev/osquery-on-linux-servers-install-it-ask-useful-questions-and-trust-the-answers</guid><category><![CDATA[Security]]></category><category><![CDATA[Linux]]></category><category><![CDATA[osquery]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 16:00:04 GMT</pubDate><content:encoded><![CDATA[<p>osquery turns a running system into SQL tables. Users, SSH keys, listening ports, processes, packages and sudo rules each become a table you can query and join. It started at Facebook, it's open source, and it runs on Linux, macOS and Windows. For a small team with a few Linux servers it answers the questions an auditor or a customer questionnaire asks (who can log in, what's exposed, what changed) with one query instead of five commands per server.</p>
<p>It has two programs. <code>osqueryi</code> is an interactive shell for asking questions now. <code>osqueryd</code> is a daemon that runs queries on a schedule and logs the results. The two don't talk to each other unless you connect them, which matters later. osquery doesn't block anything or send alerts by itself; it answers questions and writes logs.</p>
<h2>Install it from the official repository</h2>
<p>The osquery project publishes signed packages for x86_64 and arm64 (<a href="https://osquery.readthedocs.io/en/latest/installation/install-linux/">install docs</a>). On Debian and Ubuntu:</p>
<pre><code class="language-bash">sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://pkg.osquery.io/deb/pubkey.gpg | sudo tee /etc/apt/keyrings/osquery.asc &gt;/dev/null
echo "deb [signed-by=/etc/apt/keyrings/osquery.asc] https://pkg.osquery.io/deb deb main" | sudo tee /etc/apt/sources.list.d/osquery.list
sudo apt update &amp;&amp; sudo apt install osquery
</code></pre>
<p>The project's own page uses <code>add-apt-repository</code> for the second step. Writing the file with <code>tee</code> does the same thing and works on minimal Debian installs, where that command isn't present. On RHEL, Rocky, Alma and Fedora:</p>
<pre><code class="language-bash">curl -fsSL https://pkg.osquery.io/rpm/GPG | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-osquery &gt;/dev/null
sudo curl -fsSL -o /etc/yum.repos.d/osquery.repo https://pkg.osquery.io/rpm/osquery-rpm.repo
sudo dnf install osquery
</code></pre>
<p>Check it worked with <code>osqueryi --version</code>. The package installs <code>osqueryi</code>, <code>osqueryd</code> and <code>osqueryctl</code>, example query packs in <code>/opt/osquery/share/osquery/packs/</code>, and a systemd unit. It doesn't start the daemon: you do that once there's a config.</p>
<h2>Ask the questions worth asking</h2>
<p>Start the shell as root with <code>sudo osqueryi</code>. <code>.tables</code> lists every table and <code>.schema authorized_keys</code> shows a table's columns. You can also pass a query as an argument: <code>sudo osqueryi --json "SELECT ..."</code>. Every table and column below is in <a href="https://github.com/osquery/osquery/tree/master/specs">osquery's table specs</a>.</p>
<p>Who has a login shell, and who is in the sudo group (wheel on RHEL):</p>
<pre><code class="language-sql">SELECT username, uid, shell, directory FROM users
WHERE shell NOT LIKE '%nologin' AND shell NOT LIKE '%false';

SELECT u.username, g.groupname FROM users u
JOIN user_groups ug ON ug.uid = u.uid
JOIN groups g ON g.gid = ug.gid
WHERE g.groupname IN ('sudo', 'wheel', 'admin');
</code></pre>
<p>Every SSH key on every account. Note the join with <code>users</code>; the next section explains why you can't leave it out:</p>
<pre><code class="language-sql">SELECT u.username, k.key_file, k.algorithm, k.comment
FROM users u JOIN authorized_keys k USING (uid);
</code></pre>
<p>This shows which keys exist, not when each was last used. For that, match each key's fingerprint against the login log (<a href="https://alsopss.com/blog/ssh-authorized-keys-audit">authorized_keys audit</a>).</p>
<p>What is listening on anything other than loopback, and which program owns it:</p>
<pre><code class="language-sql">SELECT l.port, l.protocol, l.address, p.name, p.path
FROM listening_ports l JOIN processes p USING (pid)
WHERE l.address NOT IN ('127.0.0.1', '::1') AND l.port != 0;
</code></pre>
<p><code>protocol</code> is a number: 6 is TCP and 17 is UDP. An address of <code>0.0.0.0</code> or <code>::</code> means every interface.</p>
<p>Sudo rules, setuid binaries, running programs whose file has been deleted, and the installed version of the packages you care about:</p>
<pre><code class="language-sql">SELECT source, header, rule_details FROM sudoers;

SELECT path, username, permissions FROM suid_bin;

SELECT pid, name, cmdline FROM processes WHERE on_disk = 0;

SELECT name, version FROM deb_packages WHERE name IN ('openssh-server', 'sudo');
-- RHEL: SELECT name, version, release FROM rpm_packages WHERE name IN ('openssh-server', 'sudo');
</code></pre>
<p>A process with <code>on_disk = 0</code> is running from a file that no longer exists. That happens legitimately for a while after a package upgrade, until the service restarts, but malware that deletes itself after starting looks the same. Check the name and command line before you worry.</p>
<h2>When an empty answer is wrong</h2>
<p>osquery answers with what it could read. Three things make it return less than the truth without failing the query.</p>
<p><strong>Per-user tables.</strong> <code>authorized_keys</code> and <code>shell_history</code> read only the current user's files unless you join <code>users</code> (<a href="https://github.com/osquery/osquery/blob/master/specs/posix/authorized_keys.table">table spec</a>). <code>SELECT * FROM authorized_keys</code> run as root returns root's keys only, with a warning that the table "returns data based on the current user by default, consider JOINing against the users table". In the shell you see the warning. In a scheduled query it goes to a log nobody reads. Always join <code>users</code>.</p>
<p><strong>Not running as root.</strong> An ordinary user can't read other users' home directories or follow <code>/proc/&lt;pid&gt;/exe</code> for their processes, so keys, paths and process owners go missing. The daemon runs as root under systemd. The shell runs as whoever starts it.</p>
<p><strong>Event tables.</strong> Tables ending in <code>_events</code> (<code>process_events</code>, <code>file_events</code>, <code>socket_events</code>) are off by default and stay empty until you enable events with <code>--disable_events=false</code> and the specific source (<a href="https://osquery.readthedocs.io/en/latest/installation/cli-flags/">flags</a>). On busy servers the osquery docs also recommend masking <code>systemd-journald-audit.socket</code>. Start with the state tables above, which need none of this.</p>
<h2>Keep the answers with osqueryd</h2>
<p>Asking once tells you about today. The daemon asks on a schedule and writes results to <code>/var/log/osquery/</code>. Put this in <code>/etc/osquery/osquery.conf</code> (<a href="https://osquery.readthedocs.io/en/latest/deployment/configuration/">configuration docs</a>):</p>
<pre><code class="language-json">{
  "options": {
    "host_identifier": "hostname",
    "schedule_splay_percent": 10
  },
  "schedule": {
    "listening_ports": {
      "query": "SELECT l.port, l.protocol, l.address, p.name, p.path FROM listening_ports l JOIN processes p USING (pid) WHERE l.address NOT IN ('127.0.0.1', '::1') AND l.port != 0;",
      "interval": 300
    },
    "suid_bin": {
      "query": "SELECT path, username, permissions FROM suid_bin;",
      "interval": 3600
    },
    "ssh_keys_daily": {
      "query": "SELECT u.username, k.key_file, k.algorithm, k.comment FROM users u JOIN authorized_keys k USING (uid);",
      "interval": 86400,
      "snapshot": true
    },
    "sudoers_daily": {
      "query": "SELECT source, header, rule_details FROM sudoers;",
      "interval": 86400,
      "snapshot": true
    }
  }
}
</code></pre>
<p>By default a query is differential: the first run logs every row as "added", and later runs log only rows added or removed since the run before, in <code>osqueryd.results.log</code>. A new key or a newly opened port shows up as one line. With <code>"snapshot": true</code> the full result is written every time, to <code>osqueryd.snapshots.log</code> (<a href="https://osquery.readthedocs.io/en/latest/deployment/logging/">logging docs</a>). A daily snapshot of SSH keys and sudo rules is a record of who had access on each day, which is the kind of evidence an access review asks for.</p>
<p>Check the config parses, then start the daemon:</p>
<pre><code class="language-bash">sudo osqueryd --config_check --config_path /etc/osquery/osquery.conf &amp;&amp; echo config OK
sudo systemctl enable --now osqueryd
systemctl status osqueryd --no-pager
</code></pre>
<p>The scheduler runs each query when the clock reaches a multiple of its interval (plus the splay), not at start-up, so the first <code>listening_ports</code> rows appear within about five minutes and the daily snapshots can take up to a day. To see results sooner while testing, give a query a short interval and change it back afterwards.</p>
<pre><code class="language-bash">sudo tail -n 3 /var/log/osquery/osqueryd.results.log
sudo ls -l /var/log/osquery/
</code></pre>
<h2>Check the schedule is really running</h2>
<p><code>osqueryd</code> runs queries in a worker process watched by a watchdog. By default the worker may use 200 MB of memory and 10% CPU (sustained for 12 seconds). If a query pushes it over, the watchdog restarts the worker and denylists that query for 24 hours (<a href="https://osquery.readthedocs.io/en/latest/deployment/debugging/">debugging docs</a>). The query simply stops producing results, which looks exactly like nothing changing. The Debian package's systemd unit also caps the service at <code>CPUQuota=20%</code>.</p>
<p>Look for the watchdog in the status log:</p>
<pre><code class="language-bash">sudo grep -h 'stopping:' /var/log/osquery/osqueryd.INFO
</code></pre>
<p>Lines such as "osqueryd worker (8368) stopping: Memory limits exceeded" mean a query was too heavy. Then ask the daemon itself which queries ran. Because <code>osqueryi</code> and <code>osqueryd</code> don't share state, connect the shell to the daemon's socket first:</p>
<pre><code>sudo osqueryi
osquery&gt; .connect /var/osquery/osquery.em
[*]osquery&gt; SELECT name, executions, last_executed, denylisted FROM osquery_schedule;
</code></pre>
<p>Every query should have <code>executions</code> above zero and <code>denylisted</code> 0. A denylisted query needs to be made cheaper (fewer columns, a WHERE clause, a longer interval) before it will run again.</p>
<h2>Where osquery fits</h2>
<p>osquery tells you what the system looks like each time it asks. It doesn't record who ran a command between two runs, and it doesn't compare file contents against a known-good copy. <a href="https://alsopss.com/blog/auditd">auditd</a> records who did what, and <a href="https://alsopss.com/blog/aide-file-integrity-monitoring">AIDE</a> tells you which files changed. Together the three cover state, actions and file changes on one server.</p>
<p>Across many servers, the logs have to leave each machine and someone has to read them: ship the results to a log system you already run, or use a fleet manager. osquery's README lists several (Fleet is the best known) and says the project doesn't endorse or test them.</p>
<h2>The short version</h2>
<table>
<thead>
<tr>
<th>Step</th>
<th>Check it worked</th>
</tr>
</thead>
<tbody><tr>
<td>Install from pkg.osquery.io</td>
<td><code>osqueryi --version</code> prints a version</td>
</tr>
<tr>
<td>Ask questions as root</td>
<td><code>sudo osqueryi</code>; keys and paths for every user appear</td>
</tr>
<tr>
<td>Join users for per-user tables</td>
<td>No "consider JOINing against the users table" warning</td>
</tr>
<tr>
<td>Schedule queries in osquery.conf</td>
<td><code>osqueryd --config_check</code> passes; rows appear in <code>/var/log/osquery/</code></td>
</tr>
<tr>
<td>Snapshot keys and sudo rules daily</td>
<td><code>osqueryd.snapshots.log</code> has one entry per day</td>
</tr>
<tr>
<td>Watch the watchdog</td>
<td><code>osquery_schedule</code> shows executions above 0 and denylisted 0</td>
</tr>
</tbody></table>
<p>A query that returns nothing is only good news if osquery could see everything. Run it as root, join users, and check the schedule.</p>
<p><em>Originally published at <a href="https://alsopss.com/blog/osquery-linux">alsopss.com</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[A wrong listing is a product bug]]></title><description><![CDATA[Public directories still said Watch Cortex, immune system, and Linux-only. We treated that as a product bug and fixed the copy.]]></description><link>https://als-ops.hashnode.dev/a-wrong-listing-is-a-product-bug</link><guid isPermaLink="true">https://als-ops.hashnode.dev/a-wrong-listing-is-a-product-bug</guid><category><![CDATA[infrastructure]]></category><category><![CDATA[Security]]></category><category><![CDATA[engineering]]></category><category><![CDATA[utah]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:55:03 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>Editor's note (2026-10-11): the product referred to as "Watch" below has since been renamed Vigilhold. This post is left as written — see vigilhold.com for current naming, platforms, and pricing. Today Vigilhold runs on Linux servers, including Docker hosts; Windows and Kubernetes agents are not available.</p>
</blockquote>
<p>It is easy to leave a directory page alone once it ranks.</p>
<p>The title can stay compound. The tags can stay generous. The platforms can stay whatever was true on the day the form was first submitted. Nobody on the outside can see that the agent now installs on Windows, or that the public name is not the engine name.</p>
<p>That drift is not neutral. A stranger who lands on the wrong nouns will bounce for the right reasons.</p>
<blockquote>
<p>We treated the listing as a product surface and rewrote it.</p>
</blockquote>
<p>AL'S-OPS LLC is a Utah company building privacy-first infrastructure software.</p>
<h2>What changed</h2>
<ul>
<li>Public product name is Watch. Cortex stays the on-host engine only.</li>
<li>Platforms listed only where an install exists: Linux servers, including Docker hosts.</li>
<li>Tags cut to what an operator can point at on a host. Backups, uptime, SOC 2, and "autonomous security" came off.</li>
<li>Application type reduced to the least wrong box. We are not a log platform and not antivirus.</li>
<li>Company specialties dropped agency costume: e-commerce, gaming, MLOps, digital transformation.</li>
</ul>
<h2>The real problem</h2>
<p>Directory forms reward completeness. Empty checkboxes feel like missing features. So the page accumulates nouns that were never the product: immune system, hive, fleet theater, a smartwatch collision on the word Watch.</p>
<p>The failure mode is quiet. The install still works. The agent still runs. The public record is just wrong. Trust leaks from the gap between the box and the copy.</p>
<h2>What we are not doing</h2>
<ul>
<li>Not calling the engine the product</li>
<li>Not listing platforms that are not installable yet</li>
<li>Not keeping specialties that would confuse a stranger</li>
<li>Not publishing counts from our own hosts as proof</li>
</ul>
<blockquote>
<p>A public listing is part of the product. If the nouns are wrong, the page is broken. Fix the page.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/a-wrong-listing-is-a-product-bug">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Vigilhold is on Peerlist: what it is and who it’s for]]></title><description><![CDATA[Vigilhold, a host agent for Linux servers from Al’s-Ops LLC, is now on Peerlist. What it watches, who it’s for, pricing, and how to try it first.]]></description><link>https://als-ops.hashnode.dev/vigilhold-is-on-peerlist-what-it-is-and-who-its-for</link><guid isPermaLink="true">https://als-ops.hashnode.dev/vigilhold-is-on-peerlist-what-it-is-and-who-its-for</guid><category><![CDATA[Company]]></category><category><![CDATA[Security]]></category><category><![CDATA[Linux]]></category><category><![CDATA[utah]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:50:04 GMT</pubDate><content:encoded><![CDATA[<p>Vigilhold, our host agent for Linux servers, is now listed on Peerlist. If you have an account there, the project page is the best place to ask questions or tell us what’s missing. <a href="https://peerlist.io/alsopss/project/vigilhold">Vigilhold on Peerlist</a></p>
<h2>The problem it’s for</h2>
<p>Every server on the internet is attacked around the clock. Our own lab server sees about 1,600 login attempts a day. Most small teams running their own servers have no one whose job is to watch for this.</p>
<p>The tools they usually reach for have two habits that hurt. Some fail quietly: a log format change can stop fail2ban matching anything while it still reports “running, zero bans”, which looks exactly like a quiet week. Others are built for a security team, with a server to run, rules to tune and more alerts than one person can read. <a href="https://alsopss.com/blog/fail2ban-alternatives">Fail2ban and its alternatives</a></p>
<h2>What Vigilhold does</h2>
<p>It’s a small security agent you install on each server, and one web console that watches all of them.</p>
<ul>
<li>Watches who logs in, what runs, what connects and what changes on disk.</li>
<li>Tells you what happened in plain language. Critical and warning alerts come with two sentences: what happened, and why it matters.</li>
<li>Groups repeats from the same attack, and doesn’t send a repeat again within the cooldown (30 minutes by default).</li>
<li>When a response playbook bans an address, the ban goes to every server in your account. Servers that were offline pick it up when they reconnect.</li>
<li>Warns you if a server with SSH open to the internet stops reporting login activity for three hours, which is how a logging change that blinds your tools usually shows up.</li>
<li>Keeps enforcing the last-synced policy if it can’t reach the console, and records what it did.</li>
</ul>
<h2>What it won’t do without asking</h2>
<p>Automatic responses that take servers down are a real risk, so new accounts start in Assist mode. Temporary IP bans run on their own. Anything disruptive, like killing a process or isolating or locking down a server, waits for your one-click approval. Observe mode asks approval for everything and records what Vigilhold would have done; Autopilot runs further on its own. Every action is logged and reversible.</p>
<blockquote>
<p>Vigilhold does the watching and asks before anything disruptive.</p>
</blockquote>
<h2>Who it’s for</h2>
<p>Small teams that run their own Linux servers and have no one whose job is security.</p>
<p>It runs on Ubuntu, Debian, RHEL-compatible systems (Rocky, Alma), Amazon Linux 2023, Arch and Alpine, including Docker hosts. Installing takes one command per server and under a minute. Windows agents and Kubernetes deployment are not available yet, so if most of your fleet is either, it isn’t a fit today.</p>
<h2>What it costs</h2>
<ul>
<li>Developer: $39 a month for up to 5 servers.</li>
<li>Business: $149 a month for up to 25 servers, with operator-configured response actions, CVE scanning and compliance reports.</li>
<li>Enterprise: custom pricing for unlimited servers, SSO and dedicated support.</li>
</ul>
<p>Every plan starts with a 14-day trial, no credit card. The Business plan’s compliance reports map host controls to CIS, SOC 2, PCI-DSS v4, HIPAA and ISO 27001, which gives your auditor evidence. They are not a certification.</p>
<h2>Try it before you sign up</h2>
<p>The live lab shows a real server under attack, with no login. If you’d rather start smaller, our free tools check your SSH settings and explain the ports your server has open, and both run in your browser. <a href="https://vigilhold.com/lab">Vigilhold live lab</a> <a href="https://alsopss.com/tools/ssh-config-checker">SSH config checker</a> <a href="https://alsopss.com/tools/open-ports-explainer">Open ports explainer</a></p>
<p>Comparing options? We wrote honest comparisons with the tools people already use, including when to pick them instead. <a href="https://alsopss.com/compare">Vigilhold vs fail2ban, CrowdSec and Wazuh</a></p>
<h2>Tell us what’s missing</h2>
<p>We’re a small, independent company in Utah, and feedback from people who run servers shapes what we build next. Leave a comment on Peerlist, email <a href="mailto:support@vigilhold.com">support@vigilhold.com</a> with product questions, or <a href="mailto:sales@alsopss.com">sales@alsopss.com</a> about plans for a larger fleet. <a href="https://peerlist.io/alsopss/project/vigilhold">Comment on Peerlist</a> <a href="https://vigilhold.com/register">Start a 14-day trial</a></p>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/vigilhold-on-peerlist">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Wazuh alternatives for small teams running Linux servers]]></title><description><![CDATA[Wazuh alternatives for teams with a few Linux servers: OSSEC, Security Onion, Elastic, Graylog, CrowdSec, osquery and hosted options, with real…]]></description><link>https://als-ops.hashnode.dev/wazuh-alternatives-for-small-teams-running-linux-servers</link><guid isPermaLink="true">https://als-ops.hashnode.dev/wazuh-alternatives-for-small-teams-running-linux-servers</guid><category><![CDATA[Security]]></category><category><![CDATA[Linux]]></category><category><![CDATA[guide]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:45:03 GMT</pubDate><content:encoded><![CDATA[<p>Wazuh is the usual answer when someone asks for free host security on Linux, and for good reason: it covers log analysis, file integrity, configuration checks and vulnerability detection, and it costs nothing to download. What it does cost is a server of its own. The quickstart puts the Wazuh server, indexer and dashboard on one machine and recommends 4 vCPU, 8 GiB of RAM and 50 GB of disk for up to 25 agents. For a team with six servers, that is a seventh server to run, patch and keep from filling its disk. <a href="https://documentation.wazuh.com/current/quickstart.html">Wazuh quickstart requirements</a></p>
<p>So the useful question is which part of Wazuh you actually need. Here are the realistic alternatives for a small team, with each one’s own published requirements and prices, checked in November 2026.</p>
<h2>The short answer</h2>
<ul>
<li>Same kind of host detection, lighter, and you’re happy on the command line: OSSEC.</li>
<li>You already ship logs somewhere and want detection rules on top: Graylog or OpenSearch Security Analytics.</li>
<li>You already run the Elastic stack: Elastic Security with Elastic Defend.</li>
<li>You also want to watch network traffic and have hardware to spare: Security Onion.</li>
<li>You want to ask questions of every server (what is listening, who has keys): osquery with Fleet.</li>
<li>You mainly want to stop brute-force logins: CrowdSec. It blocks attackers; it is not a full host IDS.</li>
<li>You don’t want to run a server at all: a hosted option, such as Wazuh Cloud or Vigilhold.</li>
</ul>
<h2>Side by side</h2>
<table>
<thead>
<tr>
<th>Tool</th>
<th>What you run</th>
<th>Smallest published footprint</th>
<th>Price</th>
</tr>
</thead>
<tbody><tr>
<td>Wazuh</td>
<td>Agents plus server, indexer and dashboard</td>
<td>4 vCPU, 8 GiB RAM, 50 GB disk for up to 25 agents</td>
<td>Free; Wazuh Cloud from $571/month for up to 100 agents</td>
</tr>
<tr>
<td>OSSEC</td>
<td>Agents plus a manager on Linux</td>
<td>Not published</td>
<td>Free (GPLv2)</td>
</tr>
<tr>
<td>Security Onion</td>
<td>A full stack including Suricata, Zeek and Elasticsearch</td>
<td>Standalone: 4 cores, 24 GB RAM, 200 GB disk, 2 NICs</td>
<td>Free</td>
</tr>
<tr>
<td>Elastic Security</td>
<td>Elasticsearch, Kibana and Fleet Server, or Elastic Cloud</td>
<td>Not published</td>
<td>Free Basic tier; Serverless billed per GB ingested</td>
</tr>
<tr>
<td>Graylog</td>
<td>Graylog, MongoDB and a Data Node</td>
<td>Two servers in the smallest documented layout</td>
<td>Graylog Open free; paid editions from $15,000</td>
</tr>
<tr>
<td>CrowdSec</td>
<td>Security Engine and bouncers; hosted console</td>
<td>Not published</td>
<td>Free (MIT); Premium price not published</td>
</tr>
<tr>
<td>osquery + Fleet</td>
<td>Fleet with MySQL and Redis, or Fleet’s cloud</td>
<td>Not published</td>
<td>Free self-hosted; paid tier per host</td>
</tr>
<tr>
<td>OpenSearch Security Analytics</td>
<td>An OpenSearch cluster, Dashboards and a log shipper</td>
<td>Not published</td>
<td>Free (Apache 2.0)</td>
</tr>
<tr>
<td>Vigilhold</td>
<td>One agent per server; hosted console</td>
<td>One install command per host</td>
<td>$39/month for up to 5 servers; $149 for up to 25</td>
</tr>
</tbody></table>
<h2>OSSEC</h2>
<p>OSSEC is the project Wazuh grew out of, and it is still released: 4.5.0 came out on 19 November 2026. It does log analysis, file integrity monitoring, rootkit checks and active response, with agents reporting to a manager over UDP port 1514. The catch for a small team is the interface. The old OSSEC web UI is marked unmaintained and deprecated, so day to day you read alerts by email or in log files, or you ship them to something else to look at. <a href="https://github.com/ossec/ossec-hids/releases">OSSEC releases</a> <a href="https://github.com/ossec/ossec-wui">ossec-wui status</a></p>
<h2>Security Onion</h2>
<p>Security Onion is a free platform for network security monitoring, threat hunting and log management, built on Suricata, Zeek and the Elastic stack. It is excellent at what it is for, which is watching traffic from a TAP or SPAN port. That makes it a poor fit for rented VPS and cloud servers, where you usually can’t put a sensor on the network. Its own minimum for a production Standalone install is 4 cores, 24 GB of RAM, 200 GB of disk and two network cards, on x86-64 only, and the docs call those the absolute bare minimum. <a href="https://docs.securityonion.net/en/3/main/hardware/">Security Onion hardware requirements</a></p>
<h2>Elastic Security with Elastic Defend</h2>
<p>If you already run Elasticsearch, Elastic Security adds SIEM rules, and Elastic Defend adds endpoint protection through Elastic Agent, including on Linux. The free self-managed tier includes Defend’s malware prevention; behaviour and ransomware protection and host isolation need a paid subscription, which Elastic prices through sales. Elastic Cloud Serverless is billed by data ingested and retained rather than per endpoint. Self-managed, you run Elasticsearch, Kibana and Fleet Server yourself. <a href="https://www.elastic.co/pricing/serverless-security">Elastic Serverless Security pricing</a> <a href="https://www.elastic.co/docs/reference/integrations/endpoint">Elastic Defend</a></p>
<h2>Graylog and OpenSearch Security Analytics</h2>
<p>These are log platforms with detection on top, not host agents: you still need something on each server to send logs. Graylog Open is free; Graylog Security, which adds Sigma and MITRE-mapped rules, is a paid edition. Its smallest documented layout uses two servers and, by Graylog’s own description, lacks fault tolerance, so ingestion stops if either goes down. OpenSearch Security Analytics is a free plugin that runs Sigma rules over logs in an OpenSearch cluster. <a href="https://graylog.org/pricing/">Graylog pricing</a> <a href="https://docs.opensearch.org/latest/security-analytics/">OpenSearch Security Analytics</a></p>
<h2>CrowdSec</h2>
<p>CrowdSec reads logs and HTTP requests, detects attack patterns such as brute-force logins and scans, and blocks the source through bouncers in the firewall or a proxy, helped by a shared blocklist. It is free and MIT-licensed, with a hosted console. It doesn’t check file integrity or look for rootkits, so it replaces fail2ban more than it replaces Wazuh. Many teams run it alongside a host IDS. <a href="https://docs.crowdsec.net/docs/intro">CrowdSec docs</a> <a href="https://alsopss.com/blog/fail2ban-alternatives">CrowdSec vs fail2ban</a></p>
<h2>osquery with Fleet</h2>
<p>osquery turns each server into a set of SQL tables: listening ports, users, SSH keys, packages, running processes. Fleet manages osquery across machines and lets you schedule queries and alert on the answers. It is a superb tool for asking questions of a fleet, but you write the questions, so it suits teams that already know what they want to watch. Self-hosted Fleet needs MySQL and Redis alongside it. <a href="https://github.com/osquery/osquery">osquery</a> <a href="https://fleetdm.com/docs/deploy/reference-architectures">Fleet deployment requirements</a></p>
<h2>Hosted: Wazuh Cloud and Vigilhold</h2>
<p>If the server is the problem, someone else can run it. Wazuh Cloud starts at $571 a month for up to 100 agents, which is good value at 60 servers and a lot at six. Vigilhold, which we make, is a host agent for Linux servers with one hosted console. It watches process, network, file and SSH signals on each server, and in its default Assist mode temporary IP bans run on their own while anything disruptive waits for one-click approval. It costs $39 a month for up to five servers. It is closed source and Linux only, so if you need Windows agents or a full SIEM, Wazuh remains the better pick. <a href="https://wazuh.com/cloud/">Wazuh Cloud pricing</a> <a href="https://alsopss.com/compare/wazuh">Vigilhold vs Wazuh in detail</a></p>
<h2>How to choose</h2>
<ol>
<li>List what you need to see: logins, new processes, listening ports, file changes, network traffic. Most small teams need the first four on every server and the fifth rarely.</li>
<li>Count who will run it. A self-hosted stack is free to download, but someone has to patch it, size its disk and notice when it stops.</li>
<li>Price the server too. A 4 vCPU, 8 GiB machine for the Wazuh stack costs money every month, the same as a subscription.</li>
<li>Test it before you trust it: fail some SSH logins, open a port, change a file in /etc/cron.d, and confirm an alert reaches a person.</li>
</ol>
<p>Whatever you pick, the check at the end matters most. Our HIDS guide has a short test you can run on any of these tools. <a href="https://alsopss.com/blog/host-based-intrusion-detection-system">Host-based intrusion detection, explained</a></p>
<blockquote>
<p>The best free security tool is the one someone on your team will keep running.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/wazuh-alternatives">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[server-check: check SSH settings and open ports from the command line]]></title><description><![CDATA[server-check is a free, open-source CLI that checks a Linux server’s SSH settings and open ports and explains what to fix. One command, nothing sent…]]></description><link>https://als-ops.hashnode.dev/server-check-check-ssh-settings-and-open-ports-from-the-command-line</link><guid isPermaLink="true">https://als-ops.hashnode.dev/server-check-check-ssh-settings-and-open-ports-from-the-command-line</guid><category><![CDATA[Security]]></category><category><![CDATA[Linux]]></category><category><![CDATA[tools]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:42:09 GMT</pubDate><content:encoded><![CDATA[<p>Most server hardening advice ends with “now check your config”. Checking means reading sshd_config, remembering that files in sshd_config.d can override it, knowing which defaults apply to settings nobody wrote down, and then running ss and working out what each port is. It’s easy to skip, so it gets skipped.</p>
<p>server-check does that part. It reads the settings sshd actually uses and the ports that are actually listening, then lists what to fix in plain English, with the line to fix it. It’s free, MIT licensed, and the source is on GitHub. <a href="https://github.com/ALSOPSS/server-check">server-check on GitHub</a> <a href="https://www.npmjs.com/package/alsops-server-check">alsops-server-check on npm</a></p>
<h2>Run it</h2>
<p>You need Node.js 18 or newer on the server. Run it with sudo, because sshd -T only works as root and ss shows program names only to root:</p>
<pre><code>sudo npx alsops-server-check
</code></pre>
<p>If Node came from nvm, sudo won’t find npx (“sudo: npx: command not found”), because root’s PATH doesn’t include your nvm folder. Pass your PATH through:</p>
<pre><code>sudo env PATH="$PATH" npx alsops-server-check
</code></pre>
<p>It reads two things: the output of sshd -T, which is the final configuration after every include and default, and the output of ss -tulpn (or netstat -tulpn where ss is missing). Nothing is sent anywhere, and it changes nothing on the server.</p>
<h2>What the report looks like</h2>
<p>This is part of the report for a typical new VPS: root login and passwords still on, an older key exchange list, and Redis listening on every interface.</p>
<pre><code>SSH settings
  [HIGH] Root can log in over SSH
    PermitRootLogin is yes. Attackers try "root" first, and a root login skips the audit trail of sudo.
    Fix: PermitRootLogin no
  [HIGH] Password logins are allowed
    PasswordAuthentication is yes. Internet-facing servers get password-guessing attempts within minutes of going online.
    Fix: PasswordAuthentication no
  [MEDIUM] No post-quantum key exchange
    Neither mlkem768x25519-sha256 nor sntrup761x25519-sha512 is offered, ...
    Fix: KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,curve25519-sha256

  Put the fixes in /etc/ssh/sshd_config.d/00-hardening.conf, then run: sudo sshd -t &amp;&amp; sudo systemctl reload ssh

Listening ports
  [CRITICAL] 6379/tcp Redis (redis-server) on 0.0.0.0
    Redis open to the internet is routinely taken over to install cryptominers, especially without a password.
    Open on every network interface, so reachable from the internet unless a firewall blocks it.
    Fix: Set bind 127.0.0.1 -::1 and protected-mode yes in redis.conf, and set a password.
  [OK] 5432/tcp PostgreSQL (postgres) on 127.0.0.1
</code></pre>
<p>Each finding has a severity, a reason in one or two sentences and a fix. SSH fixes are sshd_config lines, collected so you can put them in one drop-in file and test them with sshd -t before reloading. Keep your current session open until a new login works.</p>
<h2>What it checks</h2>
<table>
<thead>
<tr>
<th>Area</th>
<th>Checks</th>
</tr>
</thead>
<tbody><tr>
<td>SSH logins</td>
<td>Root login, password and keyboard-interactive logins, including passwords that still get through PAM, and whether AllowUsers or AllowGroups limit who can log in</td>
</tr>
<tr>
<td>SSH crypto</td>
<td>Weak ciphers, MACs and key exchange, SHA-1 and DSA signatures, and missing post-quantum key exchange (mlkem768x25519-sha256 or sntrup761x25519-sha512)</td>
</tr>
<tr>
<td>SSH extras</td>
<td>Agent, TCP and X11 forwarding, MaxAuthTries and LoginGraceTime</td>
</tr>
<tr>
<td>Ports</td>
<td>What each listening port is (about 70 common services, matched by port and program name) and whether it’s open on a public interface</td>
</tr>
<tr>
<td>Risky services</td>
<td>Databases, Redis, Memcached, Elasticsearch, the Docker API, CUPS and similar services listening on 0.0.0.0, and published Docker ports that skip UFW</td>
</tr>
</tbody></table>
<p>The SSH checks follow current OpenSSH guidance. For the reasoning behind each setting, the SSH hardening guide goes through them one by one. <a href="https://alsopss.com/blog/ssh-hardening">SSH hardening guide</a></p>
<h2>Use it in scripts and CI</h2>
<p>server-check exits with code 2 when it finds anything critical or high, and 0 otherwise, so a provisioning script or a CI job can fail on it. --json prints the findings as JSON for anything that wants to read them:</p>
<pre><code>sudo env PATH="$PATH" npx alsops-server-check --json &gt; report.json
echo $?   # 2 if something critical or high was found
</code></pre>
<table>
<thead>
<tr>
<th>Option</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td>--json</td>
<td>Machine-readable output</td>
</tr>
<tr>
<td>--ssh-only</td>
<td>Only check SSH</td>
</tr>
<tr>
<td>--ports-only</td>
<td>Only check listening ports</td>
</tr>
<tr>
<td>--no-color</td>
<td>Plain text (it also honours NO_COLOR)</td>
</tr>
</tbody></table>
<h2>What it doesn’t do</h2>
<p>“Reachable” means open on a public interface. A cloud firewall or security group may still block the port, and server-check can’t see that from inside the server. Test from another machine with nc -zv   to be sure.</p>
<p>It checks global sshd settings only, not Match blocks, so a Match block that turns passwords back on for one user or network won’t show up. And it’s a one-time check: it tells you about today, not about the login that happens tonight.</p>
<h2>No terminal handy?</h2>
<p>The same checks run in your browser. Paste sshd -T output into the SSH config checker, or ss -tulpn output into the open ports explainer. Nothing you paste leaves the page. <a href="https://alsopss.com/tools/ssh-config-checker">SSH config checker</a> <a href="https://alsopss.com/tools/open-ports-explainer">Open ports explainer</a></p>
<p>For around-the-clock watching instead of a one-time check, Vigilhold, our host agent for Linux servers, watches SSH, processes, network connections and file changes on every server from one console. There’s a 14-day trial with no card. <a href="https://alsopss.com/products">See Vigilhold</a></p>
<h2>The short version</h2>
<table>
<thead>
<tr>
<th>Step</th>
<th>Command</th>
</tr>
</thead>
<tbody><tr>
<td>Run the check</td>
<td>sudo npx alsops-server-check</td>
</tr>
<tr>
<td>Node from nvm</td>
<td>sudo env PATH="$PATH" npx alsops-server-check</td>
</tr>
<tr>
<td>Apply SSH fixes</td>
<td>Put them in /etc/ssh/sshd_config.d/00-hardening.conf, then sudo sshd -t &amp;&amp; sudo systemctl reload ssh</td>
</tr>
<tr>
<td>Confirm a port is closed</td>
<td>nc -zv   from another machine</td>
</tr>
<tr>
<td>Fail a CI job on findings</td>
<td>Exit code 2 means critical or high</td>
</tr>
</tbody></table>
<blockquote>
<p>server-check is open source. Read the code, file an issue, or send a fix on GitHub.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/server-check-cli">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[SSH authorized_keys: find out who can still log in]]></title><description><![CDATA[Audit SSH authorized_keys on Linux: list every key, see when each last logged in from the journal, remove unused keys safely and restrict the ones you…]]></description><link>https://als-ops.hashnode.dev/ssh-authorizedkeys-find-out-who-can-still-log-in</link><guid isPermaLink="true">https://als-ops.hashnode.dev/ssh-authorizedkeys-find-out-who-can-still-log-in</guid><category><![CDATA[Security]]></category><category><![CDATA[Linux]]></category><category><![CDATA[guide]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:25:03 GMT</pubDate><content:encoded><![CDATA[<p>A password gets changed when someone leaves. A key in authorized_keys usually doesn’t. It keeps working until someone deletes the line, and most servers collect them: the key the hosting panel added at creation, a contractor’s laptop from last year, a CI key for a pipeline that no longer exists. Each one is a standing login, and nothing in SSH reminds you it’s there.</p>
<p>This guide lists every key on a server, uses the login log to show when each one was last used, and then covers removing keys safely and restricting the ones you keep. The commands were tested on Debian 13 with OpenSSH 10.0 and work the same on Ubuntu and RHEL-family servers. Run them as root, since you need to read every user’s home directory.</p>
<h2>Check where sshd looks for keys</h2>
<p>Don’t assume ~/.ssh/authorized_keys is the only file. If AuthorizedKeysFile isn’t set, sshd reads both ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2, and a key hidden in the second file is easy to miss. Ask sshd what it actually uses: <a href="https://man.openbsd.org/sshd#AUTHORIZED_KEYS_FILE_FORMAT">sshd(8): AUTHORIZED_KEYS FILE FORMAT</a></p>
<pre><code>sudo sshd -T | grep -iE "^(authorizedkeysfile|authorizedkeyscommand|trustedusercakeys) "
</code></pre>
<p>On a stock Debian 13 server this prints “.ssh/authorized_keys .ssh/authorized_keys2”, “authorizedkeyscommand none” and “trustedusercakeys none”. If AuthorizedKeysCommand is set, keys also come from a program (often a cloud agent or a directory service), and the files are only part of the answer. If TrustedUserCAKeys is set, anyone with a certificate signed by that CA can log in without a line in any file. If you want only the first file, set AuthorizedKeysFile .ssh/authorized_keys in a drop-in; the SSH hardening guide explains how drop-ins are read. <a href="https://alsopss.com/blog/ssh-hardening">SSH hardening: how sshd reads its config</a></p>
<h2>List every key on the server</h2>
<p>ssh-keygen -l prints the fingerprint of every key in a file, one line each, and ignores comment lines and key options. That fingerprint is the same SHA256 string sshd writes to the log when the key is used, which is what makes the next step possible.</p>
<pre><code>sudo ssh-keygen -lf /root/.ssh/authorized_keys

256 SHA256:FdCznNceNcN09wFK6NmsH9j6x7sR3Jawo+xTQucmEk8 alice@laptop (ED25519)
3072 SHA256:7wgJz011Qk6oUE84Qhj7mCC2U3zMFikDrHULEZTRME4 old-deploy (RSA)
</code></pre>
<p>Check every account, not just yours and root. Service accounts and old users with a home directory are where forgotten keys live:</p>
<pre><code>getent passwd | cut -d: -f1,6 | while IFS=: read -r user home; do
  ls "$home"/.ssh/authorized_keys* 2&gt;/dev/null
done
</code></pre>
<p>Don’t trust the comment at the end of each line. The man page says plainly that it “is not used for anything”: anyone who can write to the file can label a key alice@laptop. The fingerprint is the identity. The comment is a hint.</p>
<p>On cloud servers, expect a key in root’s file that you didn’t add. cloud-init writes the provider’s key to both the default user and root, and by default prefixes root’s copy with a command that prints “Please login as the user … rather than the user root” and exits. That key can’t open a shell as root, but it’s still worth knowing why it’s there. Look at the options at the start of the line to tell: <a href="https://github.com/canonical/cloud-init/blob/main/doc/examples/cloud-config.txt">cloud-init: disable_root_opts</a></p>
<pre><code>sudo cut -c1-120 /root/.ssh/authorized_keys
</code></pre>
<h2>See when each key last logged in</h2>
<p>With the default LogLevel INFO, every successful key login writes a line like this, with the key’s type and fingerprint at the end:</p>
<pre><code>sshd-session[48213]: Accepted publickey for deploy from 203.0.113.7 port 51022 ssh2: ED25519 SHA256:FdCznNceNcN09wFK6NmsH9j6x7sR3Jawo+xTQucmEk8
</code></pre>
<p>So you can match every key in every file against the journal. This script prints each key with the last login the journal has for it. It reads only, and changes nothing:</p>
<pre><code>#!/bin/sh
# ssh-key-audit.sh: every authorized key on this server and its last login. Run as root.
logins=$(journalctl _COMM=sshd _COMM=sshd-session --no-pager -o short-iso -g 'Accepted publickey')
getent passwd | while IFS=: read -r user _ _ _ _ home _; do
  for f in "$home/.ssh/authorized_keys" "$home/.ssh/authorized_keys2"; do
    [ -f "$f" ] || continue
    ssh-keygen -lf "$f" 2&gt;/dev/null | while read -r bits fp rest; do
      last=$(printf '%s\n' "$logins" | grep -F " for $user from " | grep -F "$fp" | tail -n 1 | cut -d' ' -f1)
      echo "$user  $fp  $rest  last login: ${last:-not in journal}"
    done
  done
done
</code></pre>
<pre><code>sudo sh ssh-key-audit.sh

root   SHA256:Qm4tR8…  admin@desk (ED25519)    last login: 2026-11-02T09:14:51+00:00
deploy SHA256:FdCznN…  alice@laptop (ED25519)  last login: 2026-11-27T16:03:22+00:00
deploy SHA256:7wgJz0…  old-deploy (RSA)        last login: not in journal
</code></pre>
<p>The journal filter matches the program name. Since OpenSSH 9.8 the login lines come from sshd-session rather than sshd, so the script asks for both. If your sshd_config lists keys in a different file, change the inner loop to match what sshd -T printed. <a href="https://www.openssh.com/txt/release-9.8">OpenSSH 9.8 release notes</a></p>
<p>“Not in journal” means not used within the journal’s history, which may be short. Check how far back it goes before you treat a key as unused. If the first line is from last week, or --list-boots shows only the current boot, your journal isn’t kept long enough to judge, and the answer has to come from asking people.</p>
<pre><code>sudo journalctl -o short-iso | head -n 1
sudo journalctl --list-boots | head -n 3
</code></pre>
<h2>Remove the keys nobody uses</h2>
<p>For each key with no recent login, find its owner. If nobody claims it, remove it. Keep a copy first, so a key that turns out to belong to a nightly job can go back in a minute:</p>
<pre><code>sudo cp -p /home/deploy/.ssh/authorized_keys /root/authorized_keys.deploy.$(date +%F)
sudo grep -vF "&lt;a unique piece of that key&gt;" /home/deploy/.ssh/authorized_keys | sudo tee /home/deploy/.ssh/authorized_keys.new &gt;/dev/null
sudo ssh-keygen -lf /home/deploy/.ssh/authorized_keys.new   # check the right line is gone
sudo mv /home/deploy/.ssh/authorized_keys.new /home/deploy/.ssh/authorized_keys
sudo chown deploy: /home/deploy/.ssh/authorized_keys &amp;&amp; sudo chmod 600 /home/deploy/.ssh/authorized_keys
</code></pre>
<p>Copy the piece from the middle or end of the base64 key, not the start: every RSA key of the same size begins with the same characters, and so do all Ed25519 keys. Don’t match on the comment either. Then confirm the file still works for the keys you kept by logging in from a second terminal before you close the first.</p>
<p>Removing a key stops new logins only. sshd checks authorized_keys when someone authenticates, so a session that is already open stays open. When you remove someone’s access because they left, end their sessions too:</p>
<pre><code>loginctl list-sessions
sudo loginctl terminate-session &lt;ID&gt;
</code></pre>
<p>If that person had sudo, the key you removed may not be their only way in. They could have added a key to another account, a cron job or a systemd unit. Run the audit across every account again, and look at recent changes in those places. The auditd guide has rules that record who changes root’s keys, cron and systemd units; add a line like the one below for each account whose keys matter. <a href="https://alsopss.com/blog/auditd">auditd rules that matter</a></p>
<pre><code>-a always,exit -F arch=b64 -F dir=/home/deploy/.ssh -F perm=wa -k user_keys
</code></pre>
<h2>Restrict the keys you keep</h2>
<p>A line in authorized_keys can start with options that limit what the key may do. These four cover most needs: <a href="https://man.openbsd.org/sshd#AUTHORIZED_KEYS_FILE_FORMAT">sshd(8): key options</a></p>
<table>
<thead>
<tr>
<th>Option</th>
<th>What it does</th>
<th>Use it for</th>
</tr>
</thead>
<tbody><tr>
<td>restrict</td>
<td>Turns off port, agent and X11 forwarding, PTY allocation and ~/.ssh/rc</td>
<td>Any key that doesn’t need an interactive shell</td>
</tr>
<tr>
<td>from="203.0.113.0/24"</td>
<td>Accepts the key only from matching addresses or host names</td>
<td>CI runners and office or VPN ranges</td>
</tr>
<tr>
<td>command="/usr/local/bin/backup"</td>
<td>Runs this command whatever the client asked for</td>
<td>Backup, deploy and monitoring keys</td>
</tr>
<tr>
<td>expiry-time="20270301"</td>
<td>Refuses the key after this date</td>
<td>Contractors and temporary access</td>
</tr>
</tbody></table>
<p>Options go before the key type, separated by commas, with no spaces outside quotes. A backup key that may only run one script, only from one network, until March:</p>
<pre><code>restrict,from="203.0.113.0/24",command="/usr/local/bin/backup",expiry-time="20270301" ssh-ed25519 AAAAC3Nza… backup@nas
</code></pre>
<p>To check, try the key from an address outside the range, or ask it for a shell. The first should be refused and the second should run only the forced command. The command the client asked for is available to your script in SSH_ORIGINAL_COMMAND, if it needs to check it.</p>
<p>File permissions matter too. With StrictModes yes, the default, sshd ignores an authorized_keys file when the file, ~/.ssh or the home directory can be written by other users. A key that suddenly stops working after a permissions change is often this.</p>
<pre><code>sudo stat -c "%a %U %n" /home/deploy /home/deploy/.ssh /home/deploy/.ssh/authorized_keys
# expect: home not group/world-writable, 700 on .ssh, 600 on authorized_keys, all owned by the user
</code></pre>
<h2>When there are too many keys to track</h2>
<p>Past a handful of people and servers, copying public keys around stops scaling. The usual next step is SSH certificates: you trust one CA key on each server with TrustedUserCAKeys, and sign each person’s key with an expiry date of days or weeks. Access then runs out by itself instead of waiting for someone to edit a file on every server. ssh-keygen does the signing; there’s nothing extra to install. <a href="https://man.openbsd.org/ssh-keygen#CERTIFICATES">ssh-keygen(1): CERTIFICATES</a></p>
<p>Whichever way you manage keys, watch the logins themselves. A stolen key that’s still on the list looks exactly like its owner. Vigilhold, our host agent for Linux servers, watches SSH along with processes, network connections and file changes on every server from one console, so SSH logins are watched on every server even when nobody is reading the journal. <a href="https://alsopss.com/products">See Vigilhold</a></p>
<p>While you’re in sshd_config, paste it into our free checker for a plain-English report on root login, passwords and weak ciphers. It runs in your browser, and nothing you paste leaves the page. <a href="https://alsopss.com/tools/ssh-config-checker">SSH config checker</a></p>
<h2>The short version</h2>
<table>
<thead>
<tr>
<th>Step</th>
<th>Check it worked</th>
</tr>
</thead>
<tbody><tr>
<td>Know which files sshd reads</td>
<td>sshd -T shows authorizedkeysfile, and no command or CA you didn’t expect</td>
</tr>
<tr>
<td>List every key on every account</td>
<td>ssh-keygen -lf runs on each file the loop found</td>
</tr>
<tr>
<td>Match keys to logins</td>
<td>Every key has a recent login or a named owner</td>
</tr>
<tr>
<td>Remove unused keys</td>
<td>The fingerprint is gone and you can still log in with the keys you kept</td>
</tr>
<tr>
<td>End old sessions</td>
<td>loginctl list-sessions shows no sessions for removed users</td>
</tr>
<tr>
<td>Restrict automation keys</td>
<td>The key is refused from outside its range and runs only its command</td>
</tr>
</tbody></table>
<blockquote>
<p>A key nobody can name is a login nobody is watching. Find it, then remove it.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/ssh-authorized-keys-audit">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Unattended upgrades on Ubuntu and Debian: prove they’re working]]></title><description><![CDATA[Set up unattended upgrades on Ubuntu and Debian, then prove they work: catch held-back packages, pending reboots and silent failures with a check to alert…]]></description><link>https://als-ops.hashnode.dev/unattended-upgrades-on-ubuntu-and-debian-prove-theyre-working</link><guid isPermaLink="true">https://als-ops.hashnode.dev/unattended-upgrades-on-ubuntu-and-debian-prove-theyre-working</guid><category><![CDATA[Linux]]></category><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[sysadmin]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:20:04 GMT</pubDate><content:encoded><![CDATA[<p>Ubuntu Server installs security updates by itself every day through the unattended-upgrades package, and most Debian installs have the same package. The usual problem isn’t that it’s switched off. It’s switched on, the timer fires every morning, and something still doesn’t get patched: a package held back by a config-file prompt, a kernel waiting for a reboot that never happens, Docker from a repository it never looks at, or a run that has been failing quietly for weeks. <a href="https://documentation.ubuntu.com/server/how-to/software/automatic-updates/">Ubuntu Server docs: automatic updates</a></p>
<p>This guide covers the setup on Ubuntu 24.04 and Debian 13 briefly, then the part that matters: checking that it works, the gaps it leaves by design, and a short script you can hook to any monitoring so a stuck server shows up within two days. The RHEL equivalent is at the end.</p>
<h2>Check that it’s installed and switched on</h2>
<pre><code>dpkg-query -W unattended-upgrades
apt-config dump | grep -E "APT::Periodic::(Update-Package-Lists|Unattended-Upgrade) "
systemctl list-timers apt-daily.timer apt-daily-upgrade.timer
</code></pre>
<p>Both APT::Periodic values should be "1". The number is the interval in days, and "0" turns the step off. Both timers should show a next run. The upgrade timer fires at 06:00 with up to an hour of random delay, and it catches up at boot if the server was off at that time. <a href="https://salsa.debian.org/apt-team/apt/-/blob/main/debian/apt-daily-upgrade.timer">apt-daily-upgrade.timer</a></p>
<p>If the package is missing or the values are "0", install it and answer yes:</p>
<pre><code>sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
</code></pre>
<p>That writes /etc/apt/apt.conf.d/20auto-upgrades with both values set to "1". Debian’s wiki says most installs include the package with conservative settings, but some don’t include it at all, so check rather than assume. Minimal images and hosting templates are where it most often goes missing. <a href="https://wiki.debian.org/PeriodicUpdates">Debian wiki: PeriodicUpdates</a></p>
<h2>Know what it will install</h2>
<p>By default, only your distribution’s own updates. On Ubuntu that means the release, its -security pocket and, on machines attached to Ubuntu Pro, the ESM security pockets. Ordinary bug-fix updates from -updates are commented out. Debian’s default takes the release itself (which includes point-release updates) and Debian-Security. Nothing from a repository you added yourself, such as Docker, PostgreSQL or a PPA, is installed until you add its origin. <a href="https://github.com/mvo5/unattended-upgrades/blob/master/data/50unattended-upgrades.Debian">Debian default config</a></p>
<p>A dry run shows the allowed origins and exactly what the next run would do, without installing anything:</p>
<pre><code>sudo unattended-upgrade --dry-run --debug
apt-cache policy docker-ce     # which origin a package comes from (o= and a= fields)
</code></pre>
<p>Read the “Allowed origins are:” line near the top. A package whose origin isn’t in that list stays at its installed version, however old it gets.</p>
<h2>Put your changes in a separate file</h2>
<p>Don’t edit 50unattended-upgrades. It belongs to the package, and the upstream README warns that local edits there can conflict with the next version and block unattended-upgrades from updating itself. Use a file that sorts later, such as 52unattended-upgrades-local. For single values, the last file read wins. <a href="https://github.com/mvo5/unattended-upgrades/blob/master/README.md">unattended-upgrades README</a></p>
<pre><code>// /etc/apt/apt.conf.d/52unattended-upgrades-local
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "04:00";
Unattended-Upgrade::SyslogEnable "true";
</code></pre>
<pre><code>apt-config dump | grep -E "Automatic-Reboot|SyslogEnable"
</code></pre>
<p>The second command shows what apt actually sees. If a value isn’t what you wrote, another file later in the order sets it again.</p>
<p>Automatic-Reboot acts only when /var/run/reboot-required exists after a run, and it reboots without asking. With no time set it reboots straight away. With "04:00" it schedules the reboot for the next 04:00, which is the following night when the upgrade ran at 06:00. Logged-in users don’t stop it unless you set Automatic-Reboot-WithUsers to "false". SyslogEnable copies each run’s events to syslog, which ends up in the journal and in whatever you already forward logs to.</p>
<p>Whether to reboot automatically depends on the server. For a stateless web node, or anything that can be down for a minute at night, it’s fine. A database host is usually better rebooted by hand in a window. Either way, decide on purpose: with the default, kernel fixes wait until someone happens to reboot.</p>
<h2>The gaps it leaves by design</h2>
<ul>
<li>Kernels. The new kernel is installed, but the old one keeps running until a reboot. On Debian and Ubuntu, unattended-upgrades ships a kernel hook (/etc/kernel/postinst.d/unattended-upgrades) that creates /var/run/reboot-required and adds the package to /var/run/reboot-required.pkgs.</li>
<li>Running services. A patched library only protects processes started after the update. Ubuntu 24.04 runs needrestart after each upgrade and restarts affected services automatically by default, apart from a list of exceptions such as the display manager. On Debian, check how needrestart is configured on your servers. On either, sudo needrestart -r l lists what is still running old code.</li>
<li>Packages with a config-file prompt. If an update would ask whether to keep your edited copy of a config file, unattended-upgrades holds the package back and logs “has conffile prompt and needs to be upgraded manually”. It stays held until you upgrade it by hand. Keeping local settings in drop-in directories (sshd_config.d, conf.d) instead of editing the shipped files avoids most of these.</li>
<li>Held packages. Anything marked with apt-mark hold is skipped; apt-mark showhold lists them.</li>
<li>Other repositories: Docker, databases, PPAs, vendor agents. See the next section.</li>
<li>Container images. The base images inside your containers aren’t packages on the host. They get fixes only when you pull new images and recreate the containers.</li>
</ul>
<p>Sources for the first three: the kernel hook in the upstream repository, Ubuntu’s notes on service restarts, and the conffile check in unattended-upgrade itself. <a href="https://github.com/mvo5/unattended-upgrades/blob/master/kernel/postinst.d/unattended-upgrades">kernel hook</a> <a href="https://documentation.ubuntu.com/server/how-to/software/automatic-updates/#service-restarts">Ubuntu: service restarts</a> <a href="https://github.com/mvo5/unattended-upgrades/blob/master/unattended-upgrade">unattended-upgrade source</a></p>
<h2>Docker and other vendor repositories</h2>
<p>Docker’s apt repository identifies itself with the origin “Docker” and a suite equal to your release codename (noble, trixie), as its Release file shows. To let unattended-upgrades install Docker updates, add an Origins-Pattern entry to your local file. Entries are added to the shipped list rather than replacing it. <a href="https://download.docker.com/linux/ubuntu/dists/noble/InRelease">Docker’s Release file for noble</a></p>
<pre><code>// /etc/apt/apt.conf.d/52unattended-upgrades-local
Unattended-Upgrade::Origins-Pattern {
    "origin=Docker,archive=${distro_codename},component=stable";
};
</code></pre>
<p>Think before you add it. Upgrading docker-ce restarts the Docker daemon, and by default the daemon shuts down running containers when it stops. Live restore ("live-restore": true in /etc/docker/daemon.json) keeps containers running while the daemon restarts, but Docker supports that only across patch releases, not major upgrades, and it doesn’t apply to Swarm services. <a href="https://docs.docker.com/engine/daemon/live-restore/">Docker docs: live restore</a></p>
<p>For most small teams the better default is to leave Docker out and upgrade it on a schedule, after reading the release notes:</p>
<p>{% raw %}</p>
<pre><code>sudo apt-get update
sudo apt-get install --only-upgrade docker-ce docker-ce-cli containerd.io
docker ps -a --format "{{.Names}}\t{{.Status}}"
</code></pre>
<p>{% endraw %}</p>
<p>The same goes for any repository you leave out: it needs a reminder that doesn’t depend on someone’s memory, because the check below only covers your distribution’s security updates.</p>
<h2>Read what it actually did</h2>
<pre><code>sudo tail -n 30 /var/log/unattended-upgrades/unattended-upgrades.log
sudo grep -E "conffile prompt|kept back|ERROR" /var/log/unattended-upgrades/unattended-upgrades.log
journalctl -u apt-daily-upgrade.service --since "3 days ago"
</code></pre>
<p>Each run logs the allowed origins, the packages it upgraded and anything it kept back. The full dpkg output is in unattended-upgrades-dpkg.log in the same directory. Mail reports (Unattended-Upgrade::Mail and MailReport) need a working mail setup on the server, which most cloud servers don’t have, so don’t count on them.</p>
<p>If you run AIDE, every upgrade changes files it watches. Accept those changes right after the run, not days later. <a href="https://alsopss.com/blog/aide-file-integrity-monitoring">AIDE guide: accepting planned changes</a></p>
<h2>A check you can alert on</h2>
<p>Logs only help when someone reads them. To find a stuck server without logging in, check three things: did the daily run finish successfully recently, are security updates still waiting, and is a reboot pending.</p>
<p>The first has a reliable marker. The script the apt-daily-upgrade timer runs (/usr/lib/apt/apt.systemd.daily) touches /var/lib/apt/periodic/upgrade-stamp only when unattended-upgrade exits successfully, and a run with nothing to install counts as success. If that file is more than two days old, runs are failing or not happening. <a href="https://salsa.debian.org/apt-team/apt/-/blob/main/debian/apt.systemd.daily">apt.systemd.daily</a></p>
<pre><code>#!/bin/sh
# /usr/local/bin/check-patching: prints the problem and exits 1 if patching looks stuck
problems=0

if [ -z "$(find /var/lib/apt/periodic/upgrade-stamp -mtime -2 2&gt;/dev/null)" ]; then
  echo "unattended-upgrade has not finished successfully in 2 days"; problems=1
fi

pending=$(apt-get -s dist-upgrade 2&gt;/dev/null | grep "^Inst" | grep -ci security)
if [ "$pending" -gt 0 ]; then
  echo "$pending security updates waiting"; problems=1
fi

if [ -f /var/run/reboot-required ]; then
  echo "reboot pending for: $(xargs &lt; /var/run/reboot-required.pkgs 2&gt;/dev/null)"; problems=1
fi

exit $problems
</code></pre>
<p>It doesn’t need root: apt-get -s only simulates, using the package lists the apt-daily timer keeps fresh. Run it from your monitoring agent, a cron job that posts to chat, or a scheduled job that connects over SSH. Expect it to report waiting security updates for up to a day after a new advisory, until the next daily run. Alert when a server fails two checks in a row, or run the check an hour or two after the 06:00 window.</p>
<p>Test it once by making it fail: sudo touch -d "3 days ago" /var/lib/apt/periodic/upgrade-stamp, run the check, and confirm the alert reaches you. The next successful run puts the stamp back.</p>
<h2>RHEL and its rebuilds</h2>
<p>The equivalent on RHEL 9 is dnf-automatic. Install it, choose security updates and turn on applying them in /etc/dnf/automatic.conf, then enable the timer: <a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_software_with_the_dnf_tool/assembly_automating-software-updates-in-rhel-9_managing-software-with-the-dnf-tool">Red Hat: automating software updates</a></p>
<pre><code>sudo dnf install dnf-automatic

# /etc/dnf/automatic.conf
[commands]
upgrade_type = security
apply_updates = yes

sudo systemctl enable --now dnf-automatic.timer
</code></pre>
<p>Use dnf-automatic.timer when you want automatic.conf to decide. The other timers it ships (dnf-automatic-install.timer and the rest) override apply_updates. upgrade_type = security picks only updates that come with a security advisory. <a href="https://github.com/rpm-software-management/dnf/blob/master/doc/automatic.rst">dnf-automatic docs</a></p>
<pre><code>systemctl list-timers "dnf-automatic*"
dnf updateinfo list --security     # advisories still waiting
dnf needs-restarting -r            # exits 1 when a reboot is needed (dnf-plugins-core)
</code></pre>
<h2>What to show when someone asks</h2>
<p>When a customer’s security questionnaire asks how your servers get patched, “unattended-upgrades is on” is a weak answer. “Security updates install daily, these logs show every run, and this check flags any server that misses two days or has a reboot pending” is a strong one. Keep the unattended-upgrades logs with your other logs, because logrotate removes old ones from the server.</p>
<p>One server is a script. Twenty servers, checked every day, is a job. Vigilhold, our host agent for Linux servers, watches process, network, file and SSH signals on every server in one console. Its Business plan adds CVE scanning and package scoring, plus compliance reports that give your auditor evidence for SOC 2. They are not a certification. <a href="https://alsopss.com/blog/secure-linux-vps-checklist">Linux VPS security checklist</a> <a href="https://alsopss.com/products">See Vigilhold</a></p>
<h2>The short version</h2>
<table>
<thead>
<tr>
<th>Step</th>
<th>Check it worked</th>
</tr>
</thead>
<tbody><tr>
<td>Installed and on</td>
<td>Both APT::Periodic values are "1" and both apt-daily timers show a next run</td>
</tr>
<tr>
<td>Right origins</td>
<td>The dry run’s “Allowed origins” line lists what you expect</td>
</tr>
<tr>
<td>Local settings apply</td>
<td>apt-config dump shows the values from your 52 file</td>
</tr>
<tr>
<td>Reboots decided</td>
<td>Automatic-Reboot with a time, or a reboot window someone owns</td>
</tr>
<tr>
<td>Nothing stuck</td>
<td>No “conffile prompt” lines in the log; apt-mark showhold lists only what you meant to hold</td>
</tr>
<tr>
<td>Vendor repos covered</td>
<td>Docker and the rest are in Origins-Pattern or on a schedule</td>
</tr>
<tr>
<td>Alerting</td>
<td>check-patching runs on every server, and you’ve seen it fail once</td>
</tr>
</tbody></table>
<blockquote>
<p>A timer that fires proves nothing. Check the stamp, the waiting security updates and the reboot flag.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/unattended-upgrades">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[AIDE on Linux: file integrity monitoring that holds up]]></title><description><![CDATA[Set up AIDE on Debian 13, Ubuntu 24.04 and RHEL: build a baseline, prove it catches a planted change, run it daily, cut the noise, and protect the…]]></description><link>https://als-ops.hashnode.dev/aide-on-linux-file-integrity-monitoring-that-holds-up</link><guid isPermaLink="true">https://als-ops.hashnode.dev/aide-on-linux-file-integrity-monitoring-that-holds-up</guid><category><![CDATA[Linux]]></category><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[sysadmin]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:15:03 GMT</pubDate><content:encoded><![CDATA[<p>AIDE (Advanced Intrusion Detection Environment) records the permissions, owner, size, timestamps and checksums of the files you tell it to watch, and stores them in a database. Each later check walks the same files and lists what was added, removed or changed. If someone swaps a binary in <code>/usr/bin</code>, drops a job into <code>/etc/cron.d</code> or edits sudoers, the next check names the file.</p>
<p>It doesn't run continuously and it doesn't record who made a change: it compares two snapshots. For the who and when, pair it with <a href="https://alsopss.com/blog/auditd">auditd</a>. This guide covers the setup on Debian 13, Ubuntu 24.04 and RHEL, a test that proves it works, and the parts most guides skip: noise, the database itself, and two detection bypasses fixed in October 2026.</p>
<h2>What differs between distributions</h2>
<table>
<thead>
<tr>
<th></th>
<th>Debian 13</th>
<th>Ubuntu 24.04</th>
<th>RHEL 9</th>
</tr>
</thead>
<tbody><tr>
<td>AIDE version</td>
<td>0.19.1</td>
<td>0.18.6</td>
<td>0.16</td>
</tr>
<tr>
<td>Config</td>
<td><code>/etc/aide/aide.conf</code> + <code>aide.conf.d/</code></td>
<td><code>/etc/aide/aide.conf</code> + <code>aide.conf.d/</code></td>
<td><code>/etc/aide.conf</code></td>
</tr>
<tr>
<td>Database</td>
<td><code>/var/lib/aide/aide.db</code></td>
<td><code>/var/lib/aide/aide.db</code></td>
<td><code>/var/lib/aide/aide.db.gz</code></td>
</tr>
<tr>
<td>Daily check</td>
<td><code>dailyaidecheck.timer</code>, shipped</td>
<td><code>dailyaidecheck.timer</code>, shipped</td>
<td>None; you add it</td>
</tr>
</tbody></table>
<p>Debian and Ubuntu add a layer of scripts around AIDE (<code>aideinit</code>, the daily timer, settings in <code>/etc/default/aide</code>). Their aide binary has no default config file, so when you run it by hand you always pass <code>--config /etc/aide/aide.conf</code> (<a href="https://sources.debian.org/src/aide/0.19.1-2+deb13u6/debian/aide-common.README.Debian/">Debian README</a>). On RHEL you run <code>aide</code> directly (<a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/checking-integrity-with-aide_security-hardening">Red Hat docs</a>).</p>
<p>AIDE 0.19 changed the config language, which matters if you carry an old <code>aide.conf</code> to Debian 13. The <code>database</code> option is gone (use <code>database_in</code>), and an unrestricted <code>!</code> rule no longer skips everything under a matching directory (<a href="https://github.com/aide/aide/blob/master/NEWS">NEWS</a>). More on that below.</p>
<h2>Patch AIDE first</h2>
<p>On 22 October 2026 the AIDE project published <a href="https://github.com/aide/aide/security/advisories">two advisories</a>, both described as detection bypasses: one in how hash values containing a null byte were compared, one in how file names with invalid UTF-8 were handled. They affect versions up to 0.19.4 and are fixed in 0.19.5. Debian fixed Debian 13 in 0.19.1-2+deb13u5 (<a href="https://security-tracker.debian.org/tracker/DSA-6578-1">DSA-6578-1</a>). The UTF-8 issue goes back to 0.16, so on Ubuntu and RHEL check your vendor's security tracker before you rely on the reports.</p>
<pre><code class="language-bash">dpkg-query -W aide       # Debian, Ubuntu
rpm -q aide              # RHEL
</code></pre>
<h2>Install it and build the baseline</h2>
<p>Build the baseline when the server is in the state you mean it to be in: after setup and hardening, before it takes traffic. Otherwise the first report is a list of your own changes.</p>
<pre><code class="language-bash"># Debian, Ubuntu
sudo apt install aide
sudo aideinit

# RHEL
sudo dnf install aide
sudo aide --init
sudo mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
</code></pre>
<p>Both take a few minutes because AIDE reads and hashes every file it watches. <code>aideinit</code> writes <code>/var/lib/aide/aide.db.new</code> and then asks whether to replace <code>aide.db</code> with it. <code>aideinit -y -f</code> answers yes to both questions, which is fine on a new server and throws away your current baseline on an old one.</p>
<h2>Prove it catches a change</h2>
<p>Don't trust a monitor you haven't seen fire. Plant a harmless file where attackers like to persist, run a check limited to that directory, then clean up. On Debian and Ubuntu, first confirm the path is covered by a rule:</p>
<pre><code class="language-bash">sudo aide --config /etc/aide/aide.conf --path-check=f:/etc/cron.d/aide-canary; echo $?
# 0 = the file would be in the database, 1 = no rule covers it
</code></pre>
<pre><code class="language-bash">echo "# aide canary, safe to delete" | sudo tee /etc/cron.d/aide-canary
sudo aide --config /etc/aide/aide.conf --check --limit /etc/cron.d; echo $?
sudo rm /etc/cron.d/aide-canary
</code></pre>
<p>On RHEL drop the <code>--config</code> part. <code>--path-check</code> needs AIDE 0.17 or later, so skip it on RHEL 9. The report should list the canary under added entries, and the exit code should be 1.</p>
<p>That exit code is useful for automation. After a check, AIDE adds 1 if files were added, 2 if files were removed and 4 if files changed, so 5 means added and changed. Values of 14 and above are errors: 17 is a configuration error, 18 an I/O error and 24 a database error (<a href="https://manpages.debian.org/trixie/aide/aide.1.en.html">aide(1)</a>). A monitoring check can alert on anything other than 0.</p>
<h2>Run it every day, and make sure someone reads it</h2>
<p>On Debian and Ubuntu the package ships <code>dailyaidecheck.timer</code>. It fires at 01:50 with a random delay of up to two hours. The report goes to <code>/var/log/aide/aide.log</code> and errors to <code>/var/log/aide/error.log</code>.</p>
<pre><code class="language-bash">systemctl list-timers dailyaidecheck.timer
sudo systemctl start dailyaidecheck.service      # run it now (allowed once per two hours)
journalctl -u dailyaidecheck.service -n 30
</code></pre>
<p>Don't count on mail. The daily job runs as an unprivileged <code>_aide</code> user, and under systemd it can only send mail if s-nail is installed and a mail server is listening on localhost. Without both, it writes a warning to the journal and the report to the log file, and nobody hears about it. Either set that up and set <code>MAILTO</code> in <code>/etc/default/aide</code>, or ship <code>/var/log/aide/aide.log</code> with your other logs.</p>
<p>Red Hat recommends checking daily, and weekly at minimum. Its documentation uses a line in <code>/etc/crontab</code>, which mails the output to root through cron:</p>
<pre><code>05 4 * * * root /usr/sbin/aide --check
</code></pre>
<h2>Accept planned changes without hiding unplanned ones</h2>
<p>Every package update changes files, and AIDE will report them until you update the baseline. On Debian and Ubuntu the daily job runs <code>aide --update</code>, which compares against <code>aide.db</code> and writes a fresh <code>aide.db.new</code>, but by default (<code>COPYNEWDB=no</code>) it never promotes that file. Changes keep being reported until you accept them. Leave that default alone: <code>COPYNEWDB=yes</code> accepts every change automatically, including an intruder's, after it has been reported once.</p>
<p>After patching, read the report and match the changed files against what the package manager did (<code>/var/log/apt/history.log</code>, or <code>dnf history info last</code>). For files that belong to packages, a second opinion is cheap:</p>
<pre><code class="language-bash">sudo dpkg --verify       # Debian, Ubuntu: lists files that no longer match their package
sudo rpm -Va             # RHEL
</code></pre>
<p>Both rely on package metadata stored on the same server, so treat them as a cross-check, not proof. When everything is explained, accept it:</p>
<pre><code class="language-bash"># Debian, Ubuntu
sudo aide --config /etc/aide/aide.conf --update
sudo cp /var/lib/aide/aide.db.new /var/lib/aide/aide.db

# RHEL
sudo aide --update
sudo mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
</code></pre>
<p>Accept right after the maintenance you did. The longer the gap, the more room for an unplanned change to be accepted along with the planned ones. To accept changes in one area only, add <code>--limit /etc</code> or another path.</p>
<h2>Cut the noise with rules</h2>
<p>Debian's shipped rules are, in the package's own words, "very paranoid". On a server that runs an application you will want to exclude the parts that change by design and watch your own code properly. On Debian and Ubuntu put your rules in a new file in <code>/etc/aide/aide.conf.d/</code>. The file name may only contain letters, digits, underscores and hyphens: a file called <code>local.conf</code> is silently ignored because of the dot. On RHEL, edit <code>/etc/aide.conf</code>.</p>
<pre><code># /etc/aide/aide.conf.d/90_aide_local

# deployed code: full check of regular files
/srv/myapp/releases f R

# container state changes all the time; leave it to other tools
-/var/lib/docker$
-/var/lib/containerd$
</code></pre>
<p>The leading <code>-</code> is a non-recursive exclude, new in 0.19: AIDE skips the directory and never looks inside it. It's where the 0.19 change bites. In 0.18, <code>!/var/lib/docker$</code> excluded the directory and everything under it. In 0.19 the same line excludes only the directory itself, then descends into it and adds every child that another rule covers, which can mean all of Docker's image layers (<a href="https://manpages.debian.org/trixie/aide/aide.conf.5.en.html">aide.conf(5)</a>). On Ubuntu 24.04 (0.18) and RHEL, which don't have the <code>-</code> rule, use <code>!</code> as before.</p>
<p>Check the config and test the rules before the next daily run:</p>
<pre><code class="language-bash">sudo aide --config /etc/aide/aide.conf --config-check
sudo aide --config /etc/aide/aide.conf --path-check=d:/var/lib/docker; echo $?    # want 1
sudo aide --config /etc/aide/aide.conf --path-check=f:/srv/myapp/releases/app.py; echo $?   # want 0
</code></pre>
<p>Then rebuild the baseline with <code>aide --update</code> and accept it, or the next report will list every file your rule change added or dropped.</p>
<h2>Keep the database out of reach</h2>
<p>The <a href="https://aide.github.io/doc/">AIDE manual</a> says it plainly: like any other system file, AIDE's binary and database can be altered. An intruder with root can run <code>aide --update</code> to bless their own changes, or add an exclude rule for their directory. Red Hat's advice is to keep the database, the configuration and the aide binary somewhere secure, such as read-only media. On a rented server, these steps get you most of the way:</p>
<ul>
<li>After every accepted update, copy <code>aide.db</code> and the config to another machine, and let that machine pull them so the server holds no credentials for it.</li>
<li>Record <code>sha256sum /var/lib/aide/aide.db</code> off the server. Before trusting a clean report, check that the hash still matches.</li>
<li>Send the reports off the server as they're written, so a quiet report can't simply be deleted or edited.</li>
<li>Treat silence as a finding: a server whose daily report stops arriving needs a look.</li>
</ul>
<p>If you manage RHEL with Ansible, Red Hat's aide system role can initialize the database on each host and store it on the control node, which covers the first point for you.</p>
<h2>AIDE and SOC 2</h2>
<p>SOC 2's criterion CC7.1 expects detection and monitoring procedures that identify configuration changes that introduce new vulnerabilities. One of its points of focus is a change-detection mechanism, and the example the criteria give is file integrity monitoring that alerts staff to unauthorized changes to critical system, configuration or content files (<a href="https://www.aicpa-cima.com/resources/download/2017-trust-services-criteria-with-revised-points-of-focus-2022">AICPA Trust Services Criteria</a>). AIDE produces that evidence. The questions an auditor usually adds are who reads the reports, and how accepted changes are tied to approved work.</p>
<p>That reading and tying-together is the part AIDE leaves to you, once a day and once per server. Vigilhold, our host agent for Linux servers, watches process, network, file and SSH signals on every server and shows them in one console, and its Business plan's compliance reports give your auditor evidence for SOC 2. They are not a certification.</p>
<h2>The short version</h2>
<table>
<thead>
<tr>
<th>Step</th>
<th>Check it worked</th>
</tr>
</thead>
<tbody><tr>
<td>AIDE patched</td>
<td>Your version includes the October 2026 fixes (Debian 13: 0.19.1-2+deb13u5 or later)</td>
</tr>
<tr>
<td>Baseline built</td>
<td><code>/var/lib/aide/aide.db</code> (or <code>aide.db.gz</code>) exists, dated after setup</td>
</tr>
<tr>
<td>It catches changes</td>
<td>The cron.d canary shows up as added, exit code 1</td>
</tr>
<tr>
<td>Runs daily</td>
<td><code>systemctl list-timers dailyaidecheck.timer</code>, or the cron line, shows a next run</td>
</tr>
<tr>
<td>Someone reads it</td>
<td>The report arrives by mail or in your central logs</td>
</tr>
<tr>
<td>Noise under control</td>
<td><code>--path-check</code> gives the answers you expect for excluded and watched paths</td>
</tr>
<tr>
<td>Baseline protected</td>
<td>An off-server copy and hash match the database on the server</td>
</tr>
</tbody></table>
<p>AIDE is only as trustworthy as its baseline: build it clean, accept changes on purpose, and keep a copy the server can't touch.</p>
]]></content:encoded></item><item><title><![CDATA[auditd on Linux servers: rules that matter and how to check them]]></title><description><![CDATA[Set up auditd on Debian, Ubuntu and RHEL: a focused rule set, checks that prove each rule fires, ausearch and aureport, log sizing and forwarding.]]></description><link>https://als-ops.hashnode.dev/auditd-on-linux-servers-rules-that-matter-and-how-to-check-them</link><guid isPermaLink="true">https://als-ops.hashnode.dev/auditd-on-linux-servers-rules-that-matter-and-how-to-check-them</guid><category><![CDATA[Linux]]></category><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[sysadmin]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:10:03 GMT</pubDate><content:encoded><![CDATA[<p>auditd is the user-space half of the Linux audit system. The kernel checks every system call against the rules you load and hands matching events to auditd, which writes them to /var/log/audit/audit.log. Because the records come from the kernel, they show what actually happened, such as which file was written and by which program, whether or not the program logged anything itself.</p>
<p>It is not an alerting tool. auditd records; it doesn’t tell anyone. This guide sets up a small rule set you can live with, shows how to check that each rule fires, and covers the parts that differ between Debian 13, Ubuntu 24.04 and RHEL 9 and 10.</p>
<h2>Install it and check it is running</h2>
<pre><code class="language-bash">sudo apt install auditd        # Debian, Ubuntu
sudo dnf install audit         # RHEL family (usually already installed)

sudo auditctl -s
</code></pre>
<p>On RHEL, auditd is part of a minimal install and is enabled by default. In the auditctl -s output, enabled 1 means auditing is on, and lost is the number of events the kernel dropped because the queue was full. Keep an eye on lost; it should stay at 0. <a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/auditing-the-system_security-hardening">Red Hat: Auditing the system</a></p>
<p>The audit userspace changed in version 4.0, and the distributions are split across that line:</p>
<table>
<thead>
<tr>
<th></th>
<th>Debian 13</th>
<th>Ubuntu 24.04</th>
<th>RHEL 9</th>
<th>RHEL 10</th>
</tr>
</thead>
<tbody><tr>
<td>audit version</td>
<td>4.0</td>
<td>3.1</td>
<td>3.1</td>
<td>4.0, later 4.2</td>
</tr>
<tr>
<td>Rules loaded by</td>
<td>audit-rules.service</td>
<td>auditd.service</td>
<td>auditd.service</td>
<td>audit-rules.service</td>
</tr>
<tr>
<td>Restart with</td>
<td>systemctl restart auditd</td>
<td>systemctl restart auditd</td>
<td>service auditd restart</td>
<td>service auditd restart</td>
</tr>
<tr>
<td>Sample rules</td>
<td>/usr/share/doc/auditd/examples/audit-rules/</td>
<td>/usr/share/doc/auditd/examples/rules/</td>
<td>/usr/share/audit/sample-rules/</td>
<td>/usr/share/audit-rules/</td>
</tr>
</tbody></table>
<p>The restart difference trips people up. Upstream’s unit file sets RefuseManualStop=yes, so on RHEL systemctl stop and restart are refused. Red Hat says to use the service command so that the auid of the person doing it is recorded. Debian and Ubuntu patch that setting out so the package can restart the daemon on upgrade. <a href="https://sources.debian.org/src/audit/1:4.0.2-2+deb13u1/debian/patches/01-no-refusemanualstop.patch/">Debian patch</a> · <a href="https://github.com/linux-audit/audit-userspace/blob/master/ChangeLog">audit ChangeLog</a></p>
<h2>Where rules live</h2>
<p>Put your rules in files under /etc/audit/rules.d/ ending in .rules. augenrules merges them in sorted order into /etc/audit/audit.rules, which is what gets loaded at boot. Don’t edit audit.rules directly: the next merge overwrites it. <a href="https://manpages.debian.org/trixie/auditd/augenrules.8.en.html">augenrules(8)</a></p>
<pre><code class="language-bash">ls /etc/audit/rules.d/
sudo auditctl -l      # the rules the kernel has right now
</code></pre>
<p>If you add rules and nothing is ever recorded, look for a -a never,task line in auditctl -l. Some distributions, Fedora among them, ship a rule like that to turn syscall auditing off by default, and it overrides everything after it.</p>
<h2>A starting rule set</h2>
<p>The temptation is to load a long compliance rule set and walk away. Every syscall rule is checked on every system call by every program, so a long list slows the machine down and fills the disk with records nobody reads. Start with the changes an intruder makes to keep access, and the commands people run.</p>
<pre><code class="language-bash"># /etc/audit/rules.d/50-server.rules

# accounts and privileges
-a always,exit -F arch=b64 -F path=/etc/passwd -F perm=wa -k identity
-a always,exit -F arch=b64 -F path=/etc/shadow -F perm=wa -k identity
-a always,exit -F arch=b64 -F path=/etc/group -F perm=wa -k identity
-a always,exit -F arch=b64 -F path=/etc/sudoers -F perm=wa -k sudoers
-a always,exit -F arch=b64 -F dir=/etc/sudoers.d -F perm=wa -k sudoers

# SSH configuration and root's keys
-a always,exit -F arch=b64 -F path=/etc/ssh/sshd_config -F perm=wa -k sshd
-a always,exit -F arch=b64 -F dir=/etc/ssh/sshd_config.d -F perm=wa -k sshd
-a always,exit -F arch=b64 -F dir=/root/.ssh -F perm=wa -k root_keys

# places used to persist
-a always,exit -F arch=b64 -F path=/etc/crontab -F perm=wa -k cron
-a always,exit -F arch=b64 -F dir=/etc/cron.d -F perm=wa -k cron
-a always,exit -F arch=b64 -F dir=/var/spool/cron -F perm=wa -k cron
-a always,exit -F arch=b64 -F dir=/etc/systemd/system -F perm=wa -k systemd

# kernel modules
-a always,exit -F arch=b64 -S init_module -S finit_module -S delete_module -k modules

# commands run by people who logged in
-a always,exit -F arch=b64 -S execve -F auid&gt;=1000 -F auid!=unset -k exec
-a always,exit -F arch=b32 -S execve -F auid&gt;=1000 -F auid!=unset -k exec
</code></pre>
<p>A few things about this file:</p>
<ul>
<li>The file rules use the syscall form instead of the older -w /etc/shadow -p wa. The auditctl man page calls the -w form deprecated “due to poor system performance”. Many guides, including Red Hat’s, still use it.</li>
<li>perm=wa records writes and attribute changes (ownership, permissions), not reads. dir= covers everything under that directory.</li>
<li>Each rule names its architecture. The man page says to supply one for best performance. A syscall rule without one applies to both 32-bit and 64-bit calls, and auditctl warns about it. That’s why the execve rule appears twice.</li>
<li>auid is the login UID. It is set when someone logs in and stays the same through sudo and su, so an exec record shows who really ran the command. auid!=unset leaves out daemons, which never logged in, and auid&gt;=1000 matches normal user accounts.</li>
<li>The exec rules are by far the noisiest part. They are also the most useful after an incident. If the volume is too much, keep them and remove something else.</li>
<li>Direct root logins have auid 0 and fall outside the exec rule. Turning those logins off is the better fix.</li>
</ul>
<p>Root logins and the rest of the SSH settings are covered in the SSH hardening guide. <a href="https://alsopss.com/blog/ssh-hardening">SSH hardening</a> · <a href="https://manpages.debian.org/trixie/auditd/auditctl.8.en.html">auditctl(8)</a> · <a href="https://manpages.debian.org/trixie/auditd/audit.rules.7.en.html">audit.rules(7)</a></p>
<p>On a Docker host, add the same kind of rule for /etc/docker. The kernel audit system is not aware of containers: syscalls made inside a container are checked against the host’s rules and land in the host’s log. One catch from the audit maintainers is that executable paths are seen from inside the container, so exe= filters written for host paths won’t match container processes. <a href="https://github.com/linux-audit/audit-kernel/issues/145">audit-kernel issue 145</a></p>
<h2>Load the rules and prove they fire</h2>
<pre><code class="language-bash">sudo augenrules --check
sudo augenrules --load
sudo auditctl -l | grep -c .
</code></pre>
<p>The count should match the number of rules you wrote plus any the distribution ships. Then cause an event you expect to be recorded, and look for it:</p>
<pre><code class="language-bash">sudo useradd audittest &amp;&amp; sudo userdel audittest
sudo ausearch -k identity --start recent -i
</code></pre>
<p>You should see records for writes to /etc/passwd and /etc/shadow, with your own user in the auid field even though the command ran through sudo. If nothing comes back, check auditctl -l for the rule and auditctl -s for enabled 1.</p>
<h2>Audit from the moment the kernel starts</h2>
<p>Processes that start before auditd aren’t audited unless the kernel is told to audit from boot. With audit=1, the kernel holds events in memory until auditd starts. The default queue is only 64 events, so raise it at the same time. <a href="https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html">Kernel parameters</a></p>
<pre><code class="language-bash"># Debian, Ubuntu: add to GRUB_CMDLINE_LINUX in /etc/default/grub, then
sudo update-grub

# RHEL
sudo grubby --update-kernel=ALL --args="audit=1 audit_backlog_limit=8192"

# after a reboot
cat /proc/cmdline
</code></pre>
<h2>Read the log with ausearch and aureport</h2>
<p>audit.log is hard to read raw. ausearch finds records and -i turns numeric IDs, syscalls and hex-encoded values into names. aureport summarises. <a href="https://manpages.debian.org/trixie/auditd/ausearch.8.en.html">ausearch(8)</a> · <a href="https://manpages.debian.org/trixie/auditd/aureport.8.en.html">aureport(8)</a></p>
<pre><code class="language-bash">sudo ausearch -k sshd --start today -i          # changes to SSH config today
sudo ausearch -k exec -ua 1001 --start today -i # what user 1001 ran
sudo aureport --summary                          # counts by event type
sudo aureport -au --failed                       # failed authentications
sudo aureport -l                                 # logins
sudo aureport -k --summary                       # events per rule key
sudo aureport -x --summary                       # most-run programs
</code></pre>
<p>aureport -k --summary is a good weekly habit. A key with no events at all usually means a rule is wrong. A key with millions points to the rule that is eating your disk.</p>
<h2>Size the log for the history you need</h2>
<p>The shipped /etc/audit/auditd.conf keeps five files of 8 MiB each and rotates them, so you get about 40 MiB of history. With exec rules on a busy server that can be a few days. When the disk fills, the shipped disk_full_action is SUSPEND: auditd stops writing, and the gap is easy to miss. <a href="https://manpages.debian.org/trixie/auditd/auditd.conf.5.en.html">auditd.conf(5)</a></p>
<pre><code class="language-bash">sudo grep -E "^(max_log_file|num_logs|max_log_file_action|space_left_action|disk_full_action) " /etc/audit/auditd.conf
</code></pre>
<p>Raise max_log_file and num_logs until the history covers the period you need, then restart auditd using the command for your distribution from the table above. Red Hat’s documentation lists stricter choices for systems where losing audit records is unacceptable, such as halting when the disk is full.</p>
<h2>Get the records off the server</h2>
<p>Anyone who gets root on the server can edit or delete /var/log/audit. Records that matter have to leave the host as they’re written. The simplest route is the syslog plugin, which hands each event to the local syslog daemon so it travels with your other logs:</p>
<pre><code class="language-bash"># RHEL only: the plugin is in a separate package
sudo dnf install audispd-plugins

# all: set  active = yes  in the plugin config
sudo sed -i "s/^active = no/active = yes/" /etc/audit/plugins.d/syslog.conf
sudo systemctl restart auditd    # service auditd restart on RHEL
</code></pre>
<p>To check, repeat the useradd test and confirm the records arrive wherever your logs are collected. For auditd-to-auditd forwarding there is also audisp-remote, in the audispd-plugins package on every distribution.</p>
<h2>Lock the rules when you’re done</h2>
<p>Once the rules have settled, -e 2 as the very last rule locks the audit configuration. From then on, any attempt to change it is denied and recorded, and the only way to change the rules is to reboot. An intruder can’t quietly turn auditing off, but neither can you, so leave this until last.</p>
<pre><code class="language-bash"># /etc/audit/rules.d/99-finalize.rules
-e 2
</code></pre>
<p>After the next augenrules --load or reboot, auditctl -s shows enabled 2.</p>
<h2>auditd and SOC 2</h2>
<p>SOC 2’s common criteria include CC7.2: the entity “monitors system components and the operation of those components for anomalies that are indicative of malicious acts”, and the anomalies are analysed to decide whether they are security events. Audit records of account changes, privilege changes and admin commands are good evidence of the monitoring half. Auditors usually also ask how the records are reviewed and how long they are kept, which is why forwarding and log sizing matter as much as the rules. <a href="https://www.aicpa-cima.com/resources/download/2017-trust-services-criteria-with-revised-points-of-focus-2022">AICPA Trust Services Criteria</a></p>
<p>Review is where auditd leaves the work to you. A host-based intrusion detection system does that part: it turns host activity into alerts someone reads. Vigilhold, our host agent for Linux servers, watches logins, processes, connections and file changes on every server. Its Business plan’s compliance reports give your auditor evidence for SOC 2 and other frameworks. They are not a certification. <a href="https://alsopss.com/blog/host-based-intrusion-detection-system">What a HIDS does</a> · <a href="https://alsopss.com/products">See Vigilhold</a></p>
<h2>The short version</h2>
<table>
<thead>
<tr>
<th>Step</th>
<th>Check it worked</th>
</tr>
</thead>
<tbody><tr>
<td>auditd running</td>
<td>auditctl -s shows enabled 1 and lost 0</td>
</tr>
<tr>
<td>Rules loaded</td>
<td>auditctl -l lists your rules</td>
</tr>
<tr>
<td>Rules fire</td>
<td>ausearch -k identity finds the useradd test, with your auid</td>
</tr>
<tr>
<td>Audit from boot</td>
<td>/proc/cmdline contains audit=1</td>
</tr>
<tr>
<td>Enough history</td>
<td>The oldest audit.log covers the period you need</td>
</tr>
<tr>
<td>Off the host</td>
<td>The test event shows up in your central logs</td>
</tr>
<tr>
<td>Locked</td>
<td>auditctl -s shows enabled 2</td>
</tr>
</tbody></table>
<blockquote>
<p>auditd tells you exactly what happened, but only if the rule was loaded, the record survived and somebody looked.</p>
</blockquote>
<p><em>Originally published at <a href="https://alsopss.com/blog/auditd">alsopss.com</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Assume compromise. Limit the blast.]]></title><description><![CDATA[Security tools fail too. Design so a bad component cannot freely own the host or the fleet.]]></description><link>https://als-ops.hashnode.dev/assume-compromise-limit-the-blast</link><guid isPermaLink="true">https://als-ops.hashnode.dev/assume-compromise-limit-the-blast</guid><category><![CDATA[hostsecurity]]></category><category><![CDATA[Operators]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:05:04 GMT</pubDate><content:encoded><![CDATA[<p>The usual approach is to trust the security tool. Detect more. Patch faster. Ship the fix.</p>
<p>That fails when the failure includes the tool itself — a bad update, a hijacked path, a module that should not have had broad power. Recovery still matters. It is not the same as limiting damage while something is wrong.</p>
<p>We design for the second problem: assume a part can be compromised, and make lateral movement hard.</p>
<p>AL’S-OPS LLC is a Utah company building privacy-first infrastructure software.</p>
<h3>What changed</h3>
<ul>
<li>Clear separation between watching and acting — detection does not automatically inherit high-impact power</li>
<li>Actions stay narrow and explicit; bigger steps wait for operator approval</li>
<li>Limits live with the server, not only in a remote policy the attacker might also reach</li>
<li>Integrity checks so a component that does not match what we shipped does not get a free pass to run powerful paths</li>
<li>Expiry and undo on automated steps so a bad decision decays instead of living forever</li>
</ul>
<h3>The real problem</h3>
<p>If any module, agent path, or host-side piece can be wrong, “we’ll patch it” is incomplete. Patching is what you do after. Containment is what limits spread <strong>during</strong>.</p>
<p>A tool that can only succeed when every part is healthy is fragile under the conditions operators actually hit.</p>
<h3>What we are not doing</h3>
<ul>
<li>Claiming compromise is impossible</li>
<li>Building a heavier platform that needs a security team to interpret</li>
<li>Hiding how controls behave when they are on</li>
<li>Treating “documented” as the same as “enforced on the host”</li>
</ul>
<p>Assume a part can fail. Make sure that failure does not get the rest of the system for free.</p>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/assume-compromise-limit-the-blast">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[SSH hardening for Linux servers: settings you can verify]]></title><description><![CDATA[The sshd_config settings that matter on Debian, Ubuntu and RHEL, why a pasted config often changes nothing, and how to prove each setting is in effect.]]></description><link>https://als-ops.hashnode.dev/ssh-hardening-for-linux-servers-settings-you-can-verify</link><guid isPermaLink="true">https://als-ops.hashnode.dev/ssh-hardening-for-linux-servers-settings-you-can-verify</guid><category><![CDATA[Linux]]></category><category><![CDATA[Security]]></category><category><![CDATA[ssh]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 15:00:03 GMT</pubDate><content:encoded><![CDATA[<p>Most SSH hardening guides are lists of settings to paste. The catch is that sshd quietly ignores a setting when an earlier one wins, so a pasted config can look right and change nothing.</p>
<p>Keep an existing session open while you work and test every change from a second terminal.</p>
<h2>sshd uses the first value it reads</h2>
<p>For most keywords, sshd uses the first value it reads, not the last (<a href="https://man.openbsd.org/sshd_config">sshd_config(5)</a>). On Debian and Ubuntu, <code>/etc/ssh/sshd_config</code> starts with <code>Include /etc/ssh/sshd_config.d/*.conf</code>, read in lexical order. A drop-in called <code>10-hardening.conf</code> beats the main file and any drop-in that sorts after it.</p>
<p>The reliable check is to ask sshd itself:</p>
<pre><code class="language-bash">sudo sshd -t   # syntax check, silent when valid
sudo sshd -T | grep -iE "passwordauthentication|permitrootlogin"   # effective values
</code></pre>
<h2>Baseline</h2>
<p>Create the login group first, or <code>AllowGroups</code> locks you out:</p>
<pre><code class="language-bash">sudo groupadd ssh-users
sudo usermod -aG ssh-users deploy
</code></pre>
<pre><code># /etc/ssh/sshd_config.d/10-hardening.conf
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no
AllowGroups ssh-users
MaxAuthTries 3
LoginGraceTime 30
X11Forwarding no
AllowAgentForwarding no
</code></pre>
<pre><code class="language-bash">sudo sshd -t &amp;&amp; sudo systemctl reload ssh   # sshd on RHEL/Fedora
ssh -o PubkeyAuthentication=no -o PreferredAuthentications=password deploy@your-server
# expect: Permission denied (publickey)
</code></pre>
<p>Before OpenSSH 10.6, every key your agent offers counts against <code>MaxAuthTries</code>, so pin keys per host with <code>IdentityFile</code> + <code>IdentitiesOnly yes</code>.</p>
<h2>Built-in brute-force penalties (OpenSSH 9.8+)</h2>
<p><a href="https://www.openssh.com/txt/release-9.8">OpenSSH 9.8</a> added <code>PerSourcePenalties</code>, on by default. On 9.8 or later you already have basic throttling; exempt a shared office/VPN range with <code>PerSourcePenaltyExemptList</code>.</p>
<h2>Limit where SSH is reachable</h2>
<pre><code class="language-bash">sudo ufw allow from 203.0.113.0/24 to any port 22 proto tcp
</code></pre>
<p>Changing the port only cuts log noise. On Ubuntu 22.10+ SSH is socket-activated: run <code>systemctl daemon-reload</code> then <code>systemctl restart ssh.socket</code> (<a href="https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/2069041">LP#2069041</a>).</p>
<h2>Hardware keys, crypto defaults, patching</h2>
<ul>
<li><code>ssh-keygen -t ed25519-sk</code> puts the key on a FIDO token (OpenSSH 8.2+).</li>
<li>Don't paste old <code>Ciphers</code>/<code>KexAlgorithms</code> lists: they drop the default post-quantum hybrid <code>mlkem768x25519-sha256</code>. Audit with <a href="https://github.com/jtesta/ssh-audit">ssh-audit</a> and remove items with a leading <code>-</code>. On RHEL use <code>update-crypto-policies</code>.</li>
<li><a href="https://nvd.nist.gov/vuln/detail/CVE-2024-6387">CVE-2024-6387</a> (regreSSHion) hit portable OpenSSH 8.5p1–9.7p1. Distros backport fixes, so check your distro's tracker, not the version string.</li>
</ul>
<h2>Watch successful logins</h2>
<pre><code class="language-bash">sudo journalctl -u ssh --since yesterday | grep Accepted
</code></pre>
<p>Since 9.8 some lines are tagged <code>sshd-session</code>; filtering by unit catches both.</p>
<p>Full guide with the reasoning for each setting and a verification table: <a href="https://alsopss.com/blog/ssh-hardening">https://alsopss.com/blog/ssh-hardening</a></p>
]]></content:encoded></item><item><title><![CDATA[Fail2ban alternatives for Linux servers]]></title><description><![CDATA[Fail2ban alternatives compared: SSHGuard, CrowdSec, Wazuh and Vigilhold. What each blocks, whether bans are shared across servers, cost, and when to…]]></description><link>https://als-ops.hashnode.dev/fail2ban-alternatives-for-linux-servers</link><guid isPermaLink="true">https://als-ops.hashnode.dev/fail2ban-alternatives-for-linux-servers</guid><category><![CDATA[Security]]></category><category><![CDATA[Linux]]></category><category><![CDATA[guide]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:55:03 GMT</pubDate><content:encoded><![CDATA[<p>Fail2ban reads log files, spots repeated failures such as bad SSH passwords, and adds a firewall rule to ban the address for a while. It is free, widely packaged and does that one job well. People look for alternatives for a few recurring reasons.</p>
<h2>Why people look elsewhere</h2>
<ul>
<li>Each server bans on its own. An address banned on one server can keep attacking the others.</li>
<li>It fails silently. If a log path or format changes, fail2ban keeps running and simply matches nothing, which looks the same as a quiet week.</li>
<li>It only blocks. It doesn’t tell you about the login that succeeded, the process that started afterwards or the file that changed.</li>
<li>Regex filters and jail files take time to tune and to keep working across distributions.</li>
</ul>
<h2>The alternatives</h2>
<h3>SSHGuard</h3>
<p>A small daemon written in C that watches logs for SSH and a few other services and blocks attackers through your firewall. It is lighter and simpler than fail2ban, with less to configure, but it has the same scope: one host, blocking only.</p>
<h3>CrowdSec</h3>
<p>An open-source engine that parses logs with community-maintained scenarios and hands decisions to “bouncers” that enforce them in the firewall, a web server or a CDN. Its main difference is the community blocklist: addresses reported by other users can be blocked before they reach you. The engine is free; a hosted console adds paid features. <a href="https://vigilhold.com/compare/crowdsec">Vigilhold vs CrowdSec, in detail</a></p>
<h3>Wazuh active response</h3>
<p>Wazuh is a full open-source security platform: log analysis, file integrity monitoring, vulnerability detection and more, with “active response” scripts that can block addresses. It does far more than fail2ban, and asks far more of you: a manager, an indexer and a dashboard to install, size and keep updated. <a href="https://vigilhold.com/compare/wazuh">Vigilhold vs Wazuh, in detail</a></p>
<h3>Vigilhold</h3>
<p>Our hosted host agent for Linux servers. When a response playbook bans an address, the ban goes to every server in your account, and servers that were offline pick it up when they reconnect. It also watches logins, processes, connections and file changes, and warns you if a server with SSH open to the internet stops reporting login activity for three hours, which catches the silent-failure case above. <a href="https://vigilhold.com/compare/fail2ban">Vigilhold vs fail2ban, in detail</a></p>
<h2>Side by side</h2>
<table>
<thead>
<tr>
<th></th>
<th>fail2ban</th>
<th>SSHGuard</th>
<th>CrowdSec</th>
<th>Wazuh</th>
<th>Vigilhold</th>
</tr>
</thead>
<tbody><tr>
<td>Blocks attacking IPs</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes, via active response</td>
<td>Yes</td>
</tr>
<tr>
<td>Bans shared across your servers</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
<td>Configurable</td>
<td>Yes</td>
</tr>
<tr>
<td>Detects what happens after a login</td>
<td>No</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Warns when log monitoring goes quiet</td>
<td>No</td>
<td>No</td>
<td>Not by default</td>
<td>Not by default</td>
<td>Yes</td>
</tr>
<tr>
<td>You run the server side</td>
<td>Nothing to run</td>
<td>Nothing to run</td>
<td>Optional</td>
<td>Yes</td>
<td>No, hosted</td>
</tr>
<tr>
<td>Cost</td>
<td>Free</td>
<td>Free</td>
<td>Free engine, paid console</td>
<td>Free, or paid cloud</td>
<td>From $39/month for 5 servers</td>
</tr>
</tbody></table>
<h2>Which one to pick</h2>
<ul>
<li>One or two personal servers and fail2ban works: keep it, and check fail2ban-client status now and then to confirm it is still counting failures.</li>
<li>You want fail2ban’s job with less to configure: SSHGuard.</li>
<li>You want blocklists informed by many other servers: CrowdSec.</li>
<li>You have the people to run a security platform and need broad coverage: Wazuh.</li>
<li>A small team running a fleet that wants bans shared everywhere and detection beyond blocking, without running a server for it: Vigilhold, with a 14-day trial and no card.</li>
</ul>
<p>Setting up a new server? The checklist covers fail2ban settings that commonly break on recent distributions. <a href="https://alsopss.com/blog/secure-linux-vps-checklist">How to secure a Linux VPS</a></p>
<blockquote>
<p>A ban tool that silently stops matching is worse than none, because it looks like protection. Whatever you choose, check that it is still counting.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/fail2ban-alternatives">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to secure a Linux VPS: a practical checklist]]></title><description><![CDATA[Secure a Linux VPS step by step: updates, SSH keys, firewall, brute-force protection, open ports and monitoring, with commands and a check for each step.]]></description><link>https://als-ops.hashnode.dev/how-to-secure-a-linux-vps-a-practical-checklist</link><guid isPermaLink="true">https://als-ops.hashnode.dev/how-to-secure-a-linux-vps-a-practical-checklist</guid><category><![CDATA[Linux]]></category><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[#selfhosted]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:50:03 GMT</pubDate><content:encoded><![CDATA[<p>A new server on a public IP address starts receiving SSH login attempts within minutes. Almost all of them are automated and almost all of them fail, as long as a few basics are in place. This checklist covers those basics for Debian and Ubuntu; the ideas are the same on other distributions.</p>
<p>Keep your current SSH session open while you change SSH or firewall settings, and test from a second terminal. That way a mistake doesn’t lock you out.</p>
<h2>1. Install updates, and keep installing them</h2>
<pre><code class="language-bash">sudo apt update &amp;&amp; sudo apt upgrade
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
</code></pre>
<p>Automatic security updates close known holes without anyone remembering to log in. Reboot when a kernel update asks for it.</p>
<h2>2. Log in as a normal user with an SSH key</h2>
<pre><code class="language-bash">sudo adduser deploy
sudo usermod -aG sudo deploy
# from your own computer:
ssh-copy-id deploy@your-server
</code></pre>
<p>Check that you can log in as that user with the key before going further.</p>
<h2>3. Turn off password and root logins</h2>
<p>Put your settings in a drop-in file so package updates don’t overwrite them:</p>
<pre><code class="language-bash"># /etc/ssh/sshd_config.d/10-hardening.conf
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no
</code></pre>
<pre><code class="language-bash">sudo sshd -t &amp;&amp; sudo systemctl reload ssh
sudo sshd -T | grep -E "passwordauthentication|permitrootlogin"
</code></pre>
<p>The last command prints the settings sshd is really using. If it still says yes, another file is setting the value first: sshd uses the first value it reads, so check the other files in sshd_config.d. On RHEL-based systems the service is called sshd instead of ssh.</p>
<h2>4. Close every port you don’t need</h2>
<pre><code class="language-bash">sudo ss -tulpn
sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw allow 443/tcp   # only if this server serves HTTPS
sudo ufw enable
</code></pre>
<p>ss shows what is listening. Anything listening on 0.0.0.0 that only needs to be reached locally, such as a database, should listen on 127.0.0.1 instead.</p>
<p>Running Docker? Ports published with -p are opened by Docker’s own firewall rules and are reachable even when ufw says they are blocked. Publish to 127.0.0.1 (for example -p 127.0.0.1:5432:5432) unless the port really should be public.</p>
<h2>5. Block brute-force attempts</h2>
<pre><code class="language-bash"># /etc/fail2ban/jail.local
[sshd]
enabled = true
backend = systemd
</code></pre>
<pre><code class="language-bash">sudo apt install fail2ban
sudo systemctl restart fail2ban
sudo fail2ban-client status sshd
</code></pre>
<p>backend = systemd matters on systems that only log to the journal, which is the default on recent Debian. Without it the sshd jail has no log file to read. The status command should show a non-zero “Total failed” count within a day on any public server; if it stays at zero, the jail isn’t seeing your logs. <a href="https://alsopss.com/blog/fail2ban-alternatives">Alternatives to fail2ban</a></p>
<h2>6. Keep backups somewhere else</h2>
<p>A backup stored on the same server disappears with it. Copy backups to another provider or account, and restore one now and then to prove it works.</p>
<h2>7. Watch for what gets through</h2>
<p>Everything above lowers the odds of a break-in; none of it tells you if one happens. At minimum, look at recent logins and new listening ports from time to time:</p>
<pre><code class="language-bash">last -a | head
sudo journalctl -u ssh --since "24 hours ago" | grep Accepted
sudo ss -tulpn
</code></pre>
<p>Past a handful of servers, that turns into a job nobody has time for. A host-based intrusion detection system does the watching for you. <a href="https://alsopss.com/blog/host-based-intrusion-detection-system">What a HIDS does</a></p>
<h2>The short version</h2>
<table>
<thead>
<tr>
<th>Step</th>
<th>Check it worked</th>
</tr>
</thead>
<tbody><tr>
<td>Automatic updates</td>
<td>systemctl list-timers apt-daily-upgrade shows a next run</td>
</tr>
<tr>
<td>Key-only SSH, no root</td>
<td>sshd -T shows passwordauthentication no and permitrootlogin no</td>
</tr>
<tr>
<td>Firewall</td>
<td>ufw status lists only the ports you meant to open</td>
</tr>
<tr>
<td>Brute-force blocking</td>
<td>fail2ban-client status sshd shows failed attempts being counted</td>
</tr>
<tr>
<td>Backups</td>
<td>You restored one recently</td>
</tr>
<tr>
<td>Monitoring</td>
<td>You would know about a new login today, not next month</td>
</tr>
</tbody></table>
<p>Vigilhold, our host agent for Linux servers, covers step 7 across a whole fleet: it watches logins, processes, connections and file changes on every server, and warns you if a server with SSH open stops reporting login activity, which is how a broken setup like a blind fail2ban jail usually shows up. <a href="https://alsopss.com/products">See Vigilhold</a></p>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/secure-linux-vps-checklist">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[What is a host-based intrusion detection system (HIDS)?]]></title><description><![CDATA[What a host-based intrusion detection system watches, how HIDS differs from NIDS, EDR and SIEM, and the open-source and hosted options for Linux servers.]]></description><link>https://als-ops.hashnode.dev/what-is-a-host-based-intrusion-detection-system-hids</link><guid isPermaLink="true">https://als-ops.hashnode.dev/what-is-a-host-based-intrusion-detection-system-hids</guid><category><![CDATA[Security]]></category><category><![CDATA[Linux]]></category><category><![CDATA[guide]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:45:03 GMT</pubDate><content:encoded><![CDATA[<p>A host-based intrusion detection system (HIDS) is software that runs on the server itself and watches for signs that someone has broken in or is trying to. Where a network intrusion detection system watches traffic passing a point on the network, a HIDS sees what actually happens on the machine: who logged in, what ran, what connected out and which files changed.</p>
<h2>What a HIDS watches</h2>
<ul>
<li>Logins: successful and failed SSH logins, new users, sudo use, logins from places or at times that don’t fit.</li>
<li>Processes: new or unusual programs, especially ones started by a web server or running from /tmp.</li>
<li>Network connections: listening ports that appear, and outbound connections to addresses that have no business being contacted.</li>
<li>File integrity: changes to system binaries, SSH keys, cron jobs, systemd units and other places attackers use to stay in.</li>
<li>Logs: authentication, kernel and application logs, matched against known attack patterns.</li>
</ul>
<p>Most real intrusions on Linux servers leave traces in several of these at once: a brute-forced login, then a download, then a new cron entry or SSH key so the attacker can come back. A HIDS is useful because it can connect those steps on the host where they happen.</p>
<h2>HIDS vs NIDS</h2>
<table>
<thead>
<tr>
<th></th>
<th>Host-based (HIDS)</th>
<th>Network-based (NIDS)</th>
</tr>
</thead>
<tbody><tr>
<td>Runs on</td>
<td>Each server</td>
<td>A network tap, span port or gateway</td>
</tr>
<tr>
<td>Sees</td>
<td>Logins, processes, files, local logs</td>
<td>Packets and flows between machines</td>
</tr>
<tr>
<td>Encrypted traffic</td>
<td>Sees what happens after it is decrypted on the host</td>
<td>Mostly sees metadata only</td>
</tr>
<tr>
<td>Blind spot</td>
<td>Hosts without an agent</td>
<td>What happens inside a host</td>
</tr>
<tr>
<td>Fits</td>
<td>Cloud and VPS servers you don’t control the network for</td>
<td>Networks you own end to end</td>
</tr>
</tbody></table>
<p>For servers rented from a cloud or VPS provider you usually can’t put a sensor on the network at all, so host-based detection is the practical option.</p>
<h2>HIDS vs EDR vs SIEM</h2>
<ul>
<li>HIDS: detects and alerts on activity on one host. Classic examples are OSSEC and file integrity checkers like AIDE.</li>
<li>EDR (endpoint detection and response): a HIDS plus the ability to respond, such as killing a process or isolating a machine, usually with a central console. Many EDR products were built for laptops and Windows first.</li>
<li>SIEM: collects logs from everything into one place to search and correlate. It depends on agents or log shippers on the hosts to feed it, and someone has to read what it finds.</li>
</ul>
<h2>Options for Linux servers</h2>
<table>
<thead>
<tr>
<th>Tool</th>
<th>What it is</th>
<th>Good to know</th>
</tr>
</thead>
<tbody><tr>
<td>OSSEC</td>
<td>The original open-source HIDS: log analysis, file integrity, rootkit checks</td>
<td>Mature and still actively released</td>
</tr>
<tr>
<td>Wazuh</td>
<td>Open-source platform that grew out of OSSEC, with agents, a manager, an indexer and a dashboard</td>
<td>Very capable; you run and maintain the server side</td>
</tr>
<tr>
<td>AIDE</td>
<td>File integrity checker that compares files against a stored database</td>
<td>Detects changes only; needs scheduling and someone to read reports</td>
</tr>
<tr>
<td>auditd</td>
<td>The Linux kernel audit framework</td>
<td>Records almost anything; turning records into alerts is up to you</td>
</tr>
<tr>
<td>Falco</td>
<td>Runtime detection from system calls, aimed at containers and Kubernetes</td>
<td>Rules engine; alerts need routing somewhere</td>
</tr>
<tr>
<td>osquery</td>
<td>Exposes system state as SQL tables</td>
<td>Great for asking questions; not an alerting product on its own</td>
</tr>
<tr>
<td>Vigilhold</td>
<td>Hosted agent and console from Al’s-Ops</td>
<td>Detection plus limited response you approve; from $39/month for five servers</td>
</tr>
</tbody></table>
<p>Tools like fail2ban, SSHGuard and CrowdSec are often mentioned in the same breath. They block addresses that attack a service, which is prevention for one kind of attack rather than intrusion detection, but they pair well with a HIDS. <a href="https://alsopss.com/blog/fail2ban-alternatives">Compare fail2ban alternatives</a></p>
<h2>What to look for</h2>
<ol>
<li>Alerts a person will read: grouped repeats and plain explanations, not one message per log line.</li>
<li>Coverage you can check: a way to see that every server is reporting, and a warning when one goes quiet.</li>
<li>Response you control: automatic actions limited to safe ones, with anything disruptive waiting for approval.</li>
<li>Setup time that matches your team: an open-source stack is free to download but someone has to run it.</li>
</ol>
<h2>Where Vigilhold fits</h2>
<p>Vigilhold is a host agent for Linux servers, including Docker hosts, with one web console for all of them. It watches logins, processes, connections and file changes, explains critical and warning alerts in two sentences, and asks before anything disruptive. When a response playbook bans an address, the ban reaches every server in the account. It installs with one command per host. <a href="https://alsopss.com/products">How Vigilhold works</a></p>
<blockquote>
<p>A HIDS answers one question a firewall can’t: what actually happened on this server?</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/host-based-intrusion-detection-system">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Domain trust alone is not enough]]></title><description><![CDATA[A valid domain certificate can still reach the wrong server. Double Sign adds a separate node authorization, so domain control alone can’t impersonate one.]]></description><link>https://als-ops.hashnode.dev/domain-trust-alone-is-not-enough</link><guid isPermaLink="true">https://als-ops.hashnode.dev/domain-trust-alone-is-not-enough</guid><category><![CDATA[Security]]></category><category><![CDATA[TLS]]></category><category><![CDATA[pki]]></category><category><![CDATA[infrastructure]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:40:03 GMT</pubDate><content:encoded><![CDATA[<p>HTTPS answers whether a certificate is authorized for a domain name. The tempting assumption is that this is enough to trust the machine on the other end of the connection.</p>
<p>It fails when DNS is hijacked, a registrar path is abused, or validation still succeeds while traffic terminates on an attacker-controlled host. The client can see a valid domain certificate and still not be talking to an authorized server.</p>
<p>We wrote up Double Sign (Double Certificate Authority): require a second, independent cryptographic authorization for the node — not only the domain — before the client accepts the connection.</p>
<p>AL'S-OPS LLC is a Utah company building privacy-first infrastructure software.</p>
<h2>What changed</h2>
<ul>
<li>Domain authentication stays on the usual Web PKI path (TLS certificate for the name).</li>
<li>Node authentication is a separate credential binding a server key to an authorized IP, service, or node identity, validated against a trust anchor that is not the domain’s DNS or registrar path.</li>
<li>The server must prove possession of the private key.</li>
<li>Both paths must succeed. Domain-valid without node-valid is a reject. Node-valid does not authorize an unrelated domain.</li>
<li>Trust anchor design separates a long-lived offline root from delegated operational keys, with signed epoch metadata, revocation, and anti-rollback patterns in the spirit of systems like The Update Framework (TUF).</li>
<li>Baseline operational policy uses monthly trust epochs for credential renewal (and preferably key rotation), while compromised keys remain revocable immediately.</li>
</ul>
<h2>The real problem</h2>
<p>Proving control of a domain is not the same as proving authorization to operate the server that claims to represent that domain. A single validation path tied to DNS and registrar infrastructure is a single place that path can fail open for the attacker.</p>
<p>Double Sign is meant to force a second defeat: the attacker needs a valid node credential and private key, not only a domain certificate that looks legitimate.</p>
<h2>What we are not doing</h2>
<ul>
<li>Replacing TLS, Certificate Transparency, RPKI, or DANE — those solve different parts of the problem.</li>
<li>Claiming browser-wide deployment or a shipped product feature in this note.</li>
<li>Treating a second signature as meaningful if it depends on the same administrators, DNS path, or trust root as the first.</li>
<li>Inventing customers, fleet size, or adoption metrics.</li>
</ul>
<blockquote>
<p>Domain identity and server authorization should not share one quiet point of failure. If the second signature is not independent, it is not a second signature.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/domain-trust-alone-is-not-enough">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[The default is the product]]></title><description><![CDATA[Shipping response on by default makes the first hour the riskiest. We keep observe as the default and treat that choice as the product.]]></description><link>https://als-ops.hashnode.dev/the-default-is-the-product</link><guid isPermaLink="true">https://als-ops.hashnode.dev/the-default-is-the-product</guid><category><![CDATA[infrastructure]]></category><category><![CDATA[engineering]]></category><category><![CDATA[Security]]></category><category><![CDATA[Reliability]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:35:03 GMT</pubDate><content:encoded><![CDATA[<p>Most tools ship the active path on.</p>
<p>Response is enabled. Automation is eager. The operator is expected to turn risk down after install. That is the easy default. It also means the first hour on a host is the one least reviewed and the most capable of doing harm.</p>
<blockquote>
<p>We do the inverse.</p>
</blockquote>
<p>AL'S-OPS LLC is a Utah company building privacy-first infrastructure software.</p>
<h2>What changed</h2>
<ul>
<li>Observe is the default on a new host.</li>
<li>Response is a mode, not a surprise.</li>
<li>If the mode is off, the system watches and records. It does not ban, kill, or revert.</li>
<li>Destructive actions stay behind an explicit switch the operator can see.</li>
</ul>
<h2>The real problem</h2>
<p>A silent default that acts is harder to audit than a silent default that does not.</p>
<p>Install docs rarely get read in full. Dashboards get opened later. The path that runs before anyone looks is the product, whether you named it that way or not. If that path can change the host, the company owns the outcome.</p>
<h2>What we are not doing</h2>
<ul>
<li>Not shipping response on "for convenience"</li>
<li>Not treating automation theater as a feature list</li>
<li>Not asking operators to discover the off switch under pressure</li>
<li>Not publishing counts from our own machines as proof that the default is safe</li>
</ul>
<blockquote>
<p>The default is the product. If you would not defend that path in the first hour, do not ship it on.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/the-default-is-the-product">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Dual-Write With the Flag Off]]></title><description><![CDATA[A dual-write on the servers table stayed behind a flag. That dark path caught a silent partial-column write bug before it could corrupt the mirror.]]></description><link>https://als-ops.hashnode.dev/dual-write-with-the-flag-off</link><guid isPermaLink="true">https://als-ops.hashnode.dev/dual-write-with-the-flag-off</guid><category><![CDATA[infrastructure]]></category><category><![CDATA[Databases]]></category><category><![CDATA[Reliability]]></category><category><![CDATA[engineering]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:30:03 GMT</pubDate><content:encoded><![CDATA[<p>The tempting version of a storage change is a cutover.</p>
<p>Turn off the old path.</p>
<p>Turn on the new path.</p>
<p>Hope both still mean the same thing.</p>
<p>That is how you get a clean demo and a dirty night.</p>
<p>AL'S-OPS LLC is a Utah company building privacy-first infrastructure software. This week we did not cut over. We added a dual-write on the servers table and left the production flag off.</p>
<h2>What shipped</h2>
<p>Two write paths — upsertServer() and markServerOffline() — also write to an in-memory mirror. The mirror sits behind MIRROR_DB_ENABLED, which defaults to off.</p>
<p>Around that:</p>
<ul>
<li>A parity checker comparing Postgres to the mirror</li>
<li>A queue-flush job</li>
<li>A parity-check job</li>
<li>A burn-in loop instead of assuming the first write was correct</li>
</ul>
<p>The new store is not live in production. That is intentional.</p>
<h2>Why the flag mattered</h2>
<p>A real bug showed up in the write-path SQL.</p>
<p>Partial-column updates would have silently corrupted mirror data.</p>
<p>Not a crash. Not a useful stack trace. Wrong state later, when you no longer remember which write did it.</p>
<blockquote>
<p>That is the class of failure dual-write is for. You want the new path to fail while the old path is still the source of truth.</p>
</blockquote>
<h2>The rest of the same stretch</h2>
<ul>
<li>A stability and security sweep (9 fixes)</li>
<li>Retirement of the previous store</li>
<li>Early work on the next mirror layers — still dark</li>
</ul>
<p>Order mattered more than any one item: retire what you can, put the new path behind a flag, write to both, compare, then argue about turning it on.</p>
<h2>The rule</h2>
<p>Storage migrations die in the gap between "it compiled" and "every write shape was tested."</p>
<p>Partial updates look harmless. They are how two systems drift until neither copy is trusted.</p>
<blockquote>
<p>Find that while the mirror is dark. Keep the flag off until parity is boring.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/dual-write-with-the-flag-off">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[If the Safe Path Is Optional, It Will Not Get Used]]></title><description><![CDATA[Optional safety loses to whatever is already on. A checkbox is not a safeguard. The first-run state is the product.]]></description><link>https://als-ops.hashnode.dev/if-the-safe-path-is-optional-it-will-not-get-used</link><guid isPermaLink="true">https://als-ops.hashnode.dev/if-the-safe-path-is-optional-it-will-not-get-used</guid><category><![CDATA[Company]]></category><category><![CDATA[productdesign]]></category><category><![CDATA[defaults]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:25:03 GMT</pubDate><content:encoded><![CDATA[<p>Most teams do not fail because they forgot a setting.</p>
<p>They fail because the setting existed, the docs mentioned it, and the person who needed it was already busy.</p>
<p>AL'S-OPS LLC is a Utah company building privacy-first security and infrastructure tools. One rule keeps showing up in the work: if the safe path is optional, it will not get used.</p>
<p>Not because people are careless. Because optional safety is extra work, and extra work loses to whatever is already on.</p>
<h2>Configuration is not the same as protection</h2>
<p>A product can look complete and still leave the hard choice to the user.</p>
<ul>
<li>Turn on the safer mode.</li>
<li>Tighten the default.</li>
<li>Read the checklist.</li>
<li>Do not click the dangerous thing.</li>
</ul>
<blockquote>
<p>That is not a design. That is a transfer of responsibility.</p>
</blockquote>
<p>The tired operator will not complete your configuration journey. They will accept the default and move on. If that default is loose, the product was loose. The checkbox you added later does not change that.</p>
<h2>What this looks like in practice</h2>
<ul>
<li>A dashboard that flashes 0 while data is still loading. That reads as "nothing is wrong" when the truth is "we do not know yet." Empty or a loading state is the safer default.</li>
<li>A first-run install that leaves a destructive action one click away, with the confirm buried in an advanced tab. Most people never open that tab.</li>
<li>A privacy control that is off until someone finds it. If extra collection is the out-of-box state, the product chose that — not the user.</li>
<li>A security tool that says "you can lock this down in settings." If the loose mode is what ships, the loose mode is what runs at 2 a.m.</li>
</ul>
<p>Same pattern every time. The optional safer path loses.</p>
<h2>What a strong default actually means</h2>
<p>A strong default is not "locked down until nobody can work."</p>
<p>It is the path that is reasonable before anyone has time to think.</p>
<ul>
<li>The interface should not invent a zero while data is still loading.</li>
<li>The first-run posture should not require a specialist.</li>
<li>Privacy should not be a later toggle.</li>
<li>Destructive actions should be obvious and reversible.</li>
<li>Quiet failure should be rarer than loud honesty.</li>
</ul>
<p>If a user has to opt into those things, the product is asking them to finish the engineering.</p>
<h2>Why this is uncomfortable to ship</h2>
<p>Weak defaults demo better.</p>
<p>They look flexible.</p>
<p>They look customizable.</p>
<p>They let a conversation say "you can configure that."</p>
<p>Strong defaults look opinionated. They also survive the first bad night.</p>
<blockquote>
<p>We would rather explain why something is on than explain why something bad happened because it was off.</p>
</blockquote>
<h2>The short version</h2>
<p>Do not confuse a setting with a safeguard.</p>
<p>If the safe path is buried, it is not a path. It is a footnote. Design the first state as if nobody will ever open the advanced tab. Most people will not.</p>
<blockquote>
<p>That is not pessimism. That is how software actually gets used.</p>
</blockquote>
<hr />
<p><em>Originally published on the <a href="https://alsopss.com/blog/if-the-safe-path-is-optional">Al's-Ops blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[CrowdSec vs fail2ban - which one should guard your Linux server?]]></title><description><![CDATA[Disclosure: I work on Vigilhold, a hosted security agent for Linux servers. This post compares two...]]></description><link>https://als-ops.hashnode.dev/crowdsec-vs-fail2ban-which-one-should-guard-your-linux-server</link><guid isPermaLink="true">https://als-ops.hashnode.dev/crowdsec-vs-fail2ban-which-one-should-guard-your-linux-server</guid><category><![CDATA[Linux]]></category><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[#selfhosted]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:22:47 GMT</pubDate><content:encoded><![CDATA[<p><em>Disclosure: I work on Vigilhold, a hosted security agent for Linux servers. This post compares two open-source tools I don't make; the Vigilhold part is one paragraph at the end and clearly marked.</em></p>
<p>If you run a VPS with SSH open to the internet, your auth log fills with password guesses within minutes. The two tools most people reach for are <strong>fail2ban</strong> and <strong>CrowdSec</strong>. Both read your logs and block the addresses behind failed logins. They differ in three ways:</p>
<ol>
<li>where the decision is made</li>
<li>where the block is applied</li>
<li>whether you learn from other people's attackers</li>
</ol>
<h2>At a glance</h2>
<table>
<thead>
<tr>
<th></th>
<th>fail2ban</th>
<th>CrowdSec</th>
</tr>
</thead>
<tbody><tr>
<td>License</td>
<td>GPL-2.0, free</td>
<td>Engine MIT, free; optional Console with a free plan and paid plans</td>
</tr>
<tr>
<td>Reads</td>
<td>Log files (auth.log, sshd, Apache… out of the box)</td>
<td>Log files and HTTP requests from compatible web servers</td>
</tr>
<tr>
<td>Blocks with</td>
<td>The server's own firewall, for a set time</td>
<td>"Bouncers" for the firewall, web server, reverse proxy or CDN</td>
</tr>
<tr>
<td>Several servers</td>
<td>Each decides alone</td>
<td>Detect on one machine, block on many, via a local API</td>
</tr>
<tr>
<td>Shared intelligence</td>
<td>None</td>
<td>Community blocklist if you share what you detect</td>
</tr>
<tr>
<td>Web attacks</td>
<td>Whatever a log filter matches</td>
<td>AppSec (WAF) component with ModSecurity rules / OWASP CRS</td>
</tr>
<tr>
<td>Written in</td>
<td>Python</td>
<td>Go</td>
</tr>
</tbody></table>
<h2>fail2ban in one paragraph</h2>
<p>Filters (regexes) match log lines like a failed SSH password. When one address matches too often inside a time window, a <em>jail</em> runs an <em>action</em>, usually a firewall rule that rejects that address for a while. It's in every distro's repos and works the evening you install it. Its own README is honest about the limit: it lowers the rate of password guessing but can't fix weak authentication. Use SSH keys anyway.</p>
<h2>CrowdSec in one paragraph</h2>
<p>CrowdSec splits detection from enforcement. A log processor matches behaviour patterns ("scenarios"); separate remediation components ("bouncers") enforce decisions wherever you want: nftables/iptables, nginx, a reverse proxy, a CDN. A local API joins them, so one box can detect and a dozen can block. Share your detections and you get a curated community blocklist back, so addresses hammering other users can be blocked before they reach you.</p>
<h2>Which one?</h2>
<ul>
<li><strong>One or two servers, key-only SSH, nothing else to babysit:</strong> fail2ban. Everything stays in text files on the box.</li>
<li><strong>Web apps, several servers, or blocking at the edge:</strong> CrowdSec, for the bouncers, the WAF component and the shared blocklist.</li>
<li><strong>They aren't exclusive.</strong> You can keep fail2ban for SSH and put CrowdSec in front of a web stack.</li>
</ul>
<h2>What neither one covers</h2>
<p>Both tools are about <strong>who is knocking</strong>. Neither looks at what happens <em>after</em> a login succeeds, or after a vulnerable web app gets popped: a new process listening on a port, a cron entry that wasn't there yesterday, a web server making outbound connections. If that's the part that worries you, you need a host-level tool (AIDE, Wazuh, Falco, or a hosted agent), not a log banner.</p>
<h2>Where Vigilhold fits (the disclosed part)</h2>
<p>Vigilhold is the hosted agent I work on. It bans attacking addresses too, and also watches processes, network connections, file changes and logins, then responds only within limits you set, with every action in an audit log you can undo. It runs alongside fail2ban or CrowdSec and uses fail2ban for its own bans when fail2ban is installed. There's a <a href="https://vigilhold.com/guides/crowdsec-vs-fail2ban">longer version of this comparison</a> with sources.</p>
<hr />
<p><strong>Sources (checked November 2026):</strong> <a href="https://github.com/fail2ban/fail2ban">fail2ban README</a> · <a href="https://docs.crowdsec.net/docs/intro">CrowdSec docs</a> · <a href="https://github.com/crowdsecurity/crowdsec">CrowdSec on GitHub</a> · <a href="https://app.crowdsec.net/pricing">CrowdSec Console pricing</a></p>
<p>What do you run on your servers, and why? I'm curious whether anyone's moved from one to the other.</p>
]]></content:encoded></item><item><title><![CDATA[metaForge: A Multi-Language Build & Automation Compiler]]></title><description><![CDATA[I’m excited to share metaForge, a multi-language MFG compiler that makes building, running, and...]]></description><link>https://als-ops.hashnode.dev/metaforge-a-multi-language-build-automation-compiler</link><guid isPermaLink="true">https://als-ops.hashnode.dev/metaforge-a-multi-language-build-automation-compiler</guid><category><![CDATA[General Programming]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[buildtools]]></category><category><![CDATA[#ProgrammingLanguages]]></category><dc:creator><![CDATA[Al’s-Ops LLC]]></dc:creator><pubDate>Mon, 30 Nov 2026 14:22:46 GMT</pubDate><content:encoded><![CDATA[<p>I’m excited to share metaForge, a multi-language MFG compiler that makes building, running, and managing code files across languages easy.
MetaForge parses .mfg files containing groups, blocks, arguments, and raw commands, expands variables, writes code files, and executes commands automatically. It’s designed for developers who want a flexible, multi-language build system.
📌 Key Features
Parse .mfg files into:
Groups: collections of blocks with variables
Blocks: named code files with optional run commands
Args blocks: conditional blocks triggered by CLI arguments
Raw variables &amp; commands: global scope
Variable Expansion: $var:name, $arg, $block:name, $group:name
Automatic File Creation &amp; Execution
Verbose Logging (-v or --verbose)
⚙️ Supported Languages
C++ (default, compiled, fastest)
JavaScript (Node.js based, easy to modify)
Python (widely accessible)
🚀 Quick Start
Create a .mfg file:
group js {
    var greeting = "Hello World!"</p>
<pre><code>block hello.js {
    code {
        console.log("$var:greeting");
    }
    run "node $block:hello.js"
}
</code></pre>
<p>}</p>
<p>run "rm -rf $group:js"
Run metaForge:
metaForge example.mfg
MetaForge will create hello.js with expanded variables, run it, and clean up automatically.
Example CLI:
metaForge build.mfg build    # Builds and runs everything
metaForge build.mfg clean    # Removes generated files
📖 Documentation
Full guides, syntax reference, and advanced examples: metaforge.alsopss.com/docs
🛠 Installation</p>
<h1>Build C++ version (default)</h1>
<p>make build</p>
<h1>Build JS or Python versions</h1>
<p>make build LANG=js
make build LANG=py</p>
<h1>Install</h1>
<p>sudo make install LANG=cpp
Custom installation paths and packaging are supported via PREFIX and DESTDIR.
🤝 Contributing
Contributions are welcome! Submit Pull Requests or open Discussions on GitHub: <a href="https://github.com/ALSOPSS/metaForge">https://github.com/ALSOPSS/metaForge</a></p>
]]></content:encoded></item></channel></rss>