<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daanial Farrukh</title>
    <description>The latest articles on DEV Community by Daanial Farrukh (@daanial).</description>
    <link>https://dev.to/daanial</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3966946%2F9807d012-5e5a-4dc5-8326-fc594b56bc62.png</url>
      <title>DEV Community: Daanial Farrukh</title>
      <link>https://dev.to/daanial</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/daanial"/>
    <language>en</language>
    <item>
      <title>Rank Math Sitemap Not Updating — the Cache That Was Not LiteSpeed or Cloudflare</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Fri, 27 Nov 2026 17:18:08 +0000</pubDate>
      <link>https://dev.to/daanial/rank-math-sitemap-not-updating-the-cache-that-was-not-litespeed-or-cloudflare-243n</link>
      <guid>https://dev.to/daanial/rank-math-sitemap-not-updating-the-cache-that-was-not-litespeed-or-cloudflare-243n</guid>
      <description>&lt;p&gt;&lt;em&gt;A field note about a sitemap that froze for almost three months on my own site — every new post missing, Google reading an old file — and the header check that told me to stop purging caches and look at the plugin.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This one did not happen in a customer room. It happened on this blog.&lt;/p&gt;

&lt;p&gt;I was reading the Search Console report for quabin.com at the end of August. One of my articles, a cPanel mail server checklist published in late June, sat in the Page indexing report under “Crawled – currently not indexed”.&lt;/p&gt;

&lt;p&gt;I opened the sitemap to check it was listed.&lt;/p&gt;

&lt;p&gt;It was not.&lt;/p&gt;

&lt;p&gt;The sitemap held &lt;strong&gt;2 URLs&lt;/strong&gt;. The site had more posts than that. And Search Console said it had last read the sitemap on &lt;strong&gt;9 June 2026&lt;/strong&gt;. Nearly three months of nothing.&lt;/p&gt;

&lt;p&gt;My first thought was the one everyone has on a WordPress site behind a page cache and a CDN.&lt;/p&gt;

&lt;p&gt;“It’s cached somewhere. Purge LiteSpeed. Purge Cloudflare.”&lt;/p&gt;

&lt;p&gt;That would have been the wrong afternoon.&lt;/p&gt;

&lt;p&gt;That’s the trap. A stale sitemap looks exactly like a caching problem. It is the first thing every guide tells you to purge. But when the cache is inside the SEO plugin itself, no page cache purge in the world will touch it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Sitemap Cache Actually Is
&lt;/h2&gt;

&lt;p&gt;Rank Math builds the XML sitemap on request, from the posts in the database. Building it every time is wasteful, so it keeps a ready copy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A sitemap cache is a stored copy of the generated sitemap that the plugin serves until something tells it the content changed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Publishing a post is supposed to be that signal. The flow is meant to be:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Publish post → Rank Math clears its sitemap cache → next request rebuilds the sitemap → Google reads the new file&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;On my site the second step stopped happening. Rank Math kept serving the copy it had built before 9 June. Every post published after that date was simply not in the file.&lt;/p&gt;

&lt;p&gt;There are three layers on a typical WordPress stack that can hold an old sitemap, and they look the same from outside:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The CDN&lt;/strong&gt; — Cloudflare or similar, caching the XML at the edge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The page cache&lt;/strong&gt; — LiteSpeed Cache, WP Rocket, Varnish, caching the response on the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The application&lt;/strong&gt; — the SEO plugin’s own stored copy in the WordPress database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only the first two are what people mean by “the cache”. The third one is the one nobody purges.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Purging Everything Did Not Look Wrong
&lt;/h2&gt;

&lt;p&gt;Here’s the part that trips people up.&lt;/p&gt;

&lt;p&gt;On most days, a page cache purge does fix a stale page. So it becomes a reflex. You purge, you reload, you see the same old file, and you assume the purge did not reach the right edge. So you purge again. Then you add the sitemap to the page cache’s exclude list. Then you start reading about Cloudflare Cache Rules.&lt;/p&gt;

&lt;p&gt;Every one of those steps is reasonable. None of them can change what the application generates.&lt;/p&gt;

&lt;p&gt;And the symptom in Search Console pointed the wrong way too. “Crawled – currently not indexed” sounds like a quality judgement on the article. It made me reread the post before I looked at the plumbing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A frozen sitemap does not throw an error. It just quietly stops telling Google about anything new.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Find Which Layer Is Stale
&lt;/h2&gt;

&lt;p&gt;The rule I follow now: before purging anything, ask each layer whether it served the response.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Fetch the sitemap with a cache-buster and read the headers
&lt;/h3&gt;

&lt;p&gt;A random query string makes most caches treat the request as new.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sI &lt;span class="s2"&gt;"https://example.com/post-sitemap.xml?nocache=12345"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You are reading three headers.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cf-cache-status&lt;/code&gt; tells you what Cloudflare did. &lt;code&gt;DYNAMIC&lt;/code&gt; means Cloudflare did not cache this response at all; it went to the origin. &lt;code&gt;HIT&lt;/code&gt; means the edge answered from its own copy.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;x-litespeed-cache-control&lt;/code&gt; (or your page cache’s equivalent) tells you whether the server-side cache stored it. &lt;code&gt;no-cache&lt;/code&gt; means it did not.&lt;/p&gt;

&lt;p&gt;And &lt;code&gt;x-robots-tag: noindex&lt;/code&gt; will very likely be there too. That one is normal on Rank Math sitemaps. Google still reads the file. Leave it alone.&lt;/p&gt;

&lt;p&gt;On my site the answer was &lt;code&gt;cf-cache-status: DYNAMIC&lt;/code&gt; and &lt;code&gt;x-litespeed-cache-control: no-cache&lt;/code&gt;. Both outer caches had stepped aside. The response came fresh from WordPress.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Read the body that came back fresh
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s &lt;span class="s2"&gt;"https://example.com/post-sitemap.xml?nocache=12345"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -c &lt;span class="s2"&gt;"&amp;lt;loc&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This counts the URLs in the file. Compare it with the number of published posts you expect.&lt;/p&gt;

&lt;p&gt;Mine said 2. The fresh, uncached, straight-from-the-app body was still wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is the verdict line: no outer cache served it, and the body is still wrong, so the application is generating the wrong output.&lt;/strong&gt; Stop chasing caches.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Look for a clean cut-off date
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s &lt;span class="s2"&gt;"https://example.com/post-sitemap.xml?nocache=12345"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep &lt;span class="s2"&gt;"&amp;lt;lastmod&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find the newest &lt;code&gt;lastmod&lt;/code&gt; in the file. Then list your posts published after that date.&lt;/p&gt;

&lt;p&gt;If every missing post is newer than the newest &lt;code&gt;lastmod&lt;/code&gt;, and every older post is present, you are looking at a snapshot. Something built the file on that date and has been serving it ever since. That clean cut-off is the fingerprint of an application-level cache, not a random missing entry.&lt;/p&gt;

&lt;p&gt;On my site every missing post was newer than the file. The checklist from late June was the clearest one.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Fix It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 4: Flush Rank Math’s sitemap cache
&lt;/h3&gt;

&lt;p&gt;The gentle way first:&lt;/p&gt;

&lt;p&gt;Rank Math SEO › Sitemap Settings › &lt;strong&gt;Save Changes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Change nothing. Just save. Saving the sitemap settings flushes the stored sitemap, and the next request rebuilds it from the database.&lt;/p&gt;

&lt;p&gt;If that does not clear it, there is a direct tool. In Easy Mode Rank Math hides it, so:&lt;/p&gt;

&lt;p&gt;Rank Math SEO › Dashboard › switch to &lt;strong&gt;Advanced Mode&lt;/strong&gt;, then Rank Math SEO › Status &amp;amp; Tools › Database Tools › &lt;strong&gt;Delete Sitemap Cache&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On my site the Save Changes click was enough.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Verify the file, not the button
&lt;/h3&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts.&lt;/p&gt;

&lt;p&gt;Run Step 2 again with a new cache-buster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s &lt;span class="s2"&gt;"https://example.com/post-sitemap.xml?nocache=67890"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -c &lt;span class="s2"&gt;"&amp;lt;loc&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The count should now match your published posts. Mine went from 2 to 4, and the missing checklist article was back in the file. Then check that your newest post is in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s &lt;span class="s2"&gt;"https://example.com/post-sitemap.xml?nocache=67890"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep &lt;span class="s2"&gt;"your-newest-slug"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it prints nothing, the rebuild did not happen. That is not a failure of the check. It is the check doing its job.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Tell Google
&lt;/h3&gt;

&lt;p&gt;Search Console › Sitemaps › enter the sitemap index URL › &lt;strong&gt;Submit&lt;/strong&gt;. The “Last read” date should move forward within a day or so.&lt;/p&gt;

&lt;p&gt;Then, for each post that was missing, use URL Inspection and click &lt;strong&gt;Request Indexing&lt;/strong&gt;. I did this for the checklist article the same day.&lt;/p&gt;

&lt;p&gt;One more thing I learned here. URL Inspection told me that article was already on Google and the page was indexed — while the Page indexing report still listed it as not indexed. The report lags by roughly a week. &lt;strong&gt;For a single URL, trust URL Inspection over the report.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Kept, and What Was Not the Fix
&lt;/h2&gt;

&lt;p&gt;During the hunt I added &lt;code&gt;sitemap&lt;/code&gt; to LiteSpeed Cache › Excludes › Do Not Cache URIs. That is a correct setting to keep. A sitemap should never be page-cached, because the page cache would then add a second layer of staleness on top of the plugin’s.&lt;/p&gt;

&lt;p&gt;But it was not the fix. The headers had already shown LiteSpeed was not serving the file. I want to be honest about that, because it would be easy to write this up as “exclude the sitemap from LiteSpeed” and send the next person down the same wrong road.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist I Run Now
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Count the URLs.&lt;/strong&gt; &lt;code&gt;curl -s "&amp;lt;sitemap&amp;gt;?nocache=N" | grep -c "&amp;lt;loc&amp;gt;"&lt;/code&gt; against the number of published posts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is the newest post listed?&lt;/strong&gt; &lt;code&gt;grep&lt;/code&gt; the newest slug in the same output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Who served it?&lt;/strong&gt; &lt;code&gt;curl -sI&lt;/code&gt; with a cache-buster and read &lt;code&gt;cf-cache-status&lt;/code&gt; and your page-cache header.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is there a cut-off?&lt;/strong&gt; Newest &lt;code&gt;lastmod&lt;/code&gt; in the file versus your newest post date.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flush at the right layer.&lt;/strong&gt; Fresh headers plus wrong body = plugin cache. Rank Math › Sitemap Settings › Save Changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When did Google last read it?&lt;/strong&gt; Search Console › Sitemaps › Last read. Weeks old on an active site is a warning.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The whole list takes two minutes. I now check item 2 after every post, as part of publishing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;When a client says “Google is not picking up our new pages”, I ask one question before anything else:&lt;/p&gt;

&lt;p&gt;“Is your newest page in the sitemap that the server is generating right now — and how do you know it wasn’t served from a cache?”&lt;/p&gt;

&lt;p&gt;If the answer is a curl with fresh headers and the slug in the output, they’re in good shape. If the answer is “we purged the cache”, we’re not done yet.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why is my Rank Math sitemap not updating with new posts?
&lt;/h3&gt;

&lt;p&gt;Rank Math keeps a stored copy of the generated sitemap and serves it until the cache is cleared. If that copy stops being cleared on publish, new posts never appear. Go to Rank Math SEO › Sitemap Settings and click Save Changes without changing anything to flush it, then check the sitemap again with a cache-buster.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I know if Cloudflare or LiteSpeed is caching my sitemap?
&lt;/h3&gt;

&lt;p&gt;Fetch the sitemap with a random query string using &lt;code&gt;curl -sI&lt;/code&gt; and read the headers. &lt;code&gt;cf-cache-status: DYNAMIC&lt;/code&gt; means Cloudflare passed it to the origin, and &lt;code&gt;x-litespeed-cache-control: no-cache&lt;/code&gt; means LiteSpeed did not store it. If both say that and the body is still old, the stale copy is in the application, not in those caches.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where is the Delete Sitemap Cache button in Rank Math?
&lt;/h3&gt;

&lt;p&gt;It is under Rank Math SEO › Status &amp;amp; Tools › Database Tools. Rank Math hides it in Easy Mode, so switch the plugin to Advanced Mode on its dashboard first. Try Sitemap Settings › Save Changes before this, because it is the gentler step and is often enough.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is the x-robots-tag noindex header on my sitemap a problem?
&lt;/h3&gt;

&lt;p&gt;No. Rank Math sends &lt;code&gt;x-robots-tag: noindex&lt;/code&gt; on its sitemap files so the XML itself does not appear in search results. Google still reads the sitemap and follows the URLs in it. Leave the header as it is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I exclude the sitemap from my page cache?
&lt;/h3&gt;

&lt;p&gt;Yes, it is good practice, because a page-cached sitemap adds a second layer that can go stale. In LiteSpeed Cache the setting is Excludes › Do Not Cache URIs. But excluding it will not fix a sitemap that the SEO plugin itself is serving from its own stale copy.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Pages report says my post is not indexed, but URL Inspection says it is on Google. Which is right?
&lt;/h3&gt;

&lt;p&gt;URL Inspection shows the current state of that one URL. The Page indexing report is rebuilt in batches and can lag by about a week. Trust URL Inspection for a single URL, and expect the report to catch up later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-rank-math-sitemap-not-updating-stale-cache.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/rank-math-sitemap-not-updating-stale-cache/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>seo</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>Web App Slow Only Through the WAF — Stripped gzip and a Per-Connection Throttle</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Thu, 26 Nov 2026 17:16:58 +0000</pubDate>
      <link>https://dev.to/daanial/web-app-slow-only-through-the-waf-stripped-gzip-and-a-per-connection-throttle-31hk</link>
      <guid>https://dev.to/daanial/web-app-slow-only-through-the-waf-stripped-gzip-and-a-per-connection-throttle-31hk</guid>
      <description>&lt;p&gt;&lt;em&gt;A field note about a web app that was fast on its own server and took 40 seconds to load for every user — two problems hiding in the security layer in front of it, and the curl tests I now run before anyone touches the database.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The call started the way these calls always start.&lt;/p&gt;

&lt;p&gt;“The application is slow. Every page. Forty, fifty seconds. We think the database needs more RAM.”&lt;/p&gt;

&lt;p&gt;It was a records-heavy internal web app. The usual stack: nginx in front, a Python app server behind it, a database behind that. Users reached it through a public address that sat on a web application firewall, the WAF, and the WAF passed traffic to the VM.&lt;/p&gt;

&lt;p&gt;“Is it slow on the server too?” I asked. “Or only for users?”&lt;/p&gt;

&lt;p&gt;There was a pause.&lt;/p&gt;

&lt;p&gt;“We haven’t checked it on the server. We just know users are complaining.”&lt;/p&gt;

&lt;p&gt;That question decided the next two days. Because the answer turned out to be: the server was fine. The VM could push the same file &lt;strong&gt;60 times faster&lt;/strong&gt; on its own loopback than any user ever received it. The slow part was not the app and not the database. It was the box in the middle that everyone treated as invisible.&lt;/p&gt;

&lt;p&gt;That’s the trap. A WAF does not show up as “slow”. It shows up as a healthy-looking app with unhappy users, and every eye goes to the database first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two Problems, One Symptom
&lt;/h2&gt;

&lt;p&gt;There were two separate problems at the edge. They had nothing to do with each other, and both made the same symptom.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem one: compression was stripped in transit.&lt;/strong&gt; The browser asked for gzip. The server could do gzip. What arrived at the browser was not gzipped. The main stylesheet alone was 1,398 KB raw. Gzipped, it is 164 KB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem two: every TCP connection was capped at about 400 Kbps.&lt;/strong&gt; Not the link. Not the total. Each single connection, at roughly 45 KB/s, flat, no matter how big the file or how fast the user’s line.&lt;/p&gt;

&lt;p&gt;Put them together and the maths is brutal. A 1.4 MB stylesheet at 45 KB/s is about 30 seconds — for one file. The page has dozens.&lt;/p&gt;

&lt;p&gt;Here is the path the traffic took:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Browser → public address on the WAF → firewall policy → VM (nginx → app server → database)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Most teams test only the last part. Both problems lived in the first part.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the Usual Checks Missed It
&lt;/h2&gt;

&lt;p&gt;Three things made this hard to see.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The server looked healthy.&lt;/strong&gt; CPU was low. The app logs showed requests finishing quickly. nginx did its job. Nothing on the VM was wrong, so nothing on the VM complained.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The network team looked for the wrong kind of limit.&lt;/strong&gt; Their first answer was “no bandwidth limit is configured”. They were looking for a total quota on the address. What was there was a &lt;strong&gt;per-session&lt;/strong&gt; traffic shaper: a cap that applies to each TCP connection on its own. Total throughput looked fine, because six connections at 400 Kbps still add up to something.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compression looked configured.&lt;/strong&gt; nginx had gzip on. Someone had already added the right &lt;code&gt;gzip_types&lt;/code&gt;. The config was correct. It just was not what reached the user, because the WAF sat in the middle and decided what to compress.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the part that trips people up. A config file proves what a server &lt;em&gt;would&lt;/em&gt; send. Only a response header proves what a user &lt;em&gt;gets&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Prove It
&lt;/h2&gt;

&lt;p&gt;Every step below is read-only. You can run all of it from a laptop and from the VM without changing anything. Use your own hostname and a real static file from the app — the biggest CSS or JS file is ideal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Measure the same file from outside and from inside
&lt;/h3&gt;

&lt;p&gt;From your own machine, pull one large file and print the speed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -o /dev/null -w &lt;span class="s2"&gt;"%{size_download} bytes  %{speed_download} B/s  %{time_total}s\n"&lt;/span&gt; https://app.example.com/static/css/app.min.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then on the VM, pull the same file through nginx on loopback, so the WAF is not in the path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sk -o /dev/null -w &lt;span class="s2"&gt;"%{size_download} bytes  %{speed_download} B/s  %{time_total}s\n"&lt;/span&gt; --resolve app.example.com:443:127.0.0.1 https://app.example.com/static/css/app.min.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--resolve&lt;/code&gt; makes curl send the real hostname to 127.0.0.1, so nginx picks the right site and certificate. Use 127.0.0.1, not the public address — a VM behind NAT often cannot reach its own public address at all, and the test just hangs.&lt;/p&gt;

&lt;p&gt;In this case the outside pull ran at about 47 KB/s. The loopback pull ran at about 2.8 MB/s. &lt;strong&gt;Sixty times faster, same file, same moment.&lt;/strong&gt; That one comparison ends the database discussion. If the server can send a file at 2.8 MB/s and users get 47 KB/s, the problem is between them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Check what is really compressed
&lt;/h3&gt;

&lt;p&gt;Ask for gzip the way a browser does, and read the headers that come back:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -D - -o /dev/null -H &lt;span class="s2"&gt;"Accept-Encoding: gzip"&lt;/span&gt; https://app.example.com/static/css/app.min.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for one line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Encoding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;gzip&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it is missing, the file arrives raw. In this case the CSS and JS came back with no &lt;code&gt;Content-Encoding&lt;/code&gt; at all.&lt;/p&gt;

&lt;p&gt;Now look on the VM at what nginx thinks it does:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo nginx -T &lt;span class="o"&gt;|&lt;/span&gt; grep -i gzip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two lines matter. &lt;code&gt;gzip_types&lt;/code&gt; lists what nginx will compress. &lt;code&gt;gzip_proxied&lt;/code&gt; decides whether nginx compresses at all when the request came through a proxy. By default it is &lt;code&gt;off&lt;/code&gt;, so a request that arrives from a WAF carrying a &lt;code&gt;Via&lt;/code&gt; header is sent raw by nginx — and the WAF becomes the only layer that can compress it. If the WAF’s compression profile does not cover that content type, nobody compresses it.&lt;/p&gt;

&lt;p&gt;That is exactly what happened here, twice. First for CSS and JS. Later, after that was fixed, for JSON.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Prove the per-connection cap
&lt;/h3&gt;

&lt;p&gt;A slow transfer is not yet a cap. It could be congestion, jitter or a bad Wi-Fi link. Three tests separate them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Force a large, uncompressed transfer and watch whether it ever speeds up.&lt;/strong&gt; TCP normally starts slow and ramps up. A cap does not ramp.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -o /dev/null -H &lt;span class="s2"&gt;"Accept-Encoding: identity"&lt;/span&gt; -w &lt;span class="s2"&gt;"%{speed_download} B/s  %{time_total}s\n"&lt;/span&gt; https://app.example.com/static/css/app.min.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, 1.4 MB held a flat 49.7 KB/s for 28 seconds. No ramp. Three back-to-back runs gave 40.6, 40.7 and 45.1 KB/s. Flat and repeatable means a ceiling, not noise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run six pulls at the same time.&lt;/strong&gt; If the limit is on the link, six connections share it and each gets slower. If the limit is per connection, each one gets the same cap and the total goes up.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;seq 6 &lt;span class="o"&gt;|&lt;/span&gt; xargs -P 6 -I&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt; curl -s -o /dev/null -H &lt;span class="s2"&gt;"Accept-Encoding: identity"&lt;/span&gt; -w &lt;span class="s2"&gt;"{}: %{speed_download} B/s\n"&lt;/span&gt; https://app.example.com/static/css/app.min.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each of the six held about 48 KB/s. The total was 236 KB/s. &lt;strong&gt;The link was fine. The cap was per TCP flow.&lt;/strong&gt; That is the fingerprint of a per-session shaper.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compare with a sister site on the same path.&lt;/strong&gt; The same app ran at a second site behind the same provider. From the same machine, on the same line, at the same moment, the same 1.4 MB file came from the sister site at 1.5 MB/s and from this site at 47 KB/s. Thirty-two times faster.&lt;/p&gt;

&lt;p&gt;Then trace both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tracert -d app.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tracert -d sister.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(On Linux, &lt;code&gt;traceroute -n&lt;/code&gt;.) The two routes were identical hop for hop until the very last hop — the destination address. So it was not the user’s ISP and not the shared backbone. It was the policy on that one public address.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Separate network time from server time
&lt;/h3&gt;

&lt;p&gt;Not every slow request is the network. In the browser, open DevTools › Network, click the slow request and open the &lt;strong&gt;Timing&lt;/strong&gt; tab. Two numbers matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Waiting for server response&lt;/strong&gt; — the server is thinking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Download&lt;/strong&gt; — the bytes are moving.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this app, one dashboard request spent 17.6 seconds waiting and 7 ms downloading. That one is a slow query, and no WAF change will fix it. A user-list request was the opposite: 2.7 MB of JSON, almost no wait, all download time. That one is pure transfer, and the fix is compression and smaller responses, not query tuning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measure first, then pick the team.&lt;/strong&gt; Sending a transfer problem to the database team wastes a week.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix It
&lt;/h2&gt;

&lt;p&gt;The fixes were all at the edge, and none of them touched the app.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 1: Compress at the layer that faces the user
&lt;/h3&gt;

&lt;p&gt;The WAF team enabled compression in its profile for CSS and JS. The stylesheet went from 1,398 KB on the wire to 164 KB. CSS load time dropped from about 32 seconds to about 4.&lt;/p&gt;

&lt;p&gt;A day later the user list was still slow. The headers told the story:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;application&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2748005&lt;/span&gt;
&lt;span class="nc"&gt;Vary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Accept&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Encoding&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;Content-Encoding&lt;/code&gt;. &lt;code&gt;Vary: Accept-Encoding&lt;/code&gt; is present, so a layer capable of compression had looked at it and chosen not to. The WAF profile had CSS and JS but not JSON. Adding &lt;code&gt;application/json&lt;/code&gt; (and HTML) to the WAF compression profile fixed it. JSON compresses very well, so the 2.7 MB list became a small fraction of that, and the slow tab became fast.&lt;/p&gt;

&lt;p&gt;If you control nginx and want it to compress proxied requests too, this is the change (&lt;strong&gt;this changes state; reload nginx afterwards&lt;/strong&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;gzip_proxied&lt;/span&gt; &lt;span class="kt"&gt;any&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo nginx -t &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo systemctl reload nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is a belt-and-braces setting. It only helps if the WAF passes gzip through instead of inflating it again, so always re-check with the Step 2 header test from outside.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 2: Remove the per-session shaper — and save it
&lt;/h3&gt;

&lt;p&gt;The network team found the shaper on the firewall policy for that one public address and lifted it. From an outside vantage that had been stuck at 0.4 Mbps all day, the same file now pulled at 5 to 8 Mbps. The login page went from 34.65 seconds to 2.0.&lt;/p&gt;

&lt;p&gt;About forty minutes later, it was back. Same file, same vantage, flat 0.4 Mbps again.&lt;/p&gt;

&lt;p&gt;The removal had not persisted. The usual reasons are boring ones: a change applied to the running configuration and never saved, an HA pair where the other unit still had the old policy, or a scheduled shaping rule. Whatever the cause, the lesson is the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One good test after a change is not a fix. It is a moment.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 3: Verify over hours, not seconds
&lt;/h3&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts. Run a logged loop from outside the provider’s network and leave it running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$(date +%H:%M:%S) $(curl -s -o /dev/null -H 'Accept-Encoding: identity' -w '%{speed_download}' https://app.example.com/static/css/app.min.css)"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; sleep 60&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; tee waf-speed.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line is a time and a speed in bytes per second. A healthy edge stays well above the old cap for hours. A shaper that comes back shows up as a sudden flat line near 45,000 at the same value, minute after minute.&lt;/p&gt;

&lt;p&gt;Run it from two different ISPs if you can. In this case one ISP saw the hard cap all the time and another saw a softer, bursty limit. Same address, different paths — which matters when the edge rule matches on the source.&lt;/p&gt;

&lt;p&gt;If the log stays fast all afternoon, close the ticket. If one line drops back to the old number, it is not done. That drop is not noise. It is the verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist I Use Now
&lt;/h2&gt;

&lt;p&gt;When an app is “slow for users”, I run these before anyone resizes a VM or tunes a query:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Same file, inside vs outside.&lt;/strong&gt; &lt;code&gt;curl --resolve host:443:127.0.0.1&lt;/code&gt; on the VM vs &lt;code&gt;curl&lt;/code&gt; from a laptop. A big gap means the problem is in the path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compression on the wire.&lt;/strong&gt; &lt;code&gt;curl -D - -H "Accept-Encoding: gzip"&lt;/code&gt; and look for &lt;code&gt;Content-Encoding: gzip&lt;/code&gt; on CSS, JS, JSON and HTML.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Who compresses?&lt;/strong&gt; &lt;code&gt;nginx -T | grep gzip&lt;/code&gt;, and read &lt;code&gt;gzip_proxied&lt;/code&gt;. If it is off, the WAF must compress.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flat or ramping?&lt;/strong&gt; One large uncompressed pull. Flat for 20+ seconds means a cap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per connection or total?&lt;/strong&gt; Six parallel pulls. Same speed each, higher total = per-session shaper.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which hop?&lt;/strong&gt; Trace to this site and to a sister site. Where the routes split is where the policy is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Waiting or downloading?&lt;/strong&gt; DevTools › Timing for the slowest request. Waiting = app team. Download = edge team.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Over time.&lt;/strong&gt; A logged loop for hours after every fix.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;When a WAF or a firewall policy sits in front of an app, I ask one question in the design review:&lt;/p&gt;

&lt;p&gt;“Who owns compression and per-connection limits on the public address — and how will we prove what reaches the user?”&lt;/p&gt;

&lt;p&gt;If the answer is a name and a header test, they’re in good shape. If the answer is “the WAF just passes traffic”, we’re not done yet.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why is my web app fast on the server but slow for users?
&lt;/h3&gt;

&lt;p&gt;If the same file downloads much faster on the server’s loopback than from outside, the delay is in the path between them. A WAF or firewall policy in front of the app can strip compression or cap each connection. Compare &lt;code&gt;curl&lt;/code&gt; from a laptop with &lt;code&gt;curl --resolve&lt;/code&gt; to 127.0.0.1 on the server before changing the app or database.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I check if gzip compression is reaching the browser?
&lt;/h3&gt;

&lt;p&gt;Request the file with &lt;code&gt;Accept-Encoding: gzip&lt;/code&gt; and read the response headers. If there is no &lt;code&gt;Content-Encoding: gzip&lt;/code&gt; line, the file arrives uncompressed, whatever the server config says. Check CSS, JS, JSON and HTML separately, because a WAF profile can cover some types and not others.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does gzip_proxied do in nginx?
&lt;/h3&gt;

&lt;p&gt;It decides whether nginx compresses responses to requests that came through a proxy. The default is off, so requests from a WAF that adds a &lt;code&gt;Via&lt;/code&gt; header get uncompressed responses from nginx. Setting &lt;code&gt;gzip_proxied any&lt;/code&gt; lets nginx compress them, but the WAF must pass the gzip through for users to benefit.&lt;/p&gt;

&lt;h3&gt;
  
  
  How can I tell a per-connection throttle from a slow link?
&lt;/h3&gt;

&lt;p&gt;Run one large uncompressed download and see if the speed stays flat instead of ramping up. Then run six downloads in parallel. If each one gets the same low speed and the total rises, the limit is per TCP connection, not on the link — the fingerprint of a per-session traffic shaper.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why did the throttle come back after the firewall team removed it?
&lt;/h3&gt;

&lt;p&gt;A change that is not saved to the startup configuration, an HA peer that still holds the old policy, or a scheduled shaping rule can all bring it back. That is why one fast test after a change proves nothing. Log the download speed every minute from outside for hours before closing the ticket.&lt;/p&gt;

&lt;h3&gt;
  
  
  Will compression fix a slow page that is waiting on the server?
&lt;/h3&gt;

&lt;p&gt;No. In browser DevTools, the Timing tab splits a request into waiting time and download time. Compression and edge fixes only shorten the download part. A request that spends most of its time waiting for the server needs query or app work instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-web-app-slow-behind-waf-gzip-per-connection-throttle.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/web-app-slow-behind-waf-gzip-per-connection-throttle/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webperf</category>
      <category>nginx</category>
      <category>networking</category>
      <category>devops</category>
    </item>
    <item>
      <title>Veeam "Target Gate Has Rejected Connection" — the Cloud Gateway With No Path to the Repository</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Wed, 25 Nov 2026 17:13:47 +0000</pubDate>
      <link>https://dev.to/daanial/veeam-target-gate-has-rejected-connection-the-cloud-gateway-with-no-path-to-the-repository-3kol</link>
      <guid>https://dev.to/daanial/veeam-target-gate-has-rejected-connection-the-cloud-gateway-with-no-path-to-the-repository-3kol</guid>
      <description>&lt;p&gt;&lt;em&gt;A field note about a new private-link Veeam cloud gateway that looked healthy in every console and still rejected every backup job — the network leg nobody draws, and the three checks I now run before a gateway goes into a pool.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The idea was a good one. Some backup customers already sat on our own network, connected over a private layer-2 link. Their backups were still going out over the internet and coming back in through the public gateway.&lt;/p&gt;

&lt;p&gt;“Why are we sending on-net traffic out to the WAN?” someone asked in the design review.&lt;/p&gt;

&lt;p&gt;Nobody had a good answer. So we built a second Veeam Cloud Connect gateway — a small Windows VM, 2 cores, 4 GB of RAM — with one leg on the private customer link and one leg on management. No internet needed. Full 10 Gb to the customers who used it.&lt;/p&gt;

&lt;p&gt;The build went cleanly. The gateway joined the backup server. The service provider console showed it. The customer’s management agent connected over the private link on the first try.&lt;/p&gt;

&lt;p&gt;“Green everywhere,” the engineer said. “Let’s move the first tenant.”&lt;/p&gt;

&lt;p&gt;We moved the first tenant. The first job ran.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Target gate has rejected connection. Unable to establish target connection.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We ran it again. Same error. A second tenant. Same error.&lt;/p&gt;

&lt;p&gt;“The agent is connected,” the engineer said. “I can see it right there. How can the gateway reject it?”&lt;/p&gt;

&lt;p&gt;I asked one question. “Where does the gateway send the data after it accepts it?”&lt;/p&gt;

&lt;p&gt;He opened the network drawing. It showed the customer, the private link, the gateway. It stopped there.&lt;/p&gt;

&lt;p&gt;That one cost us a full day.&lt;/p&gt;

&lt;p&gt;That’s the trap. &lt;strong&gt;A cloud gateway is not the end of the path. It is the middle.&lt;/strong&gt; The console shows you the leg from the customer to the gateway. It does not show you the leg from the gateway to the repository, and that is the leg that carries every byte of backup data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Veeam Cloud Gateway Actually Does
&lt;/h2&gt;

&lt;p&gt;A cloud gateway is a relay. It is the only thing a Cloud Connect tenant talks to from outside. It does not store anything. It accepts the tenant’s connection on one port and passes the traffic on to the servers that do the real work.&lt;/p&gt;

&lt;p&gt;In a typical service-provider build the flow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tenant agent → Cloud gateway (TCP 6180) → Backup server (control)
Tenant agent → Cloud gateway (TCP 6180) → Repository (data)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So one gateway carries two very different kinds of traffic through the same port:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Control and management traffic.&lt;/strong&gt; The tenant’s management agent and the service provider console talk to the backup server through the gateway. This is small, chatty traffic on the management network.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backup data.&lt;/strong&gt; The actual blocks of the backup. The gateway opens a connection to the repository’s data mover and streams the data there. In our build the repositories sat on a separate backup data network, not on management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The redirect.&lt;/strong&gt; When a tenant connects, Cloud Connect decides which gateway in the tenant’s pool should carry the session. The tenant dials one address and may be handed to another.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is the part that trips people up. Those two kinds of traffic leave the gateway on &lt;strong&gt;different networks&lt;/strong&gt;. Management goes out the management leg. Backup data goes out the backup data leg. If the gateway has the first leg and not the second, half of it works perfectly.&lt;/p&gt;

&lt;p&gt;Our new gateway had three things planned on paper:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a private-link NIC facing the customers, port 6180, NAT mode&lt;/li&gt;
&lt;li&gt;a management NIC, on the same network as the backup server and the console&lt;/li&gt;
&lt;li&gt;a NIC on the backup data network, facing the repositories&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The third one was never added. The VM had two NICs, not three.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Every Console Said “Healthy”
&lt;/h2&gt;

&lt;p&gt;This is the part worth slowing down for. Every check we ran said the gateway was fine — and every check was telling the truth.&lt;/p&gt;

&lt;p&gt;The management agent connected because that conversation runs over the management network. The gateway could reach the backup server and the console there with no problem. The service provider console saw the agent, saw the company, saw the policy.&lt;/p&gt;

&lt;p&gt;On the management agent box, this command reported a healthy connection to the provider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;veeamconsoleconfig -s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The backup server saw the gateway service as up, because it checks the service over management too.&lt;/p&gt;

&lt;p&gt;None of these checks asked the only question that mattered for a backup job: &lt;strong&gt;can this gateway open a connection to the repository?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a job starts, the tenant hands its data to the gateway. The gateway tries to reach the repository’s data mover on the backup data network. It has no interface there and no route there. The connection fails, and the gateway reports the only thing it knows: the target rejected it.&lt;/p&gt;

&lt;p&gt;So the error message points at the “target gate”. The cause is one hop further: the repository leg.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A healthy control channel with failing jobs means the repository leg, not the tenant leg.&lt;/strong&gt; That one sentence would have saved us a day.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix This
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Read the symptom correctly
&lt;/h3&gt;

&lt;p&gt;Before you touch anything, put the two facts side by side:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Management side: the agent is connected, the console shows the company, the policy applies.&lt;/li&gt;
&lt;li&gt;Data side: every job fails with “Target gate has rejected connection. Unable to establish target connection.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If both are true, stop looking at the customer’s firewall, the tenant’s password and the private link. The tenant reached the gateway. The gateway could not reach the repository.&lt;/p&gt;

&lt;p&gt;Plain takeaway: the tenant leg is proven by the management agent. The data leg is not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: List the gateway’s interfaces
&lt;/h3&gt;

&lt;p&gt;On the gateway (Windows), list every IPv4 address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;NetIPAddress&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;AddressFamily&lt;/span&gt; &lt;span class="nc"&gt;IPv4&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nc"&gt;Select&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="nc"&gt;InterfaceAlias&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;IPAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;PrefixLength&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see one address on each network the gateway needs: the customer-facing link, management, and the backup data network. In our case there were only two. No address on the backup data subnet at all.&lt;/p&gt;

&lt;p&gt;If the address is there, check the prefix length too. A /29 on one box and a /24 on another means they disagree about who is “local”. The box with the small mask sends traffic for the “outside” addresses to its default gateway instead — often the public one. We saw that on the same platform with a new repository: the backup server’s data NIC was a /29, the new repository was just outside it, and the backup server tried to reach it over its public default route.&lt;/p&gt;

&lt;p&gt;Plain takeaway: count the NICs, then read the masks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Add the missing leg
&lt;/h3&gt;

&lt;p&gt;In the hypervisor, add a NIC to the gateway VM on the backup data network. Give it a static address on that subnet, with &lt;strong&gt;no default gateway&lt;/strong&gt; — the only default route should stay on the leg that needs it.&lt;/p&gt;

&lt;p&gt;Before you pick the address, check that nobody else holds it. We keep a small register of every address on the backup data network, and it already had one double-booking in its history. A duplicate IP on a backup network gives you a second, stranger failure on top of the first one.&lt;/p&gt;

&lt;p&gt;On Windows, a duplicate shows up in the address state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;NetIPAddress&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;InterfaceAlias&lt;/span&gt; &lt;span class="s2"&gt;"Ethernet 3"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nc"&gt;Select&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="nc"&gt;IPAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;AddressState&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Preferred&lt;/code&gt; means the address is yours. &lt;code&gt;Duplicate&lt;/code&gt; means someone else already answers on it.&lt;/p&gt;

&lt;p&gt;Plain takeaway: one new NIC, one static address, no second default gateway.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Prove the repository leg from the gateway itself
&lt;/h3&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts.&lt;/p&gt;

&lt;p&gt;Do not test from your laptop. Do not test from the backup server. Test &lt;strong&gt;from the gateway&lt;/strong&gt;, to each repository, on the repository data mover port:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nc"&gt;Test&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;NetConnection&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;REPO_IP&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Port&lt;/span&gt; &lt;span class="mi"&gt;6162&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output ends with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="n"&gt;TcpTestSucceeded&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it for every repository that a tenant in this gateway’s pool can land on. In a later build on the same platform this check paid for itself on the first run: the new gateway reached the backup server on 6169 and the new repository on 6162 — and failed to reach an older repository, because that repository was still on a /29 that did not include the gateway’s address.&lt;/p&gt;

&lt;p&gt;If you see &lt;code&gt;TcpTestSucceeded : False&lt;/code&gt; and ping says “Destination host unreachable”, there is no layer-2 or routing path. That is not a Veeam error. It is the verification doing its job.&lt;/p&gt;

&lt;p&gt;Then test the control leg the same way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nc"&gt;Test&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;NetConnection&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;BACKUP_SERVER_IP&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Port&lt;/span&gt; &lt;span class="mi"&gt;6169&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plain takeaway: every leg is tested from the box that has to use it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Put the gateway in its own pool and assign it
&lt;/h3&gt;

&lt;p&gt;Tenant routing in Cloud Connect is by &lt;strong&gt;gateway pool&lt;/strong&gt;, not by anything on the customer’s machine. A new private-link gateway should sit in its own pool, so only the tenants that are on the private link get sent there.&lt;/p&gt;

&lt;p&gt;In the backup server: Cloud Gateways › Gateway Pools › add a pool with only the new gateway.&lt;/p&gt;

&lt;p&gt;In the service provider console: Companies › [company] › Edit › Bandwidth › Gateway pool › “Selected gateway pool”, then pick the new pool.&lt;/p&gt;

&lt;p&gt;The tenant keeps dialling whatever address it already has. Cloud Connect redirects it to a gateway from its assigned pool. Nothing changes on the customer’s server.&lt;/p&gt;

&lt;p&gt;This is also why a gateway that is missing a leg can hurt tenants who never asked for it. If you drop the new gateway into an existing pool, Cloud Connect may redirect any tenant in that pool to it, and their jobs start failing too.&lt;/p&gt;

&lt;p&gt;Plain takeaway: a new gateway goes into a new pool, and only after Step 4 passes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Run one real job
&lt;/h3&gt;

&lt;p&gt;After the new NIC and the pool assignment, start one backup job for one tenant on the new pool. Watch it to the end. A finished job with a new restore point on the repository is the only proof that both legs work.&lt;/p&gt;

&lt;p&gt;Then — and only then — move the next tenant.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Gateway Checklist I Use Now
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Draw both legs.&lt;/strong&gt; Customer → gateway, and gateway → repository. If the drawing stops at the gateway, it is not finished.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Count the NICs against the drawing.&lt;/strong&gt; &lt;code&gt;Get-NetIPAddress -AddressFamily IPv4&lt;/code&gt; on the gateway.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the masks.&lt;/strong&gt; Every box on the backup data network uses the same prefix length.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check the address register before assigning.&lt;/strong&gt; &lt;code&gt;AddressState&lt;/code&gt; must be &lt;code&gt;Preferred&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test from the gateway, to every repository.&lt;/strong&gt; &lt;code&gt;Test-NetConnection &amp;lt;REPO_IP&amp;gt; -Port 6162&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test the control leg.&lt;/strong&gt; &lt;code&gt;Test-NetConnection &amp;lt;BACKUP_SERVER_IP&amp;gt; -Port 6169&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New gateway, new pool.&lt;/strong&gt; Never add an untested gateway to a pool that live tenants use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One real job before the next tenant.&lt;/strong&gt; A restore point, not a green icon.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One more note. When a gateway sits in a different data centre from a repository, latency on the backup network will be higher — we saw about 21 ms between two sites. That is distance, not a fault. Know your normal before you call something slow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;When a customer or a partner tells me a new gateway, proxy or replication relay is “up and connected”, I ask:&lt;/p&gt;

&lt;p&gt;“From that box, can you reach the place where the data ends up?”&lt;/p&gt;

&lt;p&gt;If the answer is “yes, here is the &lt;code&gt;TcpTestSucceeded : True&lt;/code&gt; to every repository”, we’re in good shape. If the answer is “the agent is connected”, we’re not done yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A green management channel tells you the box is reachable. It tells you nothing about where the box can send your data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What does “Target gate has rejected connection” mean in Veeam Cloud Connect?
&lt;/h3&gt;

&lt;p&gt;The tenant reached the cloud gateway, but the gateway could not open the onward connection it needed for the job. In a service-provider build that is usually the connection from the gateway to the repository data mover. Check that the gateway has an interface and a route on the network where the repositories live.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does the management agent connect if backup jobs fail?
&lt;/h3&gt;

&lt;p&gt;Management and control traffic go from the gateway to the backup server and the provider console, usually over the management network. Backup data goes from the gateway to the repository, often over a separate backup data network. A gateway with only the management leg passes every management check and fails every job.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which ports should a Veeam cloud gateway reach?
&lt;/h3&gt;

&lt;p&gt;Tenants reach the gateway on TCP 6180. From the gateway, test the backup server on TCP 6169 and each repository data mover on TCP 6162 with &lt;code&gt;Test-NetConnection&lt;/code&gt;. Run the tests from the gateway itself, not from another server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need to change anything on the customer’s server to use a new gateway?
&lt;/h3&gt;

&lt;p&gt;No. Cloud Connect routes a tenant by its gateway pool. Put the new gateway in its own pool, then assign that pool to the company in the service provider console. The tenant keeps dialling the address it has and is redirected to a gateway from its assigned pool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should a new cloud gateway be added to an existing gateway pool?
&lt;/h3&gt;

&lt;p&gt;Only after it has passed the repository and control-leg tests. Any tenant in the pool can be redirected to any gateway in it, so an untested gateway in a shared pool can break jobs for customers who never moved.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is the repository reachable from the backup server but not from the gateway?
&lt;/h3&gt;

&lt;p&gt;Each box has its own interfaces, masks and routes. A repository on a subnet the gateway has no leg on, or a /29 mask on one side that leaves the gateway’s address outside the “local” range, gives a path from one server and none from another. Always test from the box that will carry the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-veeam-cloud-gateway-target-gate-rejected-connection.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/veeam-cloud-gateway-target-gate-rejected-connection/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>veeam</category>
      <category>backup</category>
      <category>networking</category>
      <category>devops</category>
    </item>
    <item>
      <title>Security Alerts That Never Arrive — a Dead maldet Monitor, Exim -t and a Hostname With No SPF</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Tue, 24 Nov 2026 17:17:04 +0000</pubDate>
      <link>https://dev.to/daanial/security-alerts-that-never-arrive-a-dead-maldet-monitor-exim-t-and-a-hostname-with-no-spf-5hlp</link>
      <guid>https://dev.to/daanial/security-alerts-that-never-arrive-a-dead-maldet-monitor-exim-t-and-a-hostname-with-no-spf-5hlp</guid>
      <description>&lt;p&gt;&lt;em&gt;A field note about a hosting server whose malware scanner was “set up” for months and never sent a single alert — three silent failures in a row, and the end-to-end test I now run before I call any alert path working.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We were closing a firewall ticket on a customer’s hosting VM. The boot problem was fixed, the reboot was proven, the sites were back.&lt;/p&gt;

&lt;p&gt;“While you’re in there,” the customer said, “the malware scanner is running. It has been installed for a long time. We get alerts if anything is found.”&lt;/p&gt;

&lt;p&gt;“When did you last get one?”&lt;/p&gt;

&lt;p&gt;“We haven’t. Nothing has been found.”&lt;/p&gt;

&lt;p&gt;“How do you know nothing has been found?”&lt;/p&gt;

&lt;p&gt;“Because we would get an alert.”&lt;/p&gt;

&lt;p&gt;I asked one more question.&lt;/p&gt;

&lt;p&gt;“Has anyone ever received a test alert from this server?”&lt;/p&gt;

&lt;p&gt;Silence. Then: “We assumed it works. The scanner says it is running.”&lt;/p&gt;

&lt;p&gt;That’s the trap. &lt;strong&gt;An alert path that has never delivered a message is not quiet. It is unproven.&lt;/strong&gt; “No alerts” and “alerts are broken” look exactly the same from the inbox.&lt;/p&gt;

&lt;p&gt;So we traced it — from the scanner to a human inbox, one hop at a time. It failed at every hop.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an Alert Path Actually Is
&lt;/h2&gt;

&lt;p&gt;People think of an alert as one thing. It is a chain, and every link fails on its own:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Detection → Alert config → Local mail binary → MTA (Exim) → Sender authentication (SPF/DMARC) → Recipient's mail filter → Inbox&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Each link can break without telling anyone:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The detector can be dead, so there is nothing to alert on.&lt;/li&gt;
&lt;li&gt;The alert can be switched off, or pointed at a placeholder address.&lt;/li&gt;
&lt;li&gt;The local mail command can hand the MTA a message with no recipient.&lt;/li&gt;
&lt;li&gt;The MTA can send a message the receiving side is told to reject.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On this server, four links were broken at the same time: three failed silently, and one had never been switched on. The scanner was Linux Malware Detect (maldet), on Ubuntu with cPanel and Exim. The lessons apply to any tool that sends mail through the local MTA — fail2ban, lfd, cron, backup scripts, monitoring agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Nobody Sees It in Testing
&lt;/h2&gt;

&lt;p&gt;Because nobody tests the whole path. The usual “test” is one of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;systemctl status&lt;/code&gt; on the scanner — proves a process started, not that it detects anything.&lt;/li&gt;
&lt;li&gt;A look at the scanner’s config file — proves the setting exists, not that mail leaves the box.&lt;/li&gt;
&lt;li&gt;A look at the scanner’s own log — and here is the part that trips people up. &lt;strong&gt;The tool logs that it handed off the alert. It does not know if anyone received it.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A tool that says “sent” has only proven that it ran a command. The rest of the chain is somebody else’s problem — and nobody owns it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix This
&lt;/h2&gt;

&lt;p&gt;Here is the order I worked in. Each step starts read-only; the change is labelled.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Prove the Detector Is Actually Running
&lt;/h3&gt;

&lt;p&gt;maldet has two modes: a daily cron scan, and a real-time monitor that watches folders with inotify. On this server the daily cron scan was working. The real-time monitor was not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl status maldet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The service showed as failed. The reason was in its log: the monitor needs &lt;code&gt;inotifywait&lt;/code&gt;, and it was not installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;command&lt;/span&gt; -v inotifywait
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No output means the binary is missing. The monitor cannot start without it, no matter what the config says. The fix (a state change):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt install inotify-tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl restart maldet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check it again. It should be active and enabled, and the monitor should list the paths it watches. On this server it came up in “users” mode, watching the account web roots, &lt;code&gt;public_ftp&lt;/code&gt;, &lt;code&gt;/dev/shm&lt;/code&gt;, &lt;code&gt;/var/tmp&lt;/code&gt; and &lt;code&gt;/tmp&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl is-active maldet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plain takeaway: a scanner can be “installed” for a year with its main feature dead. Check the service, not the package.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Check That Alerts Are Switched On — and Pointed at a Real Person
&lt;/h3&gt;

&lt;p&gt;The alert settings live in &lt;code&gt;/usr/local/maldetect/conf.maldet&lt;/code&gt;. Read them before changing anything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -E &lt;span class="s1"&gt;'^(email_alert|email_addr|quarantine_hits)='&lt;/span&gt; /usr/local/maldetect/conf.maldet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On this server they were still the install defaults:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;email_alert&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"0"&lt;/span&gt;
&lt;span class="nv"&gt;email_addr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"you@domain.com"&lt;/span&gt;
&lt;span class="nv"&gt;quarantine_hits&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"0"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alerts off. A placeholder address. Detections logged but not quarantined. Nobody had ever changed them.&lt;/p&gt;

&lt;p&gt;The change: back up the file, then set &lt;code&gt;email_alert="1"&lt;/code&gt;, put a real monitored mailbox in &lt;code&gt;email_addr&lt;/code&gt;, and set &lt;code&gt;quarantine_hits="1"&lt;/code&gt; so a hit is moved aside, not only reported. Restart maldet afterwards. If quarantine ever catches a false positive, &lt;code&gt;maldet --restore &amp;lt;file&amp;gt;&lt;/code&gt; puts it back.&lt;/p&gt;

&lt;p&gt;Plain takeaway: defaults are written for the vendor’s test, not for your operations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Make Sure the Local Mail Command Keeps the Recipient
&lt;/h3&gt;

&lt;p&gt;This is the failure that fooled everyone, because the scanner’s log said the alert was sent.&lt;/p&gt;

&lt;p&gt;The server had no &lt;code&gt;mail&lt;/code&gt; command installed. In that case maldet falls back to calling sendmail directly, which on a cPanel server is Exim. The fallback passes the address on the command line together with &lt;code&gt;-t&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sendmail -t admin@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s why that fails. With &lt;code&gt;-t&lt;/code&gt;, Exim takes the recipients from the message headers. On this server, that meant the address on the command line was dropped. The message had no &lt;code&gt;To:&lt;/code&gt; header, so Exim found no recipients at all — and maldet still logged the alert as sent.&lt;/p&gt;

&lt;p&gt;The proof is in the Exim log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep &lt;span class="s2"&gt;"no recipients found in headers"&lt;/span&gt; /var/log/exim_mainlog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If this returns lines at the times your tool claims it sent an alert, the message never left the box.&lt;/p&gt;

&lt;p&gt;The fix (a state change) was to install a proper &lt;code&gt;mail&lt;/code&gt; command, so maldet uses it instead of the broken fallback:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt install bsd-mailx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl restart maldet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, Exim accepted the message with a real recipient and tried to deliver it. Which led straight to the next failure.&lt;/p&gt;

&lt;p&gt;Plain takeaway: “sent” in an application log means “I ran a command”. Only the MTA log tells you what happened next.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Check How the Receiving Side Sees Your Server
&lt;/h3&gt;

&lt;p&gt;The message now left the server — and the recipient’s mail filter rejected it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;550 ... blocked
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sender was &lt;code&gt;root@vps.example.com&lt;/code&gt; — the server’s own hostname. That is normal for system mail. But look at what the parent domain had published:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short TXT _dmarc.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"v=DMARC1; p=reject; sp=reject; aspf=s; adkim=s"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a strict policy, and the parts that matter here are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sp=reject&lt;/code&gt; — the policy applies to every subdomain, including the server hostname, unless the subdomain publishes its own DMARC record.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;aspf=s&lt;/code&gt; — strict SPF alignment: the domain that passes SPF must match the &lt;code&gt;From:&lt;/code&gt; domain exactly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now check the hostname itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short TXT vps.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No output. &lt;strong&gt;The hostname had no SPF record at all.&lt;/strong&gt; So mail from &lt;code&gt;root@vps.example.com&lt;/code&gt; could not pass SPF, could not pass DMARC, and the domain owner’s own policy told every receiver to reject it. The recipient’s filter did exactly what it was asked to do.&lt;/p&gt;

&lt;p&gt;This is easy to miss because the main domain’s mail works perfectly. The website’s contact form, the staff mailboxes — all fine. Only the system mail from the hostname fails, and system mail is the one nobody reads until it matters.&lt;/p&gt;

&lt;p&gt;The fix (a DNS change) was one TXT record on the hostname, allowing only the server’s own IP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vps.example.com.  TXT  "v=spf1 ip4:203.0.113.10 -all"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then resend the test. This time the recipient’s filter answered &lt;code&gt;250 OK queued&lt;/code&gt;, and Exim logged the message as completed. &lt;strong&gt;The SPF record was the only change between the failure and the success&lt;/strong&gt;, so that is the proven cause.&lt;/p&gt;

&lt;p&gt;A side effect worth noting: this one record fixed every other piece of system mail from that hostname too — cron output, firewall alerts, update notices. They had all been failing the same way.&lt;/p&gt;

&lt;p&gt;Plain takeaway: if your domain publishes &lt;code&gt;sp=reject&lt;/code&gt;, every hostname that sends mail needs its own SPF record — or its own DMARC record — or it is rejected by policy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: The Verification — Prove the Whole Path, End to End
&lt;/h3&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts.&lt;/p&gt;

&lt;p&gt;Every fix above proves one link. None of them proves the chain. So the last step is to send a message through the exact same path the alert will use, and watch it arrive.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"alert path test"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; mail -s &lt;span class="s2"&gt;"alert path test from $(hostname -f)"&lt;/span&gt; admin@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then read what Exim did with it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep &lt;span class="s2"&gt;"alert path test"&lt;/span&gt; /var/log/exim_mainlog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Take the message ID from that line and follow it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;exigrep &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;message-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /var/log/exim_mainlog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What success looks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An &lt;code&gt;&amp;lt;=&lt;/code&gt; line from &lt;code&gt;root@&lt;/code&gt; your hostname, with the right recipient.&lt;/li&gt;
&lt;li&gt;An &lt;code&gt;=&amp;gt;&lt;/code&gt; line showing the remote server answered &lt;code&gt;250&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;Completed&lt;/code&gt; line.&lt;/li&gt;
&lt;li&gt;And the message actually in the mailbox — open it, look at it, check the headers say SPF pass.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What failure looks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;no recipients found in headers&lt;/code&gt; — Step 3 is still broken.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;550&lt;/code&gt; or &lt;code&gt;5xx&lt;/code&gt; from the remote side — read the text; with a strict DMARC domain it is almost always Step 4.&lt;/li&gt;
&lt;li&gt;A deferral that repeats — the message is stuck; check &lt;code&gt;exim -bp&lt;/code&gt; for the queue.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This error is not a bug. It is the verification. A failed test today is the alert you would have missed next month.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Lesson — a Checklist for Any Alert Path
&lt;/h2&gt;

&lt;p&gt;I now run these six checks on every server I hand over, for every tool that is supposed to “email us if something happens”:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The detector is alive.&lt;/strong&gt; &lt;code&gt;systemctl is-active &amp;lt;service&amp;gt;&lt;/code&gt; — and read why if it is not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Its dependencies exist.&lt;/strong&gt; For maldet’s monitor: &lt;code&gt;command -v inotifywait&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alerts are on and point to a real mailbox.&lt;/strong&gt; &lt;code&gt;grep -E '^(email_alert|email_addr)=' /usr/local/maldetect/conf.maldet&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A real mail command exists.&lt;/strong&gt; &lt;code&gt;command -v mail&lt;/code&gt; — don’t rely on a raw sendmail fallback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The hostname can pass DMARC.&lt;/strong&gt; &lt;code&gt;dig +short TXT $(hostname -f)&lt;/code&gt; must return an SPF record if the parent domain is strict.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One message has been received by a human.&lt;/strong&gt; Not “sent”. Received.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Absence of alerts is not health.&lt;/strong&gt; It is either health, or a broken pipe — and only a test can tell you which.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why am I not receiving maldet email alerts?
&lt;/h3&gt;

&lt;p&gt;Check four things in order: the maldet service is active, &lt;code&gt;email_alert&lt;/code&gt; is set to 1 with a real address in &lt;code&gt;conf.maldet&lt;/code&gt;, a &lt;code&gt;mail&lt;/code&gt; command is installed, and the server hostname has an SPF record if your domain’s DMARC policy is strict. Then send a test message and read the Exim log to see where it stops.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does the maldet monitor fail to start?
&lt;/h3&gt;

&lt;p&gt;The real-time monitor uses inotify and needs the &lt;code&gt;inotifywait&lt;/code&gt; binary from the inotify-tools package. If &lt;code&gt;command -v inotifywait&lt;/code&gt; prints nothing, install inotify-tools and restart maldet. The daily cron scan can keep working while the monitor is dead, which hides the problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does Exim “no recipients found in headers” mean?
&lt;/h3&gt;

&lt;p&gt;The message was submitted with &lt;code&gt;sendmail -t&lt;/code&gt;, which tells Exim to take recipients from the &lt;code&gt;To:&lt;/code&gt;, &lt;code&gt;Cc:&lt;/code&gt; and &lt;code&gt;Bcc:&lt;/code&gt; headers, and the message had none. The address on the command line was not used. Install a proper &lt;code&gt;mail&lt;/code&gt; command so the tool builds a complete message instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is mail from my server’s hostname rejected when the main domain works?
&lt;/h3&gt;

&lt;p&gt;If the parent domain’s DMARC record has &lt;code&gt;sp=reject&lt;/code&gt;, the reject policy also covers subdomains such as the server hostname. Mail from &lt;code&gt;root@&lt;/code&gt; the hostname then needs its own SPF record that matches the hostname. Without one, SPF and DMARC fail and receivers reject the mail.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is an SPF record on the server hostname safe to add?
&lt;/h3&gt;

&lt;p&gt;Yes. A record such as &lt;code&gt;v=spf1 ip4:&amp;lt;server IP&amp;gt; -all&lt;/code&gt; only authorizes that one server to send as the hostname and tells receivers to reject anything else. It does not change how the main domain’s mail is authorized.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I test that server alerts really reach someone?
&lt;/h3&gt;

&lt;p&gt;Send a message with the same &lt;code&gt;mail&lt;/code&gt; command the tool uses, find it in &lt;code&gt;/var/log/exim_mainlog&lt;/code&gt;, follow it with &lt;code&gt;exigrep&lt;/code&gt;, and confirm a &lt;code&gt;250&lt;/code&gt; answer and a &lt;code&gt;Completed&lt;/code&gt; line. Then open the message in the mailbox. An alert path is only proven when a person has received a message through it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-server-security-alerts-never-arrive-maldet-exim-spf.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/server-security-alerts-never-arrive-maldet-exim-spf/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>email</category>
      <category>security</category>
      <category>devops</category>
    </item>
    <item>
      <title>nginx "unknown directive http2" — the One-Line Fix, and Why apt upgrade Brings It Back</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Mon, 23 Nov 2026 17:18:36 +0000</pubDate>
      <link>https://dev.to/daanial/nginx-unknown-directive-http2-the-one-line-fix-and-why-apt-upgrade-brings-it-back-p7j</link>
      <guid>https://dev.to/daanial/nginx-unknown-directive-http2-the-one-line-fix-and-why-apt-upgrade-brings-it-back-p7j</guid>
      <description>&lt;p&gt;&lt;em&gt;A field note about a mail server whose web side went fully dark on a fresh install — one directive nginx did not know, the version gap behind it, and why the fix silently disappears on the next &lt;code&gt;apt upgrade&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The message was short.&lt;/p&gt;

&lt;p&gt;“Webmail is down. The admin panel is down too.”&lt;/p&gt;

&lt;p&gt;The server was a self-hosted grommunio box on Ubuntu 24.04 — a proof-of-concept mail platform, freshly installed.&lt;/p&gt;

&lt;p&gt;“Is the mail service itself running?”&lt;/p&gt;

&lt;p&gt;“Yes. Only the web side is dead. Nothing on 443, nothing on 8443.”&lt;/p&gt;

&lt;p&gt;“What changed?”&lt;/p&gt;

&lt;p&gt;“Nothing. We just finished the install and the packages are current.”&lt;/p&gt;

&lt;p&gt;I asked one question.&lt;/p&gt;

&lt;p&gt;“When was the last time nginx actually started — not reloaded, started?”&lt;/p&gt;

&lt;p&gt;Silence. Then: “We didn’t check nginx. We checked the mail service.”&lt;/p&gt;

&lt;p&gt;That’s the trap. A web server that refuses to start does not look like a web server problem. It looks like the application is broken — webmail, admin panel, everything at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  What nginx Was Actually Saying
&lt;/h2&gt;

&lt;p&gt;The first command is always the same:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nginx -t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And there it was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nginx: [emerg] unknown directive "http2" in /usr/share/grommunio-common/nginx.conf:62
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;nginx is strict: one directive it does not recognise, and it refuses to start at all.&lt;/strong&gt; Not “start and skip that line”. Not “start with a warning”. It does not bind a single port.&lt;/p&gt;

&lt;p&gt;On this box every web service was an nginx virtual host:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;port 80 — the plain HTTP listener&lt;/li&gt;
&lt;li&gt;port 443 — webmail and the client endpoints&lt;/li&gt;
&lt;li&gt;port 8443 — the admin interface&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One bad line in one included file took all three down together. That is why it felt like “everything broke” instead of “one thing broke”.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Version Gap Behind One Line
&lt;/h2&gt;

&lt;p&gt;Line 62 was a single directive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;http2&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That standalone &lt;code&gt;http2&lt;/code&gt; directive arrived in &lt;strong&gt;nginx 1.25.1&lt;/strong&gt;. Before that, HTTP/2 was switched on as a parameter of the listen line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;listen&lt;/span&gt; &lt;span class="mi"&gt;443&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt; &lt;span class="n"&gt;http2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ubuntu 24.04 ships &lt;strong&gt;nginx 1.24.0&lt;/strong&gt;. Check yours:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nginx -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the vendor config was written for a newer nginx than the one the distribution provides. On 1.24.0 the word &lt;code&gt;http2&lt;/code&gt; at the start of a line is simply an unknown directive.&lt;/p&gt;

&lt;p&gt;Here’s the part that trips people up. Nothing on the server was “wrong”. The package did exactly what its authors intended. The distribution did exactly what its maintainers intended. The two just disagree about which nginx you are running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Nobody Sees It in Testing
&lt;/h2&gt;

&lt;p&gt;Three reasons this slips through.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The mail service stays up.&lt;/strong&gt; SMTP and IMAP do not go through nginx. Health checks that only test port 25 or the mail daemon show green.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A reload is not a start.&lt;/strong&gt; If nginx was already running when the config changed and nobody restarted it, the old config keeps serving. The failure shows up at the next restart or reboot — often days later, and far away from the update that caused it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The error points at a vendor file.&lt;/strong&gt; The path is &lt;code&gt;/usr/share/...&lt;/code&gt;, not &lt;code&gt;/etc/nginx/...&lt;/code&gt;. People read “grommunio” in the path and start debugging grommunio instead of nginx.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Absence of a mail alert is not health.&lt;/strong&gt; The web side can be completely dead while every mail check passes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix This
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Confirm it is this error, and nothing else
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nginx -t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plain takeaway: if the only &lt;code&gt;[emerg]&lt;/code&gt; line is &lt;code&gt;unknown directive "http2"&lt;/code&gt;, this article is your fix. If there are other errors, fix those first — &lt;code&gt;nginx -t&lt;/code&gt; stops at the first one it finds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Find every standalone &lt;code&gt;http2&lt;/code&gt; line
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -rn &lt;span class="s2"&gt;"^\s*http2 on;"&lt;/span&gt; /etc/nginx /usr/share/grommunio-common
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On this box it was one line in one file. Check anyway — some configs repeat it per server block.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Back up, then comment the line out (this changes state)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cp /usr/share/grommunio-common/nginx.conf /root/nginx.conf.bak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sed -i &lt;span class="s1"&gt;'s/^\s*http2 on;/#&amp;amp;/'&lt;/span&gt; /usr/share/grommunio-common/nginx.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;#&amp;amp;&lt;/code&gt; keeps the original text and puts a &lt;code&gt;#&lt;/code&gt; in front of it. You can see exactly what was changed, and you can undo it by removing one character.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Test, then start
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nginx -t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nginx: configuration file /etc/nginx/nginx.conf test is successful
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl restart nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Verify from the outside
&lt;/h3&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl is-active nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss -tlnp &lt;span class="o"&gt;|&lt;/span&gt; grep nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see nginx listening on 80, 443 and 8443. Then open webmail and the admin panel from a browser on another network. A green &lt;code&gt;systemctl&lt;/code&gt; line only proves the process exists; a page that loads from outside proves the service works.&lt;/p&gt;

&lt;h3&gt;
  
  
  What you lose by turning HTTP/2 off
&lt;/h3&gt;

&lt;p&gt;Almost nothing. On this design nginx terminates TLS and talks to the mail backend over plain HTTP on localhost. HTTP/2 only ever existed between the browser and nginx.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mail clients over MAPI, Autodiscover, EWS and ActiveSync are unaffected.&lt;/li&gt;
&lt;li&gt;SMTP and IMAP never touched nginx in the first place.&lt;/li&gt;
&lt;li&gt;Webmail page loads are marginally slower over HTTP/1.1.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;apt upgrade&lt;/code&gt; Brings It Back
&lt;/h2&gt;

&lt;p&gt;This is the part that turns a one-time fix into a recurring outage.&lt;/p&gt;

&lt;p&gt;The file you just edited lives under &lt;code&gt;/usr/share/&lt;/code&gt;. Debian and Ubuntu protect configuration files only when the package declares them as &lt;strong&gt;conffiles&lt;/strong&gt; — normally files under &lt;code&gt;/etc/&lt;/code&gt;. A conffile you changed triggers the familiar prompt during an upgrade: keep your version, or take the maintainer’s.&lt;/p&gt;

&lt;p&gt;A file under &lt;code&gt;/usr/share/&lt;/code&gt; is not a conffile. The package owns it outright. So on the next update of &lt;code&gt;grommunio-common&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt upgrade → new grommunio-common → nginx.conf overwritten → http2 on; is back → next nginx start fails
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No prompt. No warning. Nothing in the upgrade output tells you a file you edited was replaced.&lt;/p&gt;

&lt;p&gt;Prove it on your own box. First, which package owns the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dpkg -S /usr/share/grommunio-common/nginx.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then list what that package declares as conffiles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dpkg-query -W -f=&lt;span class="s1"&gt;'${Conffiles}\n'&lt;/span&gt; grommunio-common
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the nginx.conf path is not in that list, your edit will not survive the next upgrade.&lt;/p&gt;

&lt;p&gt;Two details make it worse:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reboots are fine.&lt;/strong&gt; The edit survives reboots, so a reboot test after the fix passes. Only a package update reverts it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The failure is delayed.&lt;/strong&gt; If the upgrade does not restart nginx, the old config keeps serving until the next restart. The outage then appears days later, with no update in sight.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The fix is not wrong. The fix is temporary — and nothing tells you when it expires.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Durable Fix: Run an nginx That Knows the Directive
&lt;/h2&gt;

&lt;p&gt;The workaround removes a feature to match an old nginx. The durable fix goes the other way: run nginx 1.25.1 or newer, so the vendor config works unmodified and no edit is needed at all.&lt;/p&gt;

&lt;p&gt;On Ubuntu that means nginx.org’s own package repository, which carries current mainline and stable builds. The steps are in nginx.org’s “Linux packages” documentation; in short, add their signing key and repository, then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nginx -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two gotchas I checked before planning this change:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Where the config is included.&lt;/strong&gt; nginx.org’s build reads &lt;code&gt;/etc/nginx/conf.d/&lt;/code&gt; and ignores Ubuntu’s &lt;code&gt;sites-enabled/&lt;/code&gt; layout. grommunio wires itself in through &lt;code&gt;conf.d/&lt;/code&gt;, so the layout is compatible. Confirm on your box before you switch:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -rn &lt;span class="s2"&gt;"include"&lt;/span&gt; /etc/nginx/nginx.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The worker user.&lt;/strong&gt; nginx.org’s package runs as user &lt;code&gt;nginx&lt;/code&gt;. Ubuntu’s runs as &lt;code&gt;www-data&lt;/code&gt;. The PHP socket that webmail uses is owned by &lt;code&gt;www-data&lt;/code&gt;. If you keep the new default, webmail answers with 502 Bad Gateway. Set this in &lt;code&gt;/etc/nginx/nginx.conf&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the same verification as before: &lt;code&gt;nginx -t&lt;/code&gt;, restart, &lt;code&gt;ss -tlnp&lt;/code&gt;, and a browser from outside.&lt;/p&gt;

&lt;p&gt;I want to be honest here: on this PoC the durable fix is planned, not done. The comment-out is what runs today, and the check below is what keeps it safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Check I Run After Every Update Now
&lt;/h2&gt;

&lt;p&gt;Until the durable fix is in, this is the routine after any &lt;code&gt;apt upgrade&lt;/code&gt; on the box:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Is the edit still there?&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -n &lt;span class="s2"&gt;"http2 on;"&lt;/span&gt; /usr/share/grommunio-common/nginx.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the line starts with &lt;code&gt;#&lt;/code&gt;, the fix is intact. If it does not, the package replaced the file — run Step 3 again.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Would nginx start right now?&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nginx -t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Is it actually listening?&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss -tlnp &lt;span class="o"&gt;|&lt;/span&gt; grep nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;nginx -t&lt;/code&gt; after every upgrade, even when nginx was not restarted. It tests the config on disk, not the one in memory — which is exactly the gap that turns this into a delayed outage.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Lesson
&lt;/h2&gt;

&lt;p&gt;The specific error is about nginx and one directive. The lesson is broader:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A file under &lt;code&gt;/usr/share/&lt;/code&gt; belongs to the package.&lt;/strong&gt; Edit it and the next upgrade wins. Check with &lt;code&gt;dpkg-query -W -f='${Conffiles}\n' &amp;lt;package&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A vendor config can target a newer upstream than your distribution ships.&lt;/strong&gt; Compare &lt;code&gt;nginx -v&lt;/code&gt; with the release that introduced the directive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One unknown directive stops nginx entirely.&lt;/strong&gt; Every virtual host on the box goes down with it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test the config on disk after every update.&lt;/strong&gt; &lt;code&gt;nginx -t&lt;/code&gt; costs a second and finds the outage before the next restart does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write down every hand edit to a package-owned file.&lt;/strong&gt; A one-line note next to the server — what you changed, why, and how to re-apply it — is the difference between a five-minute fix and an afternoon of debugging the wrong application.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;When someone runs a vendor stack on a distribution nginx, I ask one question in the next review:&lt;/p&gt;

&lt;p&gt;“Which of your config edits live in files the package owns — and what tells you when an update has undone them?”&lt;/p&gt;

&lt;p&gt;If the answer is “none, all our changes are under &lt;code&gt;/etc&lt;/code&gt; and in conffiles”, they’re in good shape. If the answer is “we fixed that once, it’s fine”, we’re not done yet.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What does nginx “unknown directive http2” mean?
&lt;/h3&gt;

&lt;p&gt;Your config uses the standalone &lt;code&gt;http2 on;&lt;/code&gt; directive, which exists only in nginx 1.25.1 and newer. An older nginx, such as 1.24.0 on Ubuntu 24.04, does not know it and refuses to start. Run &lt;code&gt;nginx -v&lt;/code&gt; to see your version.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I fix “unknown directive http2” quickly?
&lt;/h3&gt;

&lt;p&gt;Back up the file, then comment out the &lt;code&gt;http2 on;&lt;/code&gt; line and run &lt;code&gt;nginx -t&lt;/code&gt;. If the test passes, restart nginx. On older nginx you can enable HTTP/2 the old way instead, with &lt;code&gt;listen 443 ssl http2;&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why did the error come back after apt upgrade?
&lt;/h3&gt;

&lt;p&gt;The file was under &lt;code&gt;/usr/share/&lt;/code&gt;, which the package owns and does not declare as a conffile. An upgrade replaces it without a prompt, which restores the &lt;code&gt;http2 on;&lt;/code&gt; line. Check with &lt;code&gt;dpkg-query -W -f='${Conffiles}\n'&lt;/code&gt; and the package name.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does turning off HTTP/2 in nginx break anything?
&lt;/h3&gt;

&lt;p&gt;On a reverse-proxy setup where nginx terminates TLS and talks to the backend over HTTP on localhost, HTTP/2 only affects browser-to-nginx traffic. Mail protocols and API clients keep working. Web pages load slightly slower over HTTP/1.1.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the permanent fix?
&lt;/h3&gt;

&lt;p&gt;Run nginx 1.25.1 or newer, for example from nginx.org’s own Ubuntu repository, so the vendor config works without edits. Make sure the new package reads the same include folder and set &lt;code&gt;user www-data;&lt;/code&gt; if your PHP socket belongs to www-data, or you will get 502 errors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why did webmail and the admin panel both go down at once?
&lt;/h3&gt;

&lt;p&gt;Both are nginx virtual hosts on the same server. When nginx refuses to start because of one bad line, it binds no ports at all, so every site it serves goes down together while the mail service itself keeps running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-nginx-unknown-directive-http2-apt-upgrade.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/nginx-unknown-directive-http2-apt-upgrade/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>ubuntu</category>
      <category>linux</category>
      <category>devops</category>
    </item>
    <item>
      <title>DR Failover on OpenStack — Why the Replica IP Never Answers Until You Set Allowed-Address-Pairs</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Sun, 22 Nov 2026 17:14:37 +0000</pubDate>
      <link>https://dev.to/daanial/dr-failover-on-openstack-why-the-replica-ip-never-answers-until-you-set-allowed-address-pairs-1041</link>
      <guid>https://dev.to/daanial/dr-failover-on-openstack-why-the-replica-ip-never-answers-until-you-set-allowed-address-pairs-1041</guid>
      <description>&lt;p&gt;&lt;em&gt;A field story about a two-data-centre DR design that looked finished on paper — the cloud network rule almost nobody checks before failover day — and the port check I now run before any IP takeover is signed off.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The design was on one page, and it was clean.&lt;/p&gt;

&lt;p&gt;“Two data centres. Stretched layer 2 between them. The replication tool watches the primary, and if it dies, the DR server takes over the same IP. Cloudflare keeps one A record. Nothing to change in DNS.”&lt;/p&gt;

&lt;p&gt;It was a good design. Fewer moving parts than anything else we had looked at.&lt;/p&gt;

&lt;p&gt;I asked one question.&lt;/p&gt;

&lt;p&gt;“Which layer decides whether the DR server is allowed to use that IP?”&lt;/p&gt;

&lt;p&gt;“The replication tool. It sends the ARP and the switch learns the new MAC.”&lt;/p&gt;

&lt;p&gt;“On a physical switch, yes. These are OpenStack VMs. The switch is Neutron.”&lt;/p&gt;

&lt;p&gt;A pause.&lt;/p&gt;

&lt;p&gt;“Neutron will block it?”&lt;/p&gt;

&lt;p&gt;“By default, yes. And it will not tell anyone.”&lt;/p&gt;

&lt;p&gt;That’s the trap. &lt;strong&gt;On OpenStack, an IP takeover does not fail with an error. It fails with silence.&lt;/strong&gt; The DR server believes it owns the IP. The OS shows the IP on the interface. The replication console shows a successful failover. And not one packet for that IP gets in or out of the DR port.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Allowed-Address-Pairs Actually Is
&lt;/h2&gt;

&lt;p&gt;Every VM in OpenStack connects to the network through a &lt;strong&gt;port&lt;/strong&gt;. A port has a MAC address and one or more fixed IPs, handed out by Neutron.&lt;/p&gt;

&lt;p&gt;When &lt;strong&gt;port security&lt;/strong&gt; is on (the default), Neutron adds anti-spoofing rules to that port. &lt;strong&gt;Anti-spoofing means the port only lets through traffic that carries the port’s own MAC and its own fixed IPs.&lt;/strong&gt; Anything else is dropped at the virtual switch, before it leaves the hypervisor.&lt;/p&gt;

&lt;p&gt;That is a good default. It stops one tenant VM from pretending to be another.&lt;/p&gt;

&lt;p&gt;It is also exactly what an IP failover does. The flow during a takeover looks like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Primary fails → DR server adds the service IP → DR sends a gratuitous ARP → neighbours update their ARP cache → traffic for the IP goes to the DR MAC&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;On OpenStack, the second arrow is where it stops. The service IP is a fixed IP on the &lt;strong&gt;primary’s&lt;/strong&gt; port, not on the DR port. So from Neutron’s point of view, the DR server is now spoofing:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DR server → gratuitous ARP for the primary's IP → DR port anti-spoofing → dropped&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Allowed-address-pairs is the Neutron setting that tells a port: these extra IPs (and optionally MACs) are legitimate on this port too.&lt;/strong&gt; Add the service IP to the DR port as an allowed address pair, and the same gratuitous ARP is let through.&lt;/p&gt;

&lt;p&gt;Where this bites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IP failover in replication and DR tools (gratuitous ARP takeover between a source and a target server).&lt;/li&gt;
&lt;li&gt;Virtual IPs with keepalived / VRRP for load balancers and database pairs.&lt;/li&gt;
&lt;li&gt;Any cluster where a “floating” service IP moves between nodes inside the guest OS, not through the cloud API.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Nobody Sees It in Testing
&lt;/h2&gt;

&lt;p&gt;Most DR tests on a new design check the replication, not the takeover.&lt;/p&gt;

&lt;p&gt;The replica is in sync. The DR server boots. You log in to it on its own IP. Everything works, because everything you touched used the DR server’s own fixed IP — the one Neutron already knows.&lt;/p&gt;

&lt;p&gt;The service IP is the one thing you cannot test without a real failover, and a real failover is usually the last step, scheduled for “after go-live”, if at all.&lt;/p&gt;

&lt;p&gt;And the usual signs of health all lie on the day:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The replication console reports the failover as complete.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ip addr&lt;/code&gt; on the DR server shows the service IP.&lt;/li&gt;
&lt;li&gt;The DR server can still reach the internet on its own IP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only clients trying to reach the service IP notice. From their side, the old MAC is gone and the new one never answers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Simpler Design That Made This the Only Question
&lt;/h2&gt;

&lt;p&gt;Before the stretched L2 was on the table, the design had more moving parts. They are worth naming, because each one was dropped for a reason:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Moving an OpenStack floating IP.&lt;/strong&gt; A floating IP lives in one region’s router. It cannot cross to the other data centre.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A cloud health check plus DNS failover.&lt;/strong&gt; A second detector can disagree with the replication tool, and a status check on the instance does not catch a network loss.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A post-failover script that calls the Cloudflare API.&lt;/strong&gt; It needs an API token stored in plain text on a server that will itself be replaced at failover.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Cloudflare load balancer with failover pools.&lt;/strong&gt; It works, it costs a small monthly fee, and it was the answer until layer 2 between the sites became possible.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the design reached two scripts on two machines plus a token, the feedback was simple: “looks complex.” That was fair.&lt;/p&gt;

&lt;p&gt;With stretched layer 2, the source and the DR server sit on the same segment. The replication tool’s own IP failover moves the service IP. Cloudflare keeps one A record that never changes. No scripts for traffic at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fewer moving parts means fewer things to fail on the worst day.&lt;/strong&gt; But it also means one rule carries the whole design. Here that rule is the allowed address pair.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix This
&lt;/h2&gt;

&lt;p&gt;The commands below use the standard &lt;code&gt;openstack&lt;/code&gt; client. Run the read-only ones first. The change steps are marked.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Find Both Ports
&lt;/h3&gt;

&lt;p&gt;You need the port IDs, not the server names.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openstack port list --server PRIMARY-UUID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openstack port list --server DR-UUID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the port that carries the service IP on the primary, and the port on the same stretched network on the DR server. If the two ports are on different networks, stop here: IP failover with ARP only works inside one layer 2 segment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Read What the DR Port Allows Today
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openstack port show DR-PORT-ID -c fixed_ips -c allowed_address_pairs -c port_security_enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A port that is not ready shows &lt;code&gt;port_security_enabled&lt;/code&gt; as &lt;code&gt;True&lt;/code&gt; and an empty &lt;code&gt;allowed_address_pairs&lt;/code&gt;. That port will drop the service IP at failover.&lt;/p&gt;

&lt;p&gt;Plain takeaway: if the service IP is not in that output, the failover has never been possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Add the Service IP as an Allowed Address Pair (change)
&lt;/h3&gt;

&lt;p&gt;This is the fix. It changes the DR port only.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openstack port &lt;span class="nb"&gt;set&lt;/span&gt; --allowed-address ip-address=203.0.113.20 DR-PORT-ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here 203.0.113.20 stands for the service IP that Cloudflare points at. No MAC is given, so Neutron allows the IP with the DR port’s own MAC — which is what a gratuitous ARP from the DR server will carry.&lt;/p&gt;

&lt;p&gt;Do the same on the &lt;strong&gt;primary’s&lt;/strong&gt; port with the same IP if the service will ever fail back. After a failback, the primary takes the IP again, and by then the IP may no longer be the fixed IP it started with — for example, if someone rebuilt the port.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Or Turn Port Security Off (change, and wider)
&lt;/h3&gt;

&lt;p&gt;The other option is to disable port security on both ports. Neutron requires the security groups to be removed first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openstack port &lt;span class="nb"&gt;set&lt;/span&gt; --no-security-group --disable-port-security DR-PORT-ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I do not recommend it as the first choice. It removes the security groups from that port as well, so the VM now relies on its own host firewall for everything. Allowed-address-pairs keeps the security groups and opens exactly one IP.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Confirm the Change on the Port
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openstack port show DR-PORT-ID -c allowed_address_pairs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the service IP with the DR port’s MAC. If the list is empty, the command went to the wrong port, or your project’s policy does not allow you to set address pairs. In that case, the cloud team must do it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Test the Takeover Before Go-Live
&lt;/h3&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts. A port setting is a promise. Only a takeover proves it.&lt;/p&gt;

&lt;p&gt;In a maintenance window, run a planned failover in the replication tool. Then, from a third VM on the same stretched segment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ping -c 3 203.0.113.20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ip neigh show 203.0.113.20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The MAC in the &lt;code&gt;ip neigh&lt;/code&gt; output must be the &lt;strong&gt;DR port’s MAC&lt;/strong&gt; (from Step 2). If ping answers and the MAC is the DR MAC, the takeover works end to end.&lt;/p&gt;

&lt;p&gt;If ping fails and &lt;code&gt;ip neigh&lt;/code&gt; shows &lt;code&gt;FAILED&lt;/code&gt; or still shows the primary’s MAC, the gratuitous ARP never got out. Go back to Step 2 on the DR port.&lt;/p&gt;

&lt;p&gt;This failure is not a bug. It is the verification.&lt;/p&gt;

&lt;p&gt;Then check from the outside, through Cloudflare, that the site answers. The public path must reach the stretched segment. If the public entry point is a floating IP NAT in the first data centre only, the internal IP moves and the public path does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Fence: Power Off the Primary Through the Cloud, Not the OS
&lt;/h2&gt;

&lt;p&gt;An IP takeover is only safe if the old primary is really gone. Two servers on one segment with the same IP is worse than an outage.&lt;/p&gt;

&lt;p&gt;Many replication tools have an option like “shut down the source server” at failover. Think about when it runs: at failover, because the DR server cannot reach the primary. If it cannot reach it, it cannot shut it down either.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fence must go through the layer below the operating system.&lt;/strong&gt; On OpenStack that is the compute API of the first data centre. One pre-failover script on the DR server is enough:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openstack --os-cloud dc1 server stop PRIMARY-UUID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the &lt;strong&gt;UUID, not the name&lt;/strong&gt;. At a full-server failover the DR server can take over the primary’s hostname, so a name-based command may end up pointing at the wrong machine.&lt;/p&gt;

&lt;p&gt;Two more notes on the job settings I used in this design:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic failover on, with monitoring every 5 seconds and failover after 5 missed checks. That is roughly 25 seconds of silence before the takeover starts.&lt;/li&gt;
&lt;li&gt;IP failover on, with the service IP on the stretched segment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still verify one thing in your own tool before you rely on it: that the job type you use (full server, files, application) really exposes the pre-failover script option. Not every job type does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist Before You Sign Off an IP Takeover on OpenStack
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Same layer 2 segment.&lt;/strong&gt; &lt;code&gt;openstack port list --server &amp;lt;UUID&amp;gt;&lt;/code&gt; on both servers shows ports on the same network.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service IP allowed on the DR port.&lt;/strong&gt; &lt;code&gt;openstack port show &amp;lt;DR-PORT&amp;gt; -c allowed_address_pairs&lt;/code&gt; lists it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service IP allowed on the primary port for failback.&lt;/strong&gt; Same command on the primary port.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security groups still in place.&lt;/strong&gt; &lt;code&gt;openstack port show &amp;lt;PORT&amp;gt; -c security_group_ids&lt;/code&gt; is not empty, unless you chose Step 4 on purpose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fence by UUID through the other data centre’s API.&lt;/strong&gt; &lt;code&gt;openstack --os-cloud dc1 server show &amp;lt;UUID&amp;gt; -c status&lt;/code&gt; works from the DR server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Takeover proven.&lt;/strong&gt; &lt;code&gt;ip neigh show &amp;lt;SERVICE-IP&amp;gt;&lt;/code&gt; from a third VM shows the DR MAC after a planned failover.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public path moves too.&lt;/strong&gt; The public entry point lands on the stretched segment, not on a NAT in one site.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;When a DR design on any cloud says “the DR server takes over the IP”, I ask one question:&lt;/p&gt;

&lt;p&gt;“Show me the DR port’s allowed address pairs.”&lt;/p&gt;

&lt;p&gt;If the answer is a list with the service IP in it, and a planned failover has already shown the DR MAC from a third VM, they’re in good shape. If the answer is “the replication tool handles that”, we’re not done yet.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why does IP failover not work on OpenStack?
&lt;/h3&gt;

&lt;p&gt;Neutron port security adds anti-spoofing rules to every port, so a port only passes traffic for its own MAC and fixed IPs. When the DR server takes over the primary’s IP and sends a gratuitous ARP, the DR port drops it. Add the service IP to the DR port as an allowed address pair.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does allowed-address-pairs do in OpenStack Neutron?
&lt;/h3&gt;

&lt;p&gt;It adds extra IP addresses, and optionally MAC addresses, that a port is allowed to use on top of its fixed IPs. Anti-spoofing stays on for everything else. It is the standard way to run virtual IPs for keepalived, VRRP and replication tools that fail over an IP.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I disable port security instead of using allowed-address-pairs?
&lt;/h3&gt;

&lt;p&gt;Usually not. Disabling port security also removes the security groups from that port, so the VM depends on its own firewall alone. Allowed-address-pairs opens exactly one IP and keeps the security groups in place.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can an OpenStack floating IP move between two data centres?
&lt;/h3&gt;

&lt;p&gt;No. A floating IP belongs to the router of one region or site. For failover between data centres you need a stretched layer 2 segment with IP takeover, a DNS change, or a load balancer in front of both sites.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I test that the DR server really took over the IP?
&lt;/h3&gt;

&lt;p&gt;Run a planned failover, then from a third VM on the same segment ping the service IP and run ip neigh show for it. The MAC must be the DR port’s MAC. If the entry shows FAILED or the old MAC, the gratuitous ARP was dropped.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why fence the primary through the cloud API and not from the replication tool?
&lt;/h3&gt;

&lt;p&gt;At failover the DR server cannot reach the primary, so a shutdown request from the tool cannot reach it either. A stop call to the first data centre’s compute API works even when the primary’s network is down. Use the server UUID, because the DR server may take over the hostname.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-openstack-dr-failover-allowed-address-pairs.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/openstack-dr-failover-allowed-address-pairs/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>openstack</category>
      <category>networking</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>AutoSSL Quietly Dropped the Mail Name — a Cloudflare-Only Origin and the Move to DNS-01</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Sat, 21 Nov 2026 18:45:53 +0000</pubDate>
      <link>https://dev.to/daanial/autossl-quietly-dropped-the-mail-name-a-cloudflare-only-origin-and-the-move-to-dns-01-n4o</link>
      <guid>https://dev.to/daanial/autossl-quietly-dropped-the-mail-name-a-cloudflare-only-origin-and-the-move-to-dns-01-n4o</guid>
      <description>&lt;p&gt;&lt;em&gt;A field story about a cPanel certificate that renewed on time and still broke every Outlook client — the port 80 rule almost nobody connects to mail — and the DNS-01 setup I now use for any origin locked to Cloudflare.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The message came in the next morning.&lt;/p&gt;

&lt;p&gt;“Outlook is showing a certificate warning on every laptop. Nothing changed on our side.”&lt;/p&gt;

&lt;p&gt;The customer’s IT lead had already checked the website. Green padlock. Valid certificate. Renewed the evening before.&lt;/p&gt;

&lt;p&gt;“So the certificate is fine,” he said. “It renewed. Why is Outlook complaining?”&lt;/p&gt;

&lt;p&gt;I asked one question: “Which names are on the new certificate?”&lt;/p&gt;

&lt;p&gt;He opened it. The site name was there. The &lt;code&gt;www&lt;/code&gt; name was there.&lt;/p&gt;

&lt;p&gt;The mail name was not.&lt;/p&gt;

&lt;p&gt;That’s the trap. &lt;strong&gt;A certificate renewal can succeed and still lose a name.&lt;/strong&gt; cPanel does not fail the renewal when one name cannot be validated. It issues the certificate for the names that passed and moves on. The website stays green, so nobody looks further.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Happened
&lt;/h2&gt;

&lt;p&gt;On this server, the web names and the mail name take two different paths.&lt;/p&gt;

&lt;p&gt;The web names are proxied through Cloudflare:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Visitor → Cloudflare → Origin&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The mail name is DNS-only. It has to be. IMAP and SMTP clients connect straight to the server, because Cloudflare’s normal proxy only carries web traffic:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Outlook → mail.example.com → Origin (993, 465, 587)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now add one hardening rule we had put in place earlier: the virtualisation platform’s distributed firewall allowed TCP 80 and 443 to this VM &lt;strong&gt;only from Cloudflare’s IP ranges&lt;/strong&gt;. That is a good rule. It stops anyone from going around Cloudflare’s WAF and hitting the origin directly.&lt;/p&gt;

&lt;p&gt;Here is the part that trips people up. AutoSSL uses Let’s Encrypt with HTTP validation by default. For each name on the certificate, Let’s Encrypt connects to that name on port 80 and fetches a token file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;code&gt;example.com&lt;/code&gt;, Let’s Encrypt connects to Cloudflare. Cloudflare passes the request to the origin. Allowed.&lt;/li&gt;
&lt;li&gt;For &lt;code&gt;mail.example.com&lt;/code&gt;, DNS points straight at the origin IP. Let’s Encrypt connects from its own servers, not from Cloudflare. The firewall drops it. Timeout.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the renewal ran, the web names passed, the mail name timed out, and AutoSSL issued a certificate without it. Dovecot and Exim then had no certificate that matched &lt;code&gt;mail.example.com&lt;/code&gt;, so they served the server’s hostname certificate. Outlook compared the name it asked for with the name on the certificate and showed the warning the customer saw: the target principal name is incorrect.&lt;/p&gt;

&lt;p&gt;Where this pattern is common:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cPanel servers behind Cloudflare with an origin lockdown (firewall, security group or host rules that allow only Cloudflare ranges).&lt;/li&gt;
&lt;li&gt;Any server where the web names are proxied and the mail, FTP or control-panel names are DNS-only.&lt;/li&gt;
&lt;li&gt;Servers where someone “tightened port 80” months ago and the first renewal after that is the first time anyone notices.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Nobody Sees It in Testing
&lt;/h2&gt;

&lt;p&gt;The hardening was tested. The website worked. Direct access to the origin was blocked, as designed. Every check passed.&lt;/p&gt;

&lt;p&gt;The failure only shows up at renewal time, which with Let’s Encrypt is weeks or months after the change. By then, nobody links “Outlook warning today” with “firewall rule last quarter”.&lt;/p&gt;

&lt;p&gt;And the usual check misses it, because the usual check is the browser padlock. The padlock looks at the web name. The web name was fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Wrong First Fix
&lt;/h2&gt;

&lt;p&gt;The customer’s IT team did the reasonable thing first. They went into cPanel and reinstalled the old certificate, the one that still had the mail name on it.&lt;/p&gt;

&lt;p&gt;The warnings stopped. For a little over two hours.&lt;/p&gt;

&lt;p&gt;Then AutoSSL ran again. AutoSSL checks every few hours and renews when a certificate is within a few days of expiry. The reinstalled certificate was close to expiry, so AutoSSL replaced it with a fresh one — again without the mail name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A manual reinstall does not hold against AutoSSL.&lt;/strong&gt; AutoSSL owns that certificate slot. Whatever you install by hand, it will replace on its next run if it thinks it can do better.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix This
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Confirm Which Names the Mail Ports Really Serve
&lt;/h3&gt;

&lt;p&gt;Do not trust the website. Ask the mail port directly. This is read-only.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl s_client -connect mail.example.com:993 -servername mail.example.com &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;/dev/null 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null &lt;span class="o"&gt;|&lt;/span&gt; openssl x509 -noout -subject -ext subjectAltName -enddate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A healthy answer lists &lt;code&gt;mail.example.com&lt;/code&gt; under the subject alternative names. A broken one lists only the server hostname, or only the web names. Repeat for 465 and 587 if you use them. The mail ports can serve different certificates, so check each one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Read the AutoSSL Log for the Missing Name
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls -t /var/cpanel/logs/autossl/ &lt;span class="o"&gt;|&lt;/span&gt; head -3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the newest folder’s &lt;code&gt;txt&lt;/code&gt; file and search for the mail name. You are looking for the domain control validation (DCV) result. In this case the HTTP check for &lt;code&gt;mail.example.com&lt;/code&gt; had timed out, while every proxied name passed.&lt;/p&gt;

&lt;p&gt;Plain takeaway: a timeout on one name and success on the others points at the network, not at DNS or cPanel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Prove Where the Packets Stop
&lt;/h3&gt;

&lt;p&gt;This is the step that turns a theory into a cause. On the origin, watch port 80 while someone outside tries to reach it directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tcpdump -ni any &lt;span class="s1"&gt;'tcp port 80 and host 198.51.100.25'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here 198.51.100.25 stands for the public IP of the test machine. Then, from that machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -m 10 -I http://203.0.113.10/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;curl&lt;/code&gt; times out (exit code 28) and &lt;code&gt;tcpdump&lt;/code&gt; shows &lt;strong&gt;zero packets&lt;/strong&gt;, the drop happens before the VM. In our case the host firewall was not the reason: UFW was inactive, there was no CSF, and nftables had no inbound drop rules. The block was upstream, in the platform’s distributed firewall.&lt;/p&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts. Zero packets on the VM is the proof. Without it, you are guessing between the host firewall, the provider and Let’s Encrypt.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Short-Term — Open Port 80, Renew, Verify
&lt;/h3&gt;

&lt;p&gt;To get the mail name back the same day, the platform team opened TCP 80 from any source to the VM.&lt;/p&gt;

&lt;p&gt;One detail matters. The first attempt opened port 80 to a list of sources, not to everyone. Let’s Encrypt still timed out. Let’s Encrypt validates from several networks around the world and does not publish a fixed list, so “some sources” is not enough. HTTP validation needs port 80 open to any source.&lt;/p&gt;

&lt;p&gt;Then trigger AutoSSL for the account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/usr/local/cpanel/bin/autossl_check --user=exampleuser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Re-run the Step 1 check on 993, 465 and 587. The new certificate listed the mail name and carried a full ninety-day validity.&lt;/p&gt;

&lt;p&gt;That buys you ninety days. It does not fix the design. The moment port 80 goes back to Cloudflare-only, the next renewal drops the mail name again.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Long-Term — Validate Over DNS, Not Port 80
&lt;/h3&gt;

&lt;p&gt;DNS-01 validation does not connect to your server at all. The client creates a TXT record under &lt;code&gt;_acme-challenge&lt;/code&gt;, Let’s Encrypt reads it from DNS, and the record is removed. The firewall becomes irrelevant to certificates.&lt;/p&gt;

&lt;p&gt;Since the zone was already on Cloudflare, I used acme.sh with the Cloudflare DNS plugin. Create a Cloudflare API token scoped to &lt;strong&gt;Zone › DNS › Edit&lt;/strong&gt; for this zone only. Then, as root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;CF_Token&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;scoped-token&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;acme.sh --issue --server letsencrypt --dns dns_cf --keylength 2048 -d example.com -d www.example.com -d mail.example.com -d webmail.example.com -d cpanel.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;acme.sh saves the token in &lt;code&gt;/root/.acme.sh/account.conf&lt;/code&gt; (mode 600) for renewals. Delete any other copy you made, such as an env file. The token itself must stay active, or renewals will fail.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Hand the Certificate to cPanel
&lt;/h3&gt;

&lt;p&gt;acme.sh ships a cPanel deploy hook that installs the certificate through UAPI, and re-runs it on every renewal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;DEPLOY_CPANEL_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;exampleuser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;acme.sh --deploy -d example.com --deploy-hook cpanel_uapi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;acme.sh’s own cron job checks for renewal every day; I run it four times a day so a failed attempt is retried quickly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7: Tell AutoSSL to Stay Away From These Names
&lt;/h3&gt;

&lt;p&gt;If you skip this, AutoSSL and acme.sh will fight over the same slot. Exclude every name acme.sh now owns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uapi --user=exampleuser SSL add_autossl_excluded_domains &lt;span class="nv"&gt;domains&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;example.com,www.example.com,mail.example.com,webmail.example.com,cpanel.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then re-run the Step 1 check on 443, 993 and 465. All three should show the acme.sh certificate with the mail name on it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 8: Put Port 80 Back — But Not Fully Shut
&lt;/h3&gt;

&lt;p&gt;Now close port 80 back to Cloudflare-only. Not fully closed. Here is why.&lt;/p&gt;

&lt;p&gt;The server’s own hostname was also proxied through Cloudflare, and we kept it on cPanel AutoSSL. Its HTTP validation still needs port 80 — reached through Cloudflare. So the rule is: port 80 from Cloudflare ranges only.&lt;/p&gt;

&lt;p&gt;Two checks prove the rule is right:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -m 10 -I http://203.0.113.10/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Direct to the origin must time out (exit code 28).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sI http://server.example.com/.well-known/acme-challenge/test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Through Cloudflare, this must return a 404 &lt;strong&gt;from the origin&lt;/strong&gt; with &lt;code&gt;cf-cache-status: DYNAMIC&lt;/code&gt;. A 404 is the right answer here — there is no such token file. It shows that a real validation request would reach the server. This error is not a bug. It is the verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Second Certificate Nobody Was Renewing
&lt;/h2&gt;

&lt;p&gt;About a week later the server moved to a new operating system version. Afterwards I checked the mail ports again, and found a second gap.&lt;/p&gt;

&lt;p&gt;Dovecot’s SNI map now pointed &lt;code&gt;mail.example.com&lt;/code&gt; at the &lt;strong&gt;service certificate&lt;/strong&gt; — the one cPanel keeps for Dovecot, Exim, FTP and cPanel itself in &lt;code&gt;/etc/dovecot/ssl/dovecot.crt&lt;/code&gt; — not at the acme.sh certificate. That service certificate was valid. But acme.sh did not renew it, and it was not in any AutoSSL log. Nothing known was renewing it.&lt;/p&gt;

&lt;p&gt;So I issued a second DNS-01 certificate with acme.sh for the server hostname plus the mail name, and installed it as the service certificate on every renewal with a small reload script that calls:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;whmapi1 install_service_ssl_certificate service=dovecot crt=... key=... cabundle=...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;once each for &lt;code&gt;dovecot&lt;/code&gt;, &lt;code&gt;exim&lt;/code&gt;, &lt;code&gt;ftp&lt;/code&gt; and &lt;code&gt;cpanel&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One gotcha cost me time. The &lt;code&gt;whmapi1&lt;/code&gt; command line URL-decodes its arguments. A PEM certificate is base64, and base64 contains &lt;code&gt;+&lt;/code&gt;. URL-decoding turns &lt;code&gt;+&lt;/code&gt; into a space, and the call fails with “Invalid base64”. The fix is to URL-encode each PEM before passing it — in the script I used Python’s &lt;code&gt;urllib.parse.quote&lt;/code&gt;. After that, the reload printed “Reload successful”, and 993 showed the new certificate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plain takeaway:&lt;/strong&gt; “the certificate” on a cPanel server is often several certificates. Check what each port serves, and know which tool renews each one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist I Run Now
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Which names does each mail port serve?&lt;/strong&gt; &lt;code&gt;openssl s_client ... | openssl x509 -noout -ext subjectAltName&lt;/code&gt; on 993, 465 and 587.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which names are DNS-only?&lt;/strong&gt; Any DNS-only name on an origin locked to Cloudflare cannot pass HTTP validation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Who renews each certificate?&lt;/strong&gt; &lt;code&gt;acme.sh --list&lt;/code&gt; for acme.sh, the AutoSSL log for AutoSSL. A certificate in neither list will expire silently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is AutoSSL excluded from the names acme.sh owns?&lt;/strong&gt; Otherwise they overwrite each other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does port 80 through Cloudflare still reach the origin?&lt;/strong&gt; The &lt;code&gt;/.well-known/acme-challenge/test&lt;/code&gt; 404 with &lt;code&gt;cf-cache-status: DYNAMIC&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is direct port 80 blocked?&lt;/strong&gt; &lt;code&gt;curl&lt;/code&gt; to the origin IP must time out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is the first auto-renewal confirmed?&lt;/strong&gt; Put a calendar reminder a week after the expected renewal and check the new end date on every port.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;When a customer locks their origin to Cloudflare, I ask one more question before we close the change:&lt;/p&gt;

&lt;p&gt;“Which names on this server are not behind Cloudflare, and how do their certificates renew?”&lt;/p&gt;

&lt;p&gt;If the answer is “mail is on DNS-01, the rest go through Cloudflare”, they’re in good shape. If the answer is “AutoSSL handles it”, we’re not done yet — AutoSSL will handle it right up to the renewal that quietly leaves the mail name out.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why did AutoSSL renew my certificate without the mail subdomain?
&lt;/h3&gt;

&lt;p&gt;AutoSSL issues a certificate for the names that pass validation and leaves out the ones that fail. With HTTP validation, Let’s Encrypt must reach each name on port 80. If the mail name is DNS-only and the origin accepts port 80 only from Cloudflare, that check times out and the mail name is dropped.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does Outlook say “the target principal name is incorrect” after a renewal?
&lt;/h3&gt;

&lt;p&gt;Outlook connected to the mail name, but the server presented a certificate that does not list that name. On cPanel this usually means the mail name fell off the domain certificate, so Dovecot and Exim fell back to the server hostname certificate. Check the names on port 993 with openssl s_client.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I just reinstall the old certificate in cPanel?
&lt;/h3&gt;

&lt;p&gt;It works only until the next AutoSSL run. AutoSSL checks every few hours and replaces a certificate that is close to expiry. Either fix the validation path or move the names to DNS-01 and exclude them from AutoSSL.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need to open port 80 to everyone for Let’s Encrypt?
&lt;/h3&gt;

&lt;p&gt;For HTTP validation, yes: Let’s Encrypt validates from several networks and does not publish a fixed list of addresses. Opening port 80 to a few sources is not enough. DNS-01 validation avoids the question, because it never connects to your server.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I use DNS-01 on a cPanel server with Cloudflare DNS?
&lt;/h3&gt;

&lt;p&gt;Install acme.sh, create a Cloudflare API token limited to DNS edit on the zone, and issue with –dns dns_cf. Deploy with the cpanel_uapi hook so every renewal is installed, and add the names to the AutoSSL exclusion list with uapi SSL add_autossl_excluded_domains.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I close port 80 completely after moving to DNS-01?
&lt;/h3&gt;

&lt;p&gt;Only if no remaining name uses HTTP validation. If the server hostname is still on AutoSSL through Cloudflare, keep port 80 open to Cloudflare ranges only, and confirm that a test path under /.well-known/acme-challenge/ returns an origin 404 through Cloudflare.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-autossl-dropped-mail-hostname-cloudflare-dns-01.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/autossl-dropped-mail-hostname-cloudflare-dns-01/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ssl</category>
      <category>cpanel</category>
      <category>cloudflare</category>
      <category>devops</category>
    </item>
    <item>
      <title>The Backup Agent That Would Not Install on cPanel — TMPDIR, noexec and a Folder Nobody Checks</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Fri, 20 Nov 2026 17:11:42 +0000</pubDate>
      <link>https://dev.to/daanial/the-backup-agent-that-would-not-install-on-cpanel-tmpdir-noexec-and-a-folder-nobody-checks-4kdm</link>
      <guid>https://dev.to/daanial/the-backup-agent-that-would-not-install-on-cpanel-tmpdir-noexec-and-a-folder-nobody-checks-4kdm</guid>
      <description>&lt;p&gt;&lt;em&gt;A backup war story about installing a Veeam management agent on a cPanel server — the temporary folder almost nobody checks — and the four-line install I now run on every cPanel box.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The customer had signed for cloud backup the week before. One production cPanel server, a few hundred sites, mail on the same box.&lt;/p&gt;

&lt;p&gt;“It’s a five-minute job,” someone said on the call. “Download the agent, run the script as root, done.”&lt;/p&gt;

&lt;p&gt;I ran the script as root.&lt;/p&gt;

&lt;p&gt;It stopped on the second line of output.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./getcomputerinfo: Permission denied&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;“You’re root,” came the reply. “How can root get Permission denied?”&lt;/p&gt;

&lt;p&gt;That is the question this article answers. Root was not the problem. The folder the script unpacked itself into was.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Trap — Root Is Not Enough When the Folder Says No
&lt;/h2&gt;

&lt;p&gt;That’s the trap. “Permission denied” as root does not look like a folder problem. It looks like a broken package, a bad download, or a SELinux story. It hides in plain sight in two mount options and one environment variable.&lt;/p&gt;

&lt;p&gt;Here’s the part that trips people up: I fixed the first error, the package installed, and the agent still did not work. The second failure was quieter and took longer to find than the first. Both had the same cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Happens When the Installer Runs
&lt;/h2&gt;

&lt;p&gt;The management agent comes from the service-provider console as a self-extracting &lt;code&gt;.sh&lt;/code&gt; file. It is &lt;strong&gt;not&lt;/strong&gt; a generic package: the company identity is baked in, so each customer gets their own download. When you run it, the flow is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;installer.sh → mktemp -t → $TMPDIR (or /tmp) → unpack helpers → run helpers → install package → configurator writes config&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Two things matter in that flow.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;mktemp -t&lt;/code&gt; uses &lt;code&gt;$TMPDIR&lt;/code&gt;.&lt;/strong&gt; If the variable is empty, it uses &lt;code&gt;/tmp&lt;/code&gt;. Whatever folder that is, the installer unpacks small binaries there and runs them from there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The configurator does not run as root.&lt;/strong&gt; After the package is installed, a step runs as a dedicated service user (&lt;code&gt;veeam-usr-vspc-agent&lt;/code&gt;) and reads a file from that same temporary folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the temporary folder must allow two things: executing binaries, and being read by a non-root user. On a cPanel server, the two obvious choices each break one of them.&lt;/p&gt;

&lt;p&gt;This is common on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cPanel and WHM servers, where &lt;code&gt;/tmp&lt;/code&gt; is mounted &lt;code&gt;noexec&lt;/code&gt; as a hardening default.&lt;/li&gt;
&lt;li&gt;Any server hardened to a CIS-style baseline, where &lt;code&gt;/tmp&lt;/code&gt; and &lt;code&gt;/var/tmp&lt;/code&gt; carry &lt;code&gt;noexec,nosuid&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Shell sessions that set &lt;code&gt;TMPDIR&lt;/code&gt; to a private folder under &lt;code&gt;/root&lt;/code&gt; to work around the first problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Failure One — /tmp Is noexec
&lt;/h2&gt;

&lt;p&gt;On a cPanel server, &lt;code&gt;/tmp&lt;/code&gt; is a separate mount with &lt;code&gt;noexec&lt;/code&gt;. That is good hardening — it stops a lot of web-shell droppers from running what they write — and it is exactly what the installer trips on. The script unpacks &lt;code&gt;getcomputerinfo&lt;/code&gt; into &lt;code&gt;/tmp&lt;/code&gt;, tries to run it, and the kernel refuses. Root does not override &lt;code&gt;noexec&lt;/code&gt;. The mount option wins.&lt;/p&gt;

&lt;p&gt;Hence: &lt;code&gt;./getcomputerinfo: Permission denied&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The usual fix you find online is “set TMPDIR to a folder that allows exec”. So I did, and that is where the second failure came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure Two — TMPDIR Under /root Installs but Never Configures
&lt;/h2&gt;

&lt;p&gt;The shell I was using had &lt;code&gt;TMPDIR&lt;/code&gt; pointed at a folder under &lt;code&gt;/root&lt;/code&gt;. That folder allows exec, so the first error went away. The package installed. It looked like success.&lt;/p&gt;

&lt;p&gt;It was not. &lt;code&gt;/root&lt;/code&gt; is private to root. The configurator step runs as &lt;code&gt;veeam-usr-vspc-agent&lt;/code&gt;, which cannot read anything under &lt;code&gt;/root&lt;/code&gt;. The symptoms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;auth_config.json: Permission denied&lt;/code&gt; in the installer output, easy to miss in the scroll.&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;/etc/veeamma/config.cfg&lt;/code&gt; on disk.&lt;/li&gt;
&lt;li&gt;The service shows &lt;code&gt;activating (auto-restart)&lt;/code&gt; and restarts every minute.&lt;/li&gt;
&lt;li&gt;The log says “Load config failed” each time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The package being installed is not the agent being configured.&lt;/strong&gt; That one line is worth remembering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Nobody Sees It in Testing
&lt;/h2&gt;

&lt;p&gt;Most people test the agent on a clean lab VM. A fresh Ubuntu or RHEL install has &lt;code&gt;/tmp&lt;/code&gt; on the root filesystem with exec allowed, and &lt;code&gt;TMPDIR&lt;/code&gt; empty. The script works first time. The problem only appears on the server that matters — the hardened production box — and it appears as a permissions error, so the first guess is always “run it with sudo” or “the download is corrupt”.&lt;/p&gt;

&lt;p&gt;There is a second reason. Many guides solve failure one and stop. They never reach failure two, because the install “succeeded”.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix This
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Look before you change anything (read-only).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check how &lt;code&gt;/tmp&lt;/code&gt; is mounted.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;findmnt -no OPTIONS /tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the output contains &lt;code&gt;noexec&lt;/code&gt;, the default temporary folder cannot run the installer’s helpers. Then check what your shell will use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$TMPDIR"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Empty means &lt;code&gt;/tmp&lt;/code&gt;. A path under &lt;code&gt;/root&lt;/code&gt; means failure two is waiting for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Create a neutral temporary folder under /opt (changes state).&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir -m 755 /opt/veeamtmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;/opt&lt;/code&gt; sits on a filesystem that allows exec, and mode 755 lets the service user read it. That covers both conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Run the installer from there, with TMPDIR set (changes state).&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /opt/veeamtmp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nv"&gt;TMPDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/veeamtmp bash &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;package&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Put the company-specific package in that folder first. Setting &lt;code&gt;TMPDIR&lt;/code&gt; on the same line means it applies to this one run and nothing else on the server changes.&lt;/p&gt;

&lt;p&gt;If the installer says the same version is already installed — which it will, if failure two happened before — remove the half-configured package first, then run Step 3 again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt-get purge -y veeamma
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Verify. This step is where most tutorials stop and where mine starts.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl status veeammaservice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want &lt;code&gt;active (running)&lt;/code&gt;. If you see &lt;code&gt;activating (auto-restart)&lt;/code&gt;, the configurator did not finish — go back to Step 1 and check the folder again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;veeamconsoleconfig -s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want the status Connected, and the connection account showing the customer’s company. If it shows a different company, you used the wrong package — the identity is in the file, not in a setting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Check that nothing else was removed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here’s the part that surprised me. Re-running a broken install script more than once can also remove the backup agent packages that were already on the box.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dpkg -l &lt;span class="o"&gt;|&lt;/span&gt; grep veeam
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the backup agent packages are missing, push the backup agent again from the service-provider console. Do not assume it is still there because it was there an hour ago.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Clean up.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rm -rf /opt/veeamtmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The folder was only for the install. Leaving an exec-allowed temporary folder lying around undoes part of the hardening you just respected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Better Still — Install Once, Push the Rest
&lt;/h2&gt;

&lt;p&gt;The management agent has to go on by hand, once. After it reports Connected, I push the backup agent from the service-provider console instead of installing it by hand. The push travels over the existing cloud gateway connection, so it skips the whole manual chain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;no repository package to download and no &lt;code&gt;NO_PUBKEY&lt;/code&gt; key import,&lt;/li&gt;
&lt;li&gt;no &lt;code&gt;TMPDIR&lt;/code&gt; workaround for a second time,&lt;/li&gt;
&lt;li&gt;no &lt;code&gt;needrestart&lt;/code&gt; prompt asking to restart Apache on a live production site.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last one matters on cPanel. A prompt that restarts the web server in the middle of the business day is not a backup install. It is an outage with extra steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist I Run After Every Linux Agent Install
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Temporary folder&lt;/strong&gt; — &lt;code&gt;findmnt -no OPTIONS /tmp&lt;/code&gt; before you start. If it says &lt;code&gt;noexec&lt;/code&gt;, use the &lt;code&gt;/opt&lt;/code&gt; folder from day one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service state&lt;/strong&gt; — &lt;code&gt;systemctl status veeammaservice&lt;/code&gt; must say &lt;code&gt;active (running)&lt;/code&gt;, not &lt;code&gt;activating&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identity&lt;/strong&gt; — &lt;code&gt;veeamconsoleconfig -s&lt;/code&gt; must show Connected and the right company.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Packages&lt;/strong&gt; — &lt;code&gt;dpkg -l | grep veeam&lt;/code&gt; must still list the backup agent after any re-run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version match&lt;/strong&gt; — the agent must not be newer than the backup server. A newer agent is rejected with “A newer version of the agent is not supported by the backup infrastructure”, and the console blocks the push.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Licence edition&lt;/strong&gt; — the agent needs a Server edition licence. With the free edition, the cloud destination simply does not appear in the job wizard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provider registration&lt;/strong&gt; — register the cloud provider from the command line with &lt;code&gt;veeamconfig cloud add&lt;/code&gt;. The wizard’s “Veeam Backup &amp;amp; Replication” option is a direct path on port 10006 and fails against a cloud gateway with “connection reset by peer”.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Plain takeaway: every one of these fails quietly. None of them stop the job wizard from opening.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;Before any agent goes on a hardened server, I ask one question:&lt;/p&gt;

&lt;p&gt;“Is /tmp on this server mounted noexec, and do you want it to stay that way?”&lt;/p&gt;

&lt;p&gt;If the answer is yes, they’re in good shape — we keep the hardening and install from &lt;code&gt;/opt&lt;/code&gt;. If the answer is “I don’t know”, we’re not done yet. That is a server nobody has looked at closely, and the backup install will be the first thing to find out.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why does the Veeam agent installer say Permission denied when I run it as root?
&lt;/h3&gt;

&lt;p&gt;On cPanel servers /tmp is mounted noexec, and root cannot override a mount option. The installer unpacks helper binaries into the temporary folder and runs them from there, so the kernel refuses with “./getcomputerinfo: Permission denied”. Run the installer with TMPDIR pointed at a folder that allows exec, such as /opt/veeamtmp.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does veeammaservice keep restarting with “Load config failed”?
&lt;/h3&gt;

&lt;p&gt;The package installed but the configuration step failed. This happens when TMPDIR points to a folder under /root: the configurator runs as the service user veeam-usr-vspc-agent, which cannot read /root, so /etc/veeamma/config.cfg is never written. Purge veeamma and reinstall with TMPDIR=/opt/veeamtmp in a folder with mode 755.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I remove noexec from /tmp to install the agent?
&lt;/h3&gt;

&lt;p&gt;No. noexec on /tmp is useful hardening on a web server. Set TMPDIR for the one install command only, use a folder under /opt, and delete that folder when the agent reports Connected.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I check that the Veeam management agent is really working?
&lt;/h3&gt;

&lt;p&gt;Run systemctl status veeammaservice and look for active (running), not activating (auto-restart). Then run veeamconsoleconfig -s and confirm the status is Connected and the connection account is the right company. Also run dpkg -l | grep veeam to make sure the backup agent packages are still installed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I install the Veeam backup agent by hand on a cPanel server?
&lt;/h3&gt;

&lt;p&gt;Install the management agent by hand once, then push the backup agent from the service-provider console. The push uses the existing gateway connection and avoids the repository key import, the TMPDIR workaround and the needrestart prompt that can restart Apache on a live server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-veeam-agent-cpanel-tmpdir-noexec-permission-denied.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/veeam-agent-cpanel-tmpdir-noexec-permission-denied/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>backup</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>DNS Health Says DKIM Is Green, but Nothing Is Signed — DKIM Signing Is a Separate Switch</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Fri, 20 Nov 2026 09:12:11 +0000</pubDate>
      <link>https://dev.to/daanial/dns-health-says-dkim-is-green-but-nothing-is-signed-dkim-signing-is-a-separate-switch-4bmj</link>
      <guid>https://dev.to/daanial/dns-health-says-dkim-is-green-but-nothing-is-signed-dkim-signing-is-a-separate-switch-4bmj</guid>
      <description>&lt;p&gt;&lt;em&gt;A field note about a self-hosted mail server where every DNS check was green and every outgoing message was unsigned — the difference between a published DKIM record and a signed message — and the one test I now run before I call email authentication done.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The admin panel looked perfect.&lt;/p&gt;

&lt;p&gt;SPF: green. DKIM: green. DMARC: green.&lt;/p&gt;

&lt;p&gt;The server was a self-hosted grommunio box on Ubuntu 24.04. Postfix in front, rspamd as the filter, a fresh domain with its records just published. The DKIM key had been generated in the admin interface, the TXT record added in DNS as &lt;code&gt;dkim._domainkey.example.com&lt;/code&gt;, and the DNS Health page had turned it green within minutes.&lt;/p&gt;

&lt;p&gt;“Email authentication is done,” was the natural conclusion.&lt;/p&gt;

&lt;p&gt;I asked one question instead: “Has anyone looked at the headers of a message this server actually sent?”&lt;/p&gt;

&lt;p&gt;Nobody had.&lt;/p&gt;

&lt;p&gt;So I sent one test message to a Gmail mailbox and one to a corporate mailbox behind a commercial spam filter, and opened the headers of both.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight email"&gt;&lt;code&gt;&lt;span class="na"&gt;Authentication-Results: ... dkim&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;none&lt;/span&gt; &lt;span class="n"&gt;header&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;dkim=none&lt;/code&gt;. Not &lt;code&gt;fail&lt;/code&gt;. Not &lt;code&gt;pass&lt;/code&gt;. None. The receivers had found no DKIM signature on the message at all.&lt;/p&gt;

&lt;p&gt;And the corporate filter had scored the message. One rule stood out: &lt;code&gt;DMARC_FAIL_QUAR=6&lt;/code&gt;. The total was 6.524. The quarantine threshold on that filter was 6.6.&lt;/p&gt;

&lt;p&gt;The message missed the quarantine folder by 0.076 points.&lt;/p&gt;

&lt;p&gt;That’s the trap. &lt;strong&gt;A green DKIM check in DNS proves the record is published. It does not prove a single message was signed.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What DKIM Actually Needs — Two Halves
&lt;/h2&gt;

&lt;p&gt;DKIM has two halves, and they live in different places.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The public half is a TXT record in DNS. The private half is a key on the mail server that something must use to sign every outgoing message.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The flow, when it works:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Mail client → Postfix → milter (rspamd) → reads private key → adds DKIM-Signature header → internet → receiver looks up dkim._domainkey.example.com → verifies → dkim=pass&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A DNS health check only tests the end of that chain: is the record there, is it valid, does it match the local key. It never sends a message. It cannot see whether the middle of the chain — the signer — is doing anything.&lt;/p&gt;

&lt;p&gt;So you can have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A perfect public record and no signer configured at all.&lt;/li&gt;
&lt;li&gt;A signer configured but looking for the key in the wrong place.&lt;/li&gt;
&lt;li&gt;A signer looking in the right place but not allowed to read the file.&lt;/li&gt;
&lt;li&gt;A signer that works, but only for mail that passes through it — and some mail never does.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On this server, three of those four were true at the same time.&lt;/p&gt;

&lt;p&gt;Where this setup is common:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Self-hosted mail stacks where the admin UI generates the DKIM key but a separate filter (rspamd, OpenDKIM) does the signing.&lt;/li&gt;
&lt;li&gt;Servers built from a “publish these records” checklist, where the checklist ends at DNS.&lt;/li&gt;
&lt;li&gt;Any server where webmail submits mail locally instead of over SMTP.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why the Usual Check Misses It
&lt;/h2&gt;

&lt;p&gt;Three reasons, and they stack.&lt;/p&gt;

&lt;p&gt;First, the dashboard is honest but narrow. It checks what it can check — DNS — and shows green. Nobody reads “DKIM: green” as “the record exists”; everyone reads it as “DKIM works”.&lt;/p&gt;

&lt;p&gt;Second, unsigned mail is usually still delivered. With SPF passing and a policy that is not yet at reject, most messages reach the inbox. Nothing bounces. Nobody complains. The signal is a score, not an error.&lt;/p&gt;

&lt;p&gt;Third, published-but-unsigned is worse than no DKIM at all. A DMARC record tells the world “judge my mail by SPF and DKIM”. With no signature, every message leans on SPF alone, and the first forward or mailing list breaks SPF alignment too. Then DMARC fails outright, and receivers do what the policy asks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The only proof of signing is a received message.&lt;/strong&gt; Everything else is a statement about DNS.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix This
&lt;/h2&gt;

&lt;p&gt;Everything up to Step 4 is read-only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Read the headers of a real received message.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Send a test message from the server to a mailbox you control at a large provider. In Gmail: open the message › three dots › Show original. Look at the &lt;code&gt;Authentication-Results&lt;/code&gt; line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dkim=none header.d=
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the failure: no signature was found. What success looks like is &lt;code&gt;dkim=pass&lt;/code&gt; with your domain in &lt;code&gt;header.d=&lt;/code&gt; and your selector in &lt;code&gt;header.s=&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Send one from webmail and one from a desktop client over SMTP. On this server, the difference between those two paths turned out to matter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Check whether rspamd has any signing config at all.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls /etc/rspamd/local.d/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On this server the folder held only antivirus files and a controller file. There was no &lt;code&gt;dkim_signing.conf&lt;/code&gt;. rspamd’s DKIM module was loaded with its defaults, and the default key path is not where grommunio writes the key. grommunio’s admin API writes each domain’s key to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/lib/grommunio-admin-api/&amp;lt;domain&amp;gt;.dkim.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;rspamd never looked there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Check whether rspamd can even read the key.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls -ld /var/lib/grommunio-admin-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The directory was &lt;code&gt;0750&lt;/code&gt;, owned by &lt;code&gt;grommunio:gromox&lt;/code&gt;. The rspamd service user, &lt;code&gt;_rspamd&lt;/code&gt;, is in neither group. Even with the right path, rspamd could not enter the directory, so it could not open the key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Check which mail actually passes through rspamd.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;postconf&lt;/span&gt; &lt;span class="n"&gt;smtpd_milters&lt;/span&gt; &lt;span class="n"&gt;non_smtpd_milters&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;smtpd_milters&lt;/code&gt; was set to rspamd. &lt;code&gt;non_smtpd_milters&lt;/code&gt; was empty.&lt;/p&gt;

&lt;p&gt;Here’s the part that trips people up. &lt;code&gt;smtpd_milters&lt;/code&gt; only covers mail that arrives over SMTP. Webmail on this server submits through Postfix’s local &lt;code&gt;pickup&lt;/code&gt; service — the &lt;code&gt;Received:&lt;/code&gt; header shows it coming from a local user id, not from a network connection. Mail that enters through &lt;code&gt;pickup&lt;/code&gt; is “non-SMTP” mail, and with &lt;code&gt;non_smtpd_milters&lt;/code&gt; empty it never reached rspamd. No scan, no signature.&lt;/p&gt;

&lt;p&gt;Three faults. All three had to be fixed before a single message would be signed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5 (changes state): Point rspamd at the key.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create &lt;code&gt;/etc/rspamd/local.d/dkim_signing.conf&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="na"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"/var/lib/grommunio-admin-api/$domain.dkim.key"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="na"&gt;selector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"dkim"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="na"&gt;allow_username_mismatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="na"&gt;use_domain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"header"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="na"&gt;sign_authenticated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="na"&gt;sign_local&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;$domain&lt;/code&gt; is filled in by rspamd per message, so one file covers every domain on the server. The selector must match the name of the DNS record — &lt;code&gt;dkim&lt;/code&gt; here, because the record is &lt;code&gt;dkim._domainkey&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6 (changes state): Give rspamd read access with an ACL, not a group.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt install -y acl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;setfacl -m u:_rspamd:rx /var/lib/grommunio-admin-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;setfacl -d -m u:_rspamd:r /var/lib/grommunio-admin-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;setfacl -m u:_rspamd:r /var/lib/grommunio-admin-api/*.dkim.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second command is the important one. &lt;code&gt;-d&lt;/code&gt; sets a &lt;strong&gt;default&lt;/strong&gt; ACL on the directory, so every key file created there later — the next domain someone adds in the admin panel — is readable by rspamd from the moment it is written. Adding &lt;code&gt;_rspamd&lt;/code&gt; to a group or running a one-off &lt;code&gt;chmod&lt;/code&gt; fixes today’s domain and silently breaks the next one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7 (changes state): Send locally submitted mail through rspamd too.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;postconf -e &lt;span class="s1"&gt;'non_smtpd_milters = inet:localhost:11332'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the same value your &lt;code&gt;smtpd_milters&lt;/code&gt; already has. Then restart both services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl restart rspamd postfix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 8: Verify — with a received message, not a dashboard.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts.&lt;/p&gt;

&lt;p&gt;Send the same two test messages again: one from webmail, one over SMTP. Open the headers.&lt;/p&gt;

&lt;p&gt;What success looked like on this server, at Gmail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dkim=pass header.s=dkim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And at the corporate filter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dkim=pass (2048-bit key) header.d=example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with &lt;code&gt;DKIM_VALID_AU&lt;/code&gt; and &lt;code&gt;DKIM_VALID_EF&lt;/code&gt; in the rule list. The spam score went from 6.524 to −2.096. Same server, same content, same IP. The only change was a signature.&lt;/p&gt;

&lt;p&gt;What a failure looks like: still &lt;code&gt;dkim=none&lt;/code&gt; means the message is not reaching rspamd or rspamd has no config for that domain. &lt;code&gt;dkim=fail&lt;/code&gt; means a signature was added but does not verify — usually a selector that does not match the DNS record, or a record that was pasted with quotes, brackets or line breaks still in it. The record value must be one unbroken string.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two More Faults the DKIM Work Exposed
&lt;/h2&gt;

&lt;p&gt;Once you start reading what rspamd actually loaded instead of what the config files say, other things fall out. Two did here.&lt;/p&gt;

&lt;p&gt;The antivirus file had been written with its own &lt;code&gt;antivirus { }&lt;/code&gt; wrapper. Files in &lt;code&gt;local.d&lt;/code&gt; are merged &lt;strong&gt;into&lt;/strong&gt; the module section, so the wrapper created a rule inside a rule. rspamd logged &lt;code&gt;cannot add rule&lt;/code&gt; and moved on. ClamAV was installed and running — and had never scanned a single message. The check that shows what rspamd really loaded:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rspamadm configdump antivirus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And &lt;code&gt;clamd.conf&lt;/code&gt; had no &lt;code&gt;TCPSocket&lt;/code&gt; line while rspamd was pointed at &lt;code&gt;127.0.0.1:3310&lt;/code&gt;. Installed, running and integrated are three different claims.&lt;/p&gt;

&lt;p&gt;The second: outbound mail over IPv6 failed SPF. The SPF record listed only the IPv4 address, and the IPv6 address carried the provider’s generic PTR. Until a correct reverse record and an &lt;code&gt;ip6:&lt;/code&gt; term exist, the simple fix is to send over IPv4 only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;postconf -e &lt;span class="s1"&gt;'inet_protocols = ipv4'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Neither of these would have shown up on a DNS health page either.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist I Run Now
&lt;/h2&gt;

&lt;p&gt;Before I call email authentication done on any server:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Does a received message show &lt;code&gt;dkim=pass&lt;/code&gt; with my domain? Gmail › Show original › &lt;code&gt;Authentication-Results&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Is there a signing config, and does its path match where the key really is? &lt;code&gt;ls /etc/rspamd/local.d/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Can the signer read the key? &lt;code&gt;ls -ld&lt;/code&gt; on the key directory, then &lt;code&gt;getfacl&lt;/code&gt; on it&lt;/li&gt;
&lt;li&gt;Does locally submitted mail pass the filter? &lt;code&gt;postconf smtpd_milters non_smtpd_milters&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Does a webmail message pass, not just an SMTP one? Test both paths&lt;/li&gt;
&lt;li&gt;Is the antivirus rule actually loaded? &lt;code&gt;rspamadm configdump antivirus&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Does mail over IPv6 pass SPF? If not, &lt;code&gt;inet_protocols = ipv4&lt;/code&gt; until it does&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Plain takeaway: &lt;strong&gt;a green record is a promise. A signed message is the proof.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;Whenever someone tells me their mail authentication is done, I ask one question:&lt;/p&gt;

&lt;p&gt;“Can you show me the headers of a message your server sent today?”&lt;/p&gt;

&lt;p&gt;If the answer is a header with &lt;code&gt;dkim=pass&lt;/code&gt; and their own domain in it, they’re in good shape. If the answer is “the dashboard is all green”, we’re not done yet — because the dashboard never sent a message.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why does my DKIM check show green but emails show dkim=none?
&lt;/h3&gt;

&lt;p&gt;A DNS check only verifies that the public DKIM record is published and valid. It never sends a message. dkim=none means the receiver found no signature at all, so the signer on your server is either not configured, cannot read the private key, or never sees the message.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between dkim=none and dkim=fail?
&lt;/h3&gt;

&lt;p&gt;dkim=none means the message carried no DKIM signature. dkim=fail means a signature was present but did not verify, usually because the selector does not match the DNS record or the record value was pasted with quotes, brackets or line breaks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why are webmail messages unsigned when SMTP messages are signed?
&lt;/h3&gt;

&lt;p&gt;Many webmail systems submit mail locally through Postfix’s pickup service instead of over SMTP. Postfix only sends that mail to milters listed in non_smtpd_milters. If only smtpd_milters is set, locally submitted mail is never scanned or signed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where does grommunio store the DKIM private key?
&lt;/h3&gt;

&lt;p&gt;The grommunio admin API writes each domain’s key to /var/lib/grommunio-admin-api/.dkim.key. That is not rspamd’s default path, so rspamd needs a dkim_signing.conf in /etc/rspamd/local.d/ that points there, plus read access to the directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why use an ACL instead of adding rspamd to a group?
&lt;/h3&gt;

&lt;p&gt;A default ACL set with setfacl -d applies to every new file created in the directory. Each new domain added later gets a new key file, and the default ACL makes it readable by rspamd at once. A group change or chmod on today’s file does not cover the next one.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I prove DKIM signing works?
&lt;/h3&gt;

&lt;p&gt;Send a message from the server to a mailbox at a large provider and read the Authentication-Results header. You want dkim=pass with your own domain in header.d. Test both webmail and SMTP submission, because they can take different paths through the server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-dkim-record-green-mail-not-signed-rspamd.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/dkim-record-green-mail-not-signed-rspamd/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>email</category>
      <category>devops</category>
      <category>linux</category>
      <category>security</category>
    </item>
    <item>
      <title>CCTV Retention Maths — Eighty Cameras, One Year, and the Storage Curve Customers Never Expect</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Fri, 20 Nov 2026 09:00:15 +0000</pubDate>
      <link>https://dev.to/daanial/cctv-retention-maths-eighty-cameras-one-year-and-the-storage-curve-customers-never-expect-40o7</link>
      <guid>https://dev.to/daanial/cctv-retention-maths-eighty-cameras-one-year-and-the-storage-curve-customers-never-expect-40o7</guid>
      <description>&lt;p&gt;&lt;em&gt;A presales war story about sizing central storage for CCTV — the daily write rate almost nobody calculates — and the three-line method I now run before I quote a single terabyte.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The request came in one sentence.&lt;/p&gt;

&lt;p&gt;“We want all our cameras recorded in the cloud. One year.”&lt;/p&gt;

&lt;p&gt;Five sites. About eighty cameras. A mix of DVRs at the smaller offices and one NVR at the head office. No video management software in the middle — each recorder would write straight to central storage as a network disk.&lt;/p&gt;

&lt;p&gt;“How many terabytes is that?” they asked.&lt;/p&gt;

&lt;p&gt;The tempting answer is a rule of thumb. So many cameras, so many gigabytes per camera per day, multiply by 365, add some headroom, done.&lt;/p&gt;

&lt;p&gt;I asked one question instead: “For each site, how big is the recorder’s disk, and how many days does it keep before it overwrites?”&lt;/p&gt;

&lt;p&gt;They had to go and check. Nobody had ever looked at the cameras that way.&lt;/p&gt;

&lt;p&gt;That’s the trap. &lt;strong&gt;A camera count is not a storage number.&lt;/strong&gt; The real number hides in plain sight — in two figures every recorder already shows on its own status page.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Are Actually Sizing — a Daily Write Rate
&lt;/h2&gt;

&lt;p&gt;Every CCTV recorder is a loop. It writes video until the disk is full, then overwrites the oldest day. So the disk size and the retention days together tell you exactly how much the site writes per day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Daily write rate = recorder disk size ÷ days of retention.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That one line replaces every rule of thumb. It already includes the real codec, the real resolution, the real frame rate, motion versus continuous recording, and the hours the cameras are busy. You are not estimating the cameras. You are reading what they actually did.&lt;/p&gt;

&lt;p&gt;The flow, for a design with no video management server:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Camera → Site DVR/NVR → Site-to-site link → Central storage (network disk)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here is what the five sites reported, with the daily rate worked out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Site A (NVR, 16 cameras):&lt;/strong&gt; 6 TB holds 15 days → 400 GB/day&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Site B (DVR, 5 cameras):&lt;/strong&gt; 2 TB holds 45 days → about 44 GB/day&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Site C (DVR, 5 cameras):&lt;/strong&gt; 2 TB holds 45 days → about 44 GB/day&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Site D (DVR, 32 cameras):&lt;/strong&gt; 4 TB holds 30 days → about 133 GB/day&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Site E (DVR, 24 cameras):&lt;/strong&gt; 2 TB holds 30 days → about 67 GB/day&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Total: about &lt;strong&gt;690 GB per day&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Where this pattern is common:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-branch retailers and distributors with a recorder at every shop or warehouse&lt;/li&gt;
&lt;li&gt;Offices that grew one site at a time, each with whatever recorder the local installer liked&lt;/li&gt;
&lt;li&gt;Any estate where the head office bought the “good” cameras and the branches bought the cheap ones&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why the Camera Count Misleads — One Site Wrote 57% of the Data
&lt;/h2&gt;

&lt;p&gt;Look at the cameras per site again. Site D has 32 cameras. Site A has 16.&lt;/p&gt;

&lt;p&gt;Now look at the daily rate. Site A writes three times as much as Site D, with half the cameras.&lt;/p&gt;

&lt;p&gt;Per camera, the bitrates were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Site A (NVR): about &lt;strong&gt;2.3 Mbps per camera&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;The DVR sites: between &lt;strong&gt;0.26 and 0.8 Mbps per camera&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same customer, same kind of building, a three- to nine-fold difference per camera. Over a year, Site A alone is about 146 TB of a roughly 250 TB total — &lt;strong&gt;one site with 20% of the cameras writes 57% of the data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A per-camera rule of thumb would have spread that evenly across eighty cameras. It would have been wrong for every single site, and the errors would not cancel out. Here’s why: the expensive site is the one with the best cameras, and that is exactly the site the customer cares most about.&lt;/p&gt;

&lt;p&gt;This is also where the first question for the next meeting comes from. A 2.3 Mbps stream per camera usually means higher resolution, a higher frame rate, or an older codec. If Site A can move to a more efficient codec, the whole design changes. &lt;strong&gt;The biggest saving in this quote sits in one recorder’s settings, not in the storage price.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Storage Curve Nobody Expects
&lt;/h2&gt;

&lt;p&gt;The second surprise was the shape of the bill.&lt;/p&gt;

&lt;p&gt;A one-year retention store does not start full. On day one it holds one day of video. It fills in a straight line for twelve months, and only then does it level off — because from month 13 the oldest month is deleted as the newest arrives.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Month 1: ~21 TB → Month 6: ~124 TB → Month 12: ~248 TB → flat after&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;At 690 GB a day, a 30-day month adds about 20.7 TB. Twelve of those make about 248 TB. If you count 365 days instead, you get about 251 TB. Our first quote said 256 TB; the final design said 248 TB, built as a monthly step-up. Both are honest. The difference is only how you count a month — so write down which one you used.&lt;/p&gt;

&lt;p&gt;What changed the conversation was the billing shape, not the total. If the customer pays for 250 TB from the first day, they pay for eleven months of empty disk. So the final proposal billed storage as a step-up: month 1 covers month 1’s data, month 12 covers a full year, flat after that. The first month came to about a quarter of the steady-state month.&lt;/p&gt;

&lt;p&gt;The customer had expected one flat number. The curve was the thing they remembered.&lt;/p&gt;

&lt;p&gt;One spreadsheet lesson from the same deal. The first cost model for this deal had a cumulative row, and it added the fixed monthly charges — the link and the server — again every month, on top of the month before. Storage grows. &lt;strong&gt;Fixed charges do not grow.&lt;/strong&gt; Only the variable line should step up.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Size This
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Collect two numbers per site — disk size and retention days.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ask for them from each recorder’s status page, not from memory. If a recorder has more than one disk, use the total. If it shows “days of recordings available”, use that number, not the policy setting.&lt;/p&gt;

&lt;p&gt;A quick check per site:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"scale=1; 6000 / 15"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; bc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is 6,000 GB ÷ 15 days = 400.0 GB per day for Site A.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Turn each daily rate into a bitrate.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the number the network team needs, and it exposes the outlier site at once.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"scale=2; 400 * 8 * 1000 / 86400"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; bc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;400 GB a day is about 37 Mbps, sustained. Divide by the cameras on that site (16) and you get about 2.3 Mbps per camera. Do this for every site. If one site is several times the others per camera, that is your first conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Measure one real camera when a site looks odd.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you can reach a camera’s RTSP stream, record one minute and weigh it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ffmpeg -rtsp_transport tcp -i rtsp://&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;CAMERA_IP&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;STREAM_PATH&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; -t 60 -c copy sample.mp4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ffprobe -v error -select_streams v:0 -show_entries &lt;span class="nv"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;codec_name,width,height,avg_frame_rate sample.mp4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;File size × 8 ÷ 60 gives the bitrate in bits per second. The second command shows the codec, resolution and frame rate. A busy daytime minute and a quiet night minute will differ — that is normal, and it is exactly why the disk-and-days method beats a one-minute sample for the total.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Add the sites and size the year.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"scale=1; 690 * 365 / 1000"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; bc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;About 251.8 TB at 690 GB a day. This is raw recorded data. Any protection overhead on the storage side — replicas, erasure coding — comes on top, and so does any free-space margin your platform needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Size the link from the same number.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"scale=1; 690 * 8 * 1000 / 86400"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; bc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;About 63.9 Mbps sustained, all sites together. We put a 100 Mbps link at the data centre. Remember this is an average across the day: recorders on motion detection write in bursts, and every site needs its own uplink sized for its own share, not just the central link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Verify before you sign.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This step is where most sizing sheets stop and where mine starts. Three checks were still open when this proposal went out, and I wrote them into it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The codec at the heavy site.&lt;/strong&gt; It decides more storage than any discount.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The recorder’s network-disk size limit.&lt;/strong&gt; Many DVRs and NVRs cap the size of a network disk they can mount. If the cap is smaller than one site’s share, that site needs several volumes or a different design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free capacity at the data centre.&lt;/strong&gt; 250 TB of HDD by month 12 has to exist by month 12.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If one of these comes back wrong, the quote is wrong. That is not a failure of the method. &lt;strong&gt;It is the verification.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Sizing Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Daily rate per site&lt;/strong&gt; — disk size ÷ retention days, from the recorder’s own status page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bitrate per camera per site&lt;/strong&gt; — daily rate × 8 ÷ 86,400 ÷ cameras; flag any site several times higher.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One measured sample&lt;/strong&gt; — &lt;code&gt;ffprobe&lt;/code&gt; on a one-minute recording from the odd site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Year total&lt;/strong&gt; — daily total × 365, and say whether a month is 30 days or a calendar month.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Link&lt;/strong&gt; — sustained Mbps from the same daily total, plus each site’s own uplink.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Growth curve&lt;/strong&gt; — linear for the retention period, flat after; bill it as a step-up if the platform allows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorder limits&lt;/strong&gt; — maximum network-disk size per DVR/NVR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spreadsheet sanity&lt;/strong&gt; — only variable lines grow; fixed charges are counted once per month.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;Before any CCTV storage quote, I ask one question:&lt;/p&gt;

&lt;p&gt;“For every recorder you own, what is the disk size and how many days does it keep?”&lt;/p&gt;

&lt;p&gt;If they can answer it per site, we can size it in ten minutes and the number will hold. If the answer is “about eighty cameras”, we’re not done yet.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How much storage do I need for CCTV with one year of retention?
&lt;/h3&gt;

&lt;p&gt;Take each recorder’s disk size and divide it by the number of days it keeps. That gives the daily write rate per site. Add the sites and multiply by 365. In this case five sites wrote about 690 GB a day, which is roughly 250 TB for one year, before any storage protection overhead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is sizing by camera count wrong?
&lt;/h3&gt;

&lt;p&gt;Bitrate per camera varies a lot with codec, resolution, frame rate and recording mode. In this case one site ran about 2.3 Mbps per camera while the others ran 0.26 to 0.8 Mbps. That site had 20% of the cameras and wrote 57% of the data.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much bandwidth does central CCTV recording need?
&lt;/h3&gt;

&lt;p&gt;Convert the daily total to a bitrate: GB per day × 8 × 1,000 ÷ 86,400 gives Mbps. 690 GB a day is about 64 Mbps sustained. That is an average, so leave headroom for bursts, and size each site’s own uplink for that site’s share.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does a one-year CCTV store need all its capacity on day one?
&lt;/h3&gt;

&lt;p&gt;No. A retention store fills in a straight line until the retention period is reached, then stays flat as old video is deleted. Month 1 needs about one-twelfth of the year’s capacity, which is why a step-up billing plan fits CCTV better than one flat price.&lt;/p&gt;

&lt;h3&gt;
  
  
  What should I check before quoting central CCTV storage?
&lt;/h3&gt;

&lt;p&gt;Check the codec at the heaviest site, the maximum network-disk size each DVR or NVR can mount, and that the data centre will have the full year’s capacity free by the end of the year. Any one of these can change the design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-cctv-storage-sizing-retention-calculation.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/cctv-storage-sizing-retention-calculation/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>storage</category>
      <category>architecture</category>
      <category>cloud</category>
      <category>networking</category>
    </item>
    <item>
      <title>UFW Turns On After Every Reboot — It Doesn't. A Stale netfilter-persistent Snapshot Does</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Sat, 14 Nov 2026 12:47:40 +0000</pubDate>
      <link>https://dev.to/daanial/ufw-turns-on-after-every-reboot-it-doesnt-a-stale-netfilter-persistent-snapshot-does-pd5</link>
      <guid>https://dev.to/daanial/ufw-turns-on-after-every-reboot-it-doesnt-a-stale-netfilter-persistent-snapshot-does-pd5</guid>
      <description>&lt;p&gt;&lt;em&gt;A field note about a firewall that “came back” after every reboot even though nobody turned it on — the old snapshot that was really loading, why &lt;code&gt;ufw status&lt;/code&gt; said active, and the two checks I now run before I touch UFW.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The ticket was short and tired.&lt;/p&gt;

&lt;p&gt;“UFW turns itself on after every reboot. We disable it, and next boot it’s back.”&lt;/p&gt;

&lt;p&gt;The server was an Ubuntu VM running cPanel. Web and mail traffic was already filtered upstream, by the platform’s own firewall in front of the VM. The guest firewall was supposed to be off.&lt;/p&gt;

&lt;p&gt;“What do you do when it comes back?”&lt;/p&gt;

&lt;p&gt;“We run &lt;code&gt;ufw disable&lt;/code&gt;. Everything works again.”&lt;/p&gt;

&lt;p&gt;“And then?”&lt;/p&gt;

&lt;p&gt;“We also masked the UFW service so it can’t start. It still comes back.”&lt;/p&gt;

&lt;p&gt;I asked one question.&lt;/p&gt;

&lt;p&gt;“If the service is masked and it still comes back — what makes you sure it’s UFW?”&lt;/p&gt;

&lt;p&gt;Silence. Then: “&lt;code&gt;ufw status&lt;/code&gt; says active.”&lt;/p&gt;

&lt;p&gt;That’s the trap. The thing you see after boot looks like UFW, carries UFW’s chain names, and &lt;code&gt;ufw status&lt;/code&gt; even agrees with you. But UFW is not the program that put it there.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Was Really Loading at Boot
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;netfilter-persistent is a small Ubuntu service that restores a saved iptables rule set at every boot.&lt;/strong&gt; It comes with the &lt;code&gt;iptables-persistent&lt;/code&gt; package. Its job is simple: read &lt;code&gt;/etc/iptables/rules.v4&lt;/code&gt; and &lt;code&gt;rules.v6&lt;/code&gt;, and load them before the network is up.&lt;/p&gt;

&lt;p&gt;It does not care where the rules came from. Whatever was in the kernel when the file was saved is what comes back — forever, until someone saves again or removes the file.&lt;/p&gt;

&lt;p&gt;On this server, the story was in the timestamps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;iptables-persistent&lt;/code&gt; was installed about eighteen months earlier.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc/iptables/rules.v4&lt;/code&gt; and &lt;code&gt;rules.v6&lt;/code&gt; were written &lt;strong&gt;36 seconds&lt;/strong&gt; after the install.&lt;/li&gt;
&lt;li&gt;At that moment, UFW was running.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The installer asks one question: “Save current IPv4 rules?” Someone pressed Yes. That is my theory of how it happened — the timestamps fit it, but no one remembers the click. What is not a theory is what the file contained:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only UFW’s own chains (&lt;code&gt;ufw-user-input&lt;/code&gt;, &lt;code&gt;ufw-before-input&lt;/code&gt; and the rest).&lt;/li&gt;
&lt;li&gt;A default policy of &lt;code&gt;:INPUT DROP&lt;/code&gt; and &lt;code&gt;:FORWARD DROP&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the boot sequence was:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Kernel boots → netfilter-persistent loads the 18-month-old UFW snapshot → INPUT policy is DROP → traffic stops → someone runs ufw disable → chains flushed → traffic flows → next reboot → repeat&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The same snapshot had also been written to &lt;code&gt;/etc/nftables.conf&lt;/code&gt; a few minutes later. &lt;code&gt;nftables.service&lt;/code&gt; tried to load it at every boot too, and failed on syntax errors. That failure was the only reason there were not two copies of the problem.&lt;/p&gt;

&lt;p&gt;Where this shows up most:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu and Debian servers where someone installed &lt;code&gt;iptables-persistent&lt;/code&gt; “just in case” while UFW was enabled.&lt;/li&gt;
&lt;li&gt;Servers handed over between teams, where the guest firewall was later replaced by an upstream or cloud firewall.&lt;/li&gt;
&lt;li&gt;Hosts with cPanel, CSF or Docker, where several tools write rules and nobody owns the whole table.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;ufw disable&lt;/code&gt; “Worked” and Masking Didn’t
&lt;/h2&gt;

&lt;p&gt;Here’s the part that trips people up.&lt;/p&gt;

&lt;p&gt;UFW was never re-enabled. Its own switch lives in &lt;code&gt;/etc/ufw/ufw.conf&lt;/code&gt; as &lt;code&gt;ENABLED=no&lt;/code&gt;, and that line had not changed in almost a year.&lt;/p&gt;

&lt;p&gt;When you run &lt;code&gt;ufw disable&lt;/code&gt; on a UFW that is already disabled, it does not rewrite &lt;code&gt;ufw.conf&lt;/code&gt; — there is nothing to change. But it still flushes the UFW chains from the kernel. That flush removed the snapshot’s rules and reset the policies, so the team saw the server come back and concluded, reasonably, that UFW had been on.&lt;/p&gt;

&lt;p&gt;Masking &lt;code&gt;ufw.service&lt;/code&gt; could never help. UFW was not starting. A different service was loading UFW-shaped rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;ufw status&lt;/code&gt; Said “Active”
&lt;/h2&gt;

&lt;p&gt;This is the part I did not expect, and I checked the source to be sure.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ufw status&lt;/code&gt; does not read &lt;code&gt;ENABLED&lt;/code&gt; from &lt;code&gt;ufw.conf&lt;/code&gt;. In the iptables backend (&lt;code&gt;backend_iptables.py&lt;/code&gt;), it decides “active” by checking whether the chain &lt;code&gt;ufw-user-input&lt;/code&gt; exists in the kernel. If the chain is there, UFW reports itself as active.&lt;/p&gt;

&lt;p&gt;So after every boot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;netfilter-persistent created &lt;code&gt;ufw-user-input&lt;/code&gt; from the snapshot.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ufw status&lt;/code&gt; saw the chain and said &lt;strong&gt;Status: active&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The team saw “active” and blamed UFW.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The status command was telling the truth about the kernel, not about UFW.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Nobody Sees It in Testing
&lt;/h2&gt;

&lt;p&gt;Because nobody reboots a production server to test a firewall. The snapshot was saved once, during a package install, and the server ran for months without a restart. By the time the reboots started, nobody connected “the firewall is back” with a package installed a year and a half earlier.&lt;/p&gt;

&lt;p&gt;And every symptom pointed at UFW: UFW chain names, UFW status output, and a UFW command that made it go away. Every clue was real. The conclusion was wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Fix This
&lt;/h2&gt;

&lt;p&gt;Read-only checks first. Nothing in Steps 1 to 3 changes the server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Ask UFW’s own config what it thinks.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep ENABLED /etc/ufw/ufw.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If this says &lt;code&gt;ENABLED=no&lt;/code&gt; while &lt;code&gt;ufw status&lt;/code&gt; says active, UFW is not the one loading the rules. Stop blaming it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Check whether netfilter-persistent is enabled.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl is-enabled netfilter-persistent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;enabled&lt;/code&gt; means a saved rule set is restored at every boot. Also check its sibling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl is-enabled nftables
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Look inside the saved file.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -c ufw /etc/iptables/rules.v4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any number above zero means the snapshot holds UFW chains. Then look at the default policies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep &lt;span class="s1"&gt;'^:'&lt;/span&gt; /etc/iptables/rules.v4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;:INPUT DROP&lt;/code&gt; in a file that only has UFW chains is the snapshot of a running UFW. Check the file date against the package install date:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls -l --time-style=full-iso /etc/iptables/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep iptables-persistent /var/log/dpkg.log*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the two times are seconds apart, the rules were saved during the install.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Stop the boot-time restore. (This changes the server.)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl disable netfilter-persistent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl mask netfilter-persistent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do the same for &lt;code&gt;nftables&lt;/code&gt; if &lt;code&gt;/etc/nftables.conf&lt;/code&gt; holds the same snapshot. Then move the old files aside instead of deleting them, so you can always look back:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir /root/fw-snapshot-old
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mv /etc/iptables/rules.v4 /etc/iptables/rules.v6 /etc/nftables.conf /root/fw-snapshot-old/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before you do this, be sure the server is protected somewhere else. On this server, the platform firewall in front of the VM already allowed web traffic only from Cloudflare. If the guest firewall is your only firewall, do not remove it — enable UFW properly instead and make it the single owner.&lt;/p&gt;

&lt;p&gt;Also leave other tools’ tables alone. cPanel’s cPHulk had its own &lt;code&gt;inet filter&lt;/code&gt; table in nftables; it was not part of the snapshot and stayed untouched.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Verify with a real reboot.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts. A firewall fix that has not survived a reboot is not a fix. Agree a window with the owner, reboot, and then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ufw status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected: &lt;code&gt;Status: inactive&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nft list ruleset &lt;span class="o"&gt;|&lt;/span&gt; grep -c ufw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected: &lt;code&gt;0&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;iptables -S &lt;span class="o"&gt;|&lt;/span&gt; grep -- &lt;span class="s1"&gt;'-P'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected: every policy is &lt;code&gt;ACCEPT&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl -b &lt;span class="o"&gt;|&lt;/span&gt; grep -Ei &lt;span class="s1"&gt;'netfilter-persistent|nftables|ufw'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected: nothing.&lt;/p&gt;

&lt;p&gt;On this server all four came back clean after the reboot, and the sites, mail on port 993 and cPanel services returned without anyone touching UFW. If &lt;code&gt;ufw status&lt;/code&gt; still says active after this, something else is creating the &lt;code&gt;ufw-user-input&lt;/code&gt; chain — find it before you change anything else. This result is not a bug. It is the verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist I Run Before Touching UFW
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Is UFW really enabled?&lt;/strong&gt; &lt;code&gt;grep ENABLED /etc/ufw/ufw.conf&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is a saved rule set restored at boot?&lt;/strong&gt; &lt;code&gt;systemctl is-enabled netfilter-persistent&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does the saved set contain UFW chains?&lt;/strong&gt; &lt;code&gt;grep -c ufw /etc/iptables/rules.v4&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is nftables loading its own copy?&lt;/strong&gt; &lt;code&gt;systemctl is-enabled nftables&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Who else writes rules here?&lt;/strong&gt; &lt;code&gt;nft list tables&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What does the kernel hold right now?&lt;/strong&gt; &lt;code&gt;iptables -S | grep -- '-P'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Will it survive a reboot?&lt;/strong&gt; Only a real reboot answers this one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And one rule I now tell every team: &lt;strong&gt;never run &lt;code&gt;netfilter-persistent save&lt;/code&gt; while UFW is up.&lt;/strong&gt; You are freezing UFW’s state into a second system that does not know UFW exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Two Mail Problems Found on the Same Day
&lt;/h2&gt;

&lt;p&gt;Once the firewall was clean, I checked the security alerts on the same server, because a server you have just rebooted should be able to tell you when something is wrong. It could not. Two small things were broken, and both are worth a line here.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The malware monitor was failing to start because &lt;code&gt;inotifywait&lt;/code&gt; was missing. Installing &lt;code&gt;inotify-tools&lt;/code&gt; brought it back.&lt;/li&gt;
&lt;li&gt;Its alert mail was never delivered. Its fallback called &lt;code&gt;sendmail -t&lt;/code&gt; with the address as an argument and no &lt;code&gt;To:&lt;/code&gt; header. Exim with &lt;code&gt;-t&lt;/code&gt; reads recipients from the headers, found none, and dropped the message — while the tool logged “sent”. Installing a real &lt;code&gt;mail&lt;/code&gt; binary (&lt;code&gt;bsd-mailx&lt;/code&gt;) fixed the sending. Then the remote gateway rejected it, because the server’s hostname had no SPF record and the parent domain’s DMARC policy was strict. Adding one SPF record for the hostname was the only change between fail and pass.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Absence of alerts is not health.&lt;/strong&gt; Send yourself a test alert after every fix like this.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;When someone says “UFW keeps turning itself on”, I ask one question:&lt;/p&gt;

&lt;p&gt;“Is netfilter-persistent enabled, and when was &lt;code&gt;/etc/iptables/rules.v4&lt;/code&gt; last written?”&lt;/p&gt;

&lt;p&gt;If the answer is “not installed”, UFW really is the one to look at. If the answer is “enabled, and the file is older than anyone remembers”, we’re not done yet.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why does UFW show active after reboot when it is disabled?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ufw status&lt;/code&gt; checks whether the &lt;code&gt;ufw-user-input&lt;/code&gt; chain exists in the kernel; it does not read &lt;code&gt;ENABLED&lt;/code&gt; in &lt;code&gt;/etc/ufw/ufw.conf&lt;/code&gt;. If netfilter-persistent restores an old snapshot that contains UFW chains, &lt;code&gt;ufw status&lt;/code&gt; reports active even though UFW itself is disabled.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why doesn’t masking ufw.service stop the firewall from coming back?
&lt;/h3&gt;

&lt;p&gt;Because UFW is not the service loading the rules. netfilter-persistent reads &lt;code&gt;/etc/iptables/rules.v4&lt;/code&gt; at boot and restores whatever was saved there, including UFW’s chains and a DROP policy. Masking UFW does nothing to that service.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I check if netfilter-persistent is loading old rules?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;systemctl is-enabled netfilter-persistent&lt;/code&gt;, then &lt;code&gt;grep -c ufw /etc/iptables/rules.v4&lt;/code&gt;. If the service is enabled and the file contains UFW chains, an old UFW snapshot is being restored at every boot. Compare the file date with the install date in &lt;code&gt;/var/log/dpkg.log&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is it safe to disable netfilter-persistent?
&lt;/h3&gt;

&lt;p&gt;Only if the server is protected by another firewall, or you then enable UFW properly as the single owner of the rules. Move the saved files aside instead of deleting them, and leave other tools’ tables, such as cPHulk’s, untouched.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I prove the fix worked?
&lt;/h3&gt;

&lt;p&gt;Reboot in an agreed window. Afterwards &lt;code&gt;ufw status&lt;/code&gt; should say inactive, &lt;code&gt;nft list ruleset | grep -c ufw&lt;/code&gt; should return 0, all &lt;code&gt;iptables&lt;/code&gt; policies should be ACCEPT, and the boot journal should show no entries for netfilter-persistent, nftables or ufw.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-ufw-active-after-reboot-netfilter-persistent.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://quabin.com/ufw-active-after-reboot-netfilter-persistent/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>security</category>
      <category>devops</category>
    </item>
    <item>
      <title>Google Search Console "Not Indexed" Warnings You Should Leave Alone — and the Two Checks That Tell You Which Ones Matter</title>
      <dc:creator>Daanial Farrukh</dc:creator>
      <pubDate>Thu, 12 Nov 2026 17:18:51 +0000</pubDate>
      <link>https://dev.to/daanial/google-search-console-not-indexed-warnings-you-should-leave-alone-and-the-two-checks-that-tell-27g8</link>
      <guid>https://dev.to/daanial/google-search-console-not-indexed-warnings-you-should-leave-alone-and-the-two-checks-that-tell-27g8</guid>
      <description>&lt;p&gt;A field note about a Search Console report that said 88 pages were not indexed on a site where every article was on Google — what each "not indexed" reason really means, which ones are correct behaviour, and the two checks I now run before I touch a single setting.&lt;/p&gt;

&lt;p&gt;This one did not start in a customer room. It started with my own site.&lt;/p&gt;

&lt;p&gt;I opened Google Search Console, went to Indexing › Pages, and read two numbers.&lt;/p&gt;

&lt;p&gt;Indexed: 37.&lt;/p&gt;

&lt;p&gt;Not indexed: 88.&lt;/p&gt;

&lt;p&gt;More than twice as many pages "not indexed" as indexed. The grey bar was bigger than the green one. The first reaction is the same for everyone who sees that chart.&lt;/p&gt;

&lt;p&gt;"Something is broken. Google is ignoring my site."&lt;/p&gt;

&lt;p&gt;I have heard the same sentence from customers who run a company website on WordPress. "Search Console says half our pages are not indexed. Can you fix it?"&lt;/p&gt;

&lt;p&gt;So I asked myself the question I ask them.&lt;/p&gt;

&lt;p&gt;"Which pages? Name one."&lt;/p&gt;

&lt;p&gt;That's the trap. The "not indexed" count is not a list of problems. It is a list of every URL Google found and decided not to keep — and on a normal WordPress site, most of those URLs should never be kept.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "Not Indexed" Actually Means
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Search Console's "not indexed" is a bucket, not an error.&lt;/strong&gt; It holds every URL Google has seen — through links, the sitemap, scripts, feeds — that it did not add to the index, with a reason attached.&lt;/p&gt;

&lt;p&gt;The flow looks like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Google finds a URL → crawls it (or not) → reads robots rules → decides → Indexed / Not indexed + reason&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The reason is the whole story. The number on its own tells you nothing.&lt;/p&gt;

&lt;p&gt;When I opened each reason on my own report, this is what was inside:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Excluded by 'noindex' tag — 36.&lt;/strong&gt; Tag archives such as &lt;code&gt;/tag/tls/&lt;/code&gt;, the search page &lt;code&gt;/?s=&lt;/code&gt;, and the author page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crawled - currently not indexed — 49.&lt;/strong&gt; RSS feeds such as &lt;code&gt;/tag/tls/feed/&lt;/code&gt;, the WordPress emoji script &lt;code&gt;wp-emoji-release.min.js&lt;/code&gt;, and one article.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not found (404) — 2.&lt;/strong&gt; &lt;code&gt;/*&lt;/code&gt; and &lt;code&gt;/cdn-cgi/l/email-protection&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovered - currently not indexed — 1.&lt;/strong&gt; &lt;code&gt;/category/uncategorized/&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is 88. Of those 88, exactly one was a real article. Everything else was a page that a good SEO setup keeps out of Google on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reason by Reason — Which Ones Are Correct
&lt;/h2&gt;

&lt;p&gt;Here's the part that trips people up. Every one of these reasons sounds like a failure. Most of them are the site doing exactly what it should.&lt;/p&gt;

&lt;h3&gt;
  
  
  Excluded by 'noindex' tag
&lt;/h3&gt;

&lt;p&gt;This is the biggest bucket on most WordPress sites, and the one people most want to "fix".&lt;/p&gt;

&lt;p&gt;Rank Math (and other SEO plugins) put a &lt;code&gt;noindex&lt;/code&gt; tag on tag archives by default. A tag archive is a list of posts that share a tag. On a small site, &lt;code&gt;/tag/tls/&lt;/code&gt; and &lt;code&gt;/tag/ssl/&lt;/code&gt; show almost the same posts. Google sees thin, duplicate pages. The plugin tells Google not to index them, and Google obeys.&lt;/p&gt;

&lt;p&gt;Every time I add an article with four tags, I can create up to four new tag archives. That is why this bucket grew from 4 to 20 to 36 while the articles grew from a handful to two dozen. &lt;strong&gt;The bucket grows because the site grows. That is not decay.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The same goes for &lt;code&gt;/?s=&lt;/code&gt; (internal search results) and the author archive on a one-author site. Neither should be in Google.&lt;/p&gt;

&lt;p&gt;The wrong fix is to untick noindex on tags so the number goes down. That pushes dozens of thin, duplicate pages into the index and makes the whole site look weaker.&lt;/p&gt;

&lt;h3&gt;
  
  
  Crawled - currently not indexed
&lt;/h3&gt;

&lt;p&gt;This reason sounds the worst: Google visited the page and still said no.&lt;/p&gt;

&lt;p&gt;On my report it held three kinds of URL:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Feeds.&lt;/strong&gt; Every tag and every post on WordPress has a &lt;code&gt;/feed/&lt;/code&gt; URL. It is XML for feed readers, not a page for people. Google crawls it and correctly does not index it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scripts.&lt;/strong&gt; &lt;code&gt;wp-emoji-release.min.js&lt;/code&gt; is a JavaScript file WordPress loads on every page. Google fetches it to render pages. It is not a page.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One real article.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first two belong there forever. The third one is the only line in the whole report that deserved a second look — and even that turned out to be a reporting lag, which I come back to below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Not found (404)
&lt;/h3&gt;

&lt;p&gt;Two URLs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/cdn-cgi/l/email-protection&lt;/code&gt; — this is Cloudflare's email address obfuscation. When the feature is on, Cloudflare rewrites email addresses in your HTML into a link to this path and decodes them with a script. Google follows the link and gets a 404. It is not a page on your site and never was.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/*&lt;/code&gt; — a literal asterisk. Something, somewhere, produced a link to it. A URL that never existed returning 404 is the correct answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A 404 on a URL that was never a page is not an error. It is the truth.&lt;/strong&gt; A 404 is only a problem when it is on a URL that used to be a real page, or one your own menu or sitemap still links to.&lt;/p&gt;

&lt;h3&gt;
  
  
  Discovered - currently not indexed
&lt;/h3&gt;

&lt;p&gt;One URL: &lt;code&gt;/category/uncategorized/&lt;/code&gt;. It exists because one older post sits in the default "Uncategorized" category. Google knows the URL but has not bothered to crawl it.&lt;/p&gt;

&lt;p&gt;The tidy fix is to move that post into a real category. It is optional. Nothing is broken.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the Report Looks Worse Than the Site
&lt;/h2&gt;

&lt;p&gt;There is a second reason the chart misleads: it lags.&lt;/p&gt;

&lt;p&gt;On my site the Pages report showed "Last updated" a week or more behind for several runs in a row. The counts stood still at Indexed 19 / Not indexed 54 for close to two weeks while I published an article almost every day. Then they jumped in one step to 37 and 88.&lt;/p&gt;

&lt;p&gt;The article that sat in "Crawled - currently not indexed" was the clearest example. The report listed it there. When I inspected the same URL with URL Inspection, the answer was &lt;strong&gt;"URL is on Google"&lt;/strong&gt;. The report was showing an older crawl. The live state was fine.&lt;/p&gt;

&lt;p&gt;Plain takeaway: &lt;strong&gt;the Pages report is a summary of the past. URL Inspection is the current answer for one URL.&lt;/strong&gt; When they disagree about a real article, believe the inspection.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Check This
&lt;/h2&gt;

&lt;p&gt;You do not fix this report by chasing the number. You check that every page that &lt;em&gt;should&lt;/em&gt; be indexed is indexed, and that every page that is excluded is excluded on purpose.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Make your list of pages that matter
&lt;/h3&gt;

&lt;p&gt;On most sites this is short: the homepage, a handful of service or about pages, and every article. Your post sitemap is the easiest source for articles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://example.com/post-sitemap.xml &lt;span class="o"&gt;|&lt;/span&gt; grep -o &lt;span class="s2"&gt;"&amp;lt;loc&amp;gt;[^&amp;lt;]*&amp;lt;/loc&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Count them, so you know what "all of them" means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://example.com/post-sitemap.xml &lt;span class="o"&gt;|&lt;/span&gt; grep -c &lt;span class="s2"&gt;"&amp;lt;loc&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If an article is missing from the sitemap, that is a real problem — but a different one. A stale sitemap is a plugin cache issue, not a Google issue, and Google can still find the post through your internal links.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Confirm each important page says "index"
&lt;/h3&gt;

&lt;p&gt;Look at the robots meta tag the page actually serves:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://example.com/your-article/ &lt;span class="o"&gt;|&lt;/span&gt; grep -io &lt;span class="s1"&gt;'&amp;lt;meta name="robots"[^&amp;gt;]*&amp;gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output for an article:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"robots"&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"index, follow, max-snippet:-1, max-video-preview:-1, max-image-preview:large"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now run the same command on a tag archive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://example.com/tag/tls/ &lt;span class="o"&gt;|&lt;/span&gt; grep -io &lt;span class="s1"&gt;'&amp;lt;meta name="robots"[^&amp;gt;]*&amp;gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"robots"&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"follow, noindex"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There you should see &lt;code&gt;noindex&lt;/code&gt;. If an article shows &lt;code&gt;noindex&lt;/code&gt;, that is the one real fault worth fixing — usually a per-post setting in the SEO plugin sidebar, or a "Discourage search engines" tick under Settings › Reading.&lt;/p&gt;

&lt;p&gt;Also check the HTTP header, because some setups send it there instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sI https://example.com/your-article/ &lt;span class="o"&gt;|&lt;/span&gt; grep -i x-robots-tag
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No output is fine. &lt;code&gt;noindex&lt;/code&gt; here on an article is a fault.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Inspect the real articles, not the report
&lt;/h3&gt;

&lt;p&gt;This step is where most tutorials stop and where mine starts.&lt;/p&gt;

&lt;p&gt;In Search Console, click the "Inspect any URL" box at the top, paste the article URL, and press Enter. Wait for "Retrieving data" to finish — on my site that takes 30 to 40 seconds, and typing in the box while it runs breaks the result.&lt;/p&gt;

&lt;p&gt;You get one of three answers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;URL is on Google&lt;/strong&gt; — done. Whatever the Pages report says, this article is indexed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;URL is not on Google&lt;/strong&gt; or &lt;strong&gt;URL is unknown to Google&lt;/strong&gt; — click &lt;strong&gt;REQUEST INDEXING&lt;/strong&gt; and wait for the green "Indexing requested" dialog.&lt;/li&gt;
&lt;li&gt;An error such as a redirect, a 404 or "Excluded by noindex" on an article — that is a real fault. Go back to Step 2.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two notes from doing this every day. A bookmarked deep link straight to the inspection page often gives a Google 404; going through the search box at the top always works. And the first REQUEST INDEXING click sometimes answers "Something went wrong" — a second click a few seconds later has worked every time for me.&lt;/p&gt;

&lt;p&gt;Request once per URL. Pressing the button every day for the same URL does not move it up the queue.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Read each "not indexed" reason once, then leave it
&lt;/h3&gt;

&lt;p&gt;Open Indexing › Pages, click each reason, and look at the example URLs. Sort every URL into one of two piles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Expected:&lt;/strong&gt; tag archives, &lt;code&gt;/feed/&lt;/code&gt; URLs, &lt;code&gt;.js&lt;/code&gt; and &lt;code&gt;.css&lt;/code&gt; files, &lt;code&gt;/?s=&lt;/code&gt;, author pages on a one-author site, &lt;code&gt;/cdn-cgi/&lt;/code&gt; paths, junk URLs that were never pages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look closer:&lt;/strong&gt; any article, service page or the homepage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only the second pile gets work: inspect it (Step 3) and request indexing if the inspection says it is not on Google.&lt;/p&gt;

&lt;p&gt;If the "look closer" pile is empty, the report is healthy, whatever the grey bar says.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Checklist I Run Every Day
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The new article is in the sitemap&lt;/strong&gt; — &lt;code&gt;curl -s https://example.com/post-sitemap.xml | grep -c "&amp;lt;loc&amp;gt;"&lt;/code&gt; went up by one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The new article says index&lt;/strong&gt; — the robots meta check in Step 2 shows &lt;code&gt;index&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The new article is requested&lt;/strong&gt; — URL Inspection, then the green "Indexing requested" dialog.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One or two older articles are spot-checked&lt;/strong&gt; — URL Inspection says "URL is on Google".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every article URL in a "not indexed" bucket is inspected&lt;/strong&gt; — and requested once if it is really missing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tag, feed, script and &lt;code&gt;/cdn-cgi/&lt;/code&gt; URLs are left alone&lt;/strong&gt; — no noindex changes, no removal requests.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With this, my own count went from "88 not indexed, panic" to "every article on Google, nothing to do" in about five minutes a day.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Tell Every Customer Now
&lt;/h2&gt;

&lt;p&gt;When someone shows me a Search Console chart with a big grey bar, I don't open settings. I ask one question.&lt;/p&gt;

&lt;p&gt;"Is any page you actually want people to find in that list?"&lt;/p&gt;

&lt;p&gt;If the answer is "no, it's all tags and feeds", they're in good shape. If the answer is "I don't know", we're not done yet — and the next ten minutes go to Step 3, one real URL at a time.&lt;/p&gt;

&lt;p&gt;I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I'll send the next one when it's ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why does Search Console show more pages not indexed than indexed?
&lt;/h3&gt;

&lt;p&gt;Because it counts every URL Google found, not only your pages. On WordPress that includes tag archives, RSS feeds, search results, author pages and script files. On a small site with many tags, these easily outnumber the real pages. The count matters far less than whether any real page is in the list.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I remove the noindex tag from WordPress tag archives?
&lt;/h3&gt;

&lt;p&gt;No, not on a typical small site. Tag archives are thin lists of posts that overlap with each other, so SEO plugins such as Rank Math noindex them by default. Forcing them into the index adds duplicate, low-value pages and does not help your articles rank.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does "Crawled - currently not indexed" mean for an RSS feed?
&lt;/h3&gt;

&lt;p&gt;It means Google fetched the feed and decided not to index it, which is correct. A feed is XML for feed readers, not a page for searchers. Leave it alone. Only act if a real article or service page appears in this bucket, and inspect that URL first because the report can lag.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is /cdn-cgi/l/email-protection showing as a 404 in Search Console?
&lt;/h3&gt;

&lt;p&gt;That path belongs to Cloudflare's email address obfuscation. Cloudflare rewrites email addresses on your pages into links to this path and decodes them with a script, so Google follows the link and gets a 404. It was never a page on your site and does not need fixing.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Pages report says an article is not indexed, but URL Inspection says it is on Google. Which is right?
&lt;/h3&gt;

&lt;p&gt;URL Inspection. The Pages report is a summary that can be a week or more behind, while inspection checks the current state of one URL. If inspection says "URL is on Google", the article is indexed and nothing needs to be requested.&lt;/p&gt;

&lt;h3&gt;
  
  
  How often should I click Request Indexing for the same URL?
&lt;/h3&gt;

&lt;p&gt;Once. Repeated requests for the same URL do not speed it up. Request it after you publish or after a real fix, then check again with URL Inspection a few days later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://quabin.com/wp-content/uploads/2026/11/quabin-search-console-not-indexed-warnings-leave-alone.pdf" rel="noopener noreferrer"&gt;Download the PDF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://quabin.com/search-console-not-indexed-warnings-leave-alone/" rel="noopener noreferrer"&gt;quabin.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>wordpress</category>
      <category>webdev</category>
      <category>google</category>
    </item>
  </channel>
</rss>
