<?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: Igor Rakov</title>
    <description>The latest articles on DEV Community by Igor Rakov (@igor_rakov_3d397069722c96).</description>
    <link>https://dev.to/igor_rakov_3d397069722c96</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%2F2065096%2F94d94d4c-91b5-414b-b9b1-8413bba0701e.png</url>
      <title>DEV Community: Igor Rakov</title>
      <link>https://dev.to/igor_rakov_3d397069722c96</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/igor_rakov_3d397069722c96"/>
    <language>en</language>
    <item>
      <title>A Docker Host Service That Answered Locally and Timed Out From Every Container</title>
      <dc:creator>Igor Rakov</dc:creator>
      <pubDate>Tue, 17 Nov 2026 04:13:05 +0000</pubDate>
      <link>https://dev.to/igor_rakov_3d397069722c96/a-docker-host-service-that-answered-locally-and-timed-out-from-every-container-1gnn</link>
      <guid>https://dev.to/igor_rakov_3d397069722c96/a-docker-host-service-that-answered-locally-and-timed-out-from-every-container-1gnn</guid>
      <description>&lt;p&gt;A CalDAV bridge on my host answered every local request instantly, and timed out from every container. Same port, same process, same uptime. From a shell on the box it was instant; from inside Docker it hung until timeout.&lt;/p&gt;

&lt;p&gt;I chased a CalDAV problem, then an application problem, before working my way back to the actual fault: Docker's &lt;strong&gt;FORWARD&lt;/strong&gt; chain policy was dropping the packets before they ever reached the socket.&lt;/p&gt;

&lt;p&gt;The tell that would've saved me the evening: the bridge logs showed every host-side test and &lt;em&gt;nothing&lt;/em&gt; from the containers — no malformed request, no auth failure, no half-open handshake. An empty log plus a client that "can't connect" means the packet died &lt;strong&gt;before&lt;/strong&gt; the socket. There is no application-level explanation for that. It's routing or filtering, full stop.&lt;/p&gt;

&lt;p&gt;Two things I learned the hard way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auditing INPUT is not auditing Docker.&lt;/strong&gt; Published ports and container-to-host flows are a FORWARD story, and Docker's default FORWARD policy is DROP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Binding to 0.0.0.0 proves nothing about reachability.&lt;/strong&gt; I moved the bridge off loopback to 0.0.0.0 first — it changed nothing, because the listener was never the constraint. A bind address widens which addresses a socket answers on; it does not widen which packets are allowed to reach the network stack.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix wasn't a firewall exception. It was moving the service &lt;em&gt;into&lt;/em&gt; the Docker network: the bridge joined the compose stack, dropped its host port, and got addressed by service name. Packets now stay inside the bridge network, where Docker's own rules already permit container-to-container traffic. No host listener left to reason about, no standing exception to remember forever.&lt;/p&gt;

&lt;p&gt;The mental model that made the whole thing obvious: &lt;em&gt;there's a boundary here, and I have to decide which side the service belongs on.&lt;/em&gt; The bridge's only callers were containers — it was sitting on the wrong side of a line I'd drawn without noticing.&lt;/p&gt;

&lt;p&gt;Full walk-through (with the diagnostic checklist): &lt;a href="https://igornews.com/2026/11/16/docker-forward-drop-container-to-host-traffic/" rel="noopener noreferrer"&gt;https://igornews.com/2026/11/16/docker-forward-drop-container-to-host-traffic/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>linux</category>
      <category>networking</category>
    </item>
    <item>
      <title>I Chased a Crypto Miner in ps for Three Days — It Was a UID Collision</title>
      <dc:creator>Igor Rakov</dc:creator>
      <pubDate>Sun, 15 Nov 2026 03:30:22 +0000</pubDate>
      <link>https://dev.to/igor_rakov_3d397069722c96/i-chased-a-crypto-miner-in-ps-for-three-days-it-was-a-uid-collision-49kc</link>
      <guid>https://dev.to/igor_rakov_3d397069722c96/i-chased-a-crypto-miner-in-ps-for-three-days-it-was-a-uid-collision-49kc</guid>
      <description>&lt;p&gt;&lt;code&gt;ps aux&lt;/code&gt; showed a process running as user &lt;code&gt;ollama&lt;/code&gt;. A process I never started, running as a user tied to the Ollama service. My first thought was the obvious one: Ollama got compromised and someone is running a miner on my box.&lt;/p&gt;

&lt;p&gt;Three days later the "miner" turned out to be a Postgres container.&lt;/p&gt;

&lt;p&gt;What happened: Docker containers run their processes with an internal numeric UID. That UID is chosen inside the image — Postgres, for example, runs as a specific numeric user. On the host, &lt;code&gt;ps&lt;/code&gt; (and &lt;code&gt;top&lt;/code&gt;, and everything else that reads &lt;code&gt;/proc&lt;/code&gt;) does a lookup of that numeric UID against &lt;code&gt;/etc/passwd&lt;/code&gt; to print a &lt;em&gt;name&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The Postgres image's internal UID happened to collide with the numeric UID of the &lt;code&gt;ollama&lt;/code&gt; service account on my host. So every process inside the container was displayed as &lt;code&gt;ollama&lt;/code&gt; — the container wasn't using the ollama user at all, my host just resolved the number to a familiar name and I connected the dots wrong.&lt;/p&gt;

&lt;p&gt;The tell: the "miner" process's command line was a normal Postgres startup, its parent was containerd, and &lt;code&gt;docker top &amp;lt;container&amp;gt;&lt;/code&gt; showed the same PID running fine inside the container. A real miner would have an unusual binary path and a parent chain pointing somewhere suspicious.&lt;/p&gt;

&lt;p&gt;Ways to actually verify instead of trusting the name column:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ps -o uid,user,comm,args&lt;/code&gt; — look at the raw UID number, not just the resolved name.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docker top &amp;lt;container&amp;gt;&lt;/code&gt; — shows what's running &lt;em&gt;inside&lt;/em&gt; the container.&lt;/li&gt;
&lt;li&gt;Check &lt;code&gt;/etc/passwd&lt;/code&gt; for UID collisions: &lt;code&gt;awk -F: '{print $3}' /etc/passwd | sort | uniq -d&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lesson I took away: the username in &lt;code&gt;ps&lt;/code&gt; is a convenience label resolved from a number. When the number belongs to a container, the label can be misleading. Before you assume a breach, confirm the UID maps to what you think it maps to.&lt;/p&gt;

&lt;p&gt;Full write-up: &lt;a href="https://igornews.com/2026/11/11/miner-in-ps-wasnt-ollama-uid-collision/" rel="noopener noreferrer"&gt;https://igornews.com/2026/11/11/miner-in-ps-wasnt-ollama-uid-collision/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>linux</category>
      <category>security</category>
      <category>devops</category>
    </item>
    <item>
      <title>rkhunter Flagged Four Suspicious Paths on My VPS — All Four Were Mine</title>
      <dc:creator>Igor Rakov</dc:creator>
      <pubDate>Sun, 15 Nov 2026 03:29:26 +0000</pubDate>
      <link>https://dev.to/igor_rakov_3d397069722c96/rkhunter-flagged-four-suspicious-paths-on-my-vps-all-four-were-mine-5gc0</link>
      <guid>https://dev.to/igor_rakov_3d397069722c96/rkhunter-flagged-four-suspicious-paths-on-my-vps-all-four-were-mine-5gc0</guid>
      <description>&lt;p&gt;After a nightly &lt;code&gt;rkhunter --cronjob&lt;/code&gt; run I got a "Suspect files: 4" line in the report. Rootkit checks came back clean (0 rootkits, 498 checked), but four hidden paths were flagged as potentially suspicious:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/usr/.qwen&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/dev/shm/PostgreSQL.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/root/.local/bin/env&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/usr/bin/.summarizer-*&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I panicked for about ten minutes, then realized every single one was something I put there myself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/usr/.qwen&lt;/code&gt; is a model cache directory a local Qwen run created.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/dev/shm/PostgreSQL.*&lt;/code&gt; is Postgres using a tmpfs mount for shared memory — completely normal, it just happens to look like a "hidden file in /dev/shm".&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/root/.local/bin/env&lt;/code&gt; is a tiny wrapper script I dropped in my own bin.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/usr/bin/.summarizer-*&lt;/code&gt; is a temp binary my summarizer helper writes while it runs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point: rkhunter's "suspect files" check is a &lt;em&gt;heuristic&lt;/em&gt;, not a verdict. It flags anything that looks hidden or unusual, and self-hosters are exactly the kind of people who have dotfiles, tmpfs mounts and helper scripts everywhere. A flagged path is a prompt to &lt;em&gt;investigate&lt;/em&gt;, not to assume compromise.&lt;/p&gt;

&lt;p&gt;The right move is to whitelist the ones you own and can account for, then re-run the property update so the noise goes away:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="c1"&gt;# /etc/rkhunter.conf
&lt;/span&gt;&lt;span class="na"&gt;ALLOWHIDDENDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/usr/.qwen"&lt;/span&gt;
&lt;span class="na"&gt;ALLOWHIDDENFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/dev/shm/PostgreSQL.*"&lt;/span&gt;
&lt;span class="na"&gt;ALLOWHIDDENFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/root/.local/bin/env"&lt;/span&gt;
&lt;span class="na"&gt;ALLOWHIDDENFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/usr/bin/.summarizer-*"&lt;/span&gt;
&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;rkhunter --propupd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that the next &lt;code&gt;--cronjob&lt;/code&gt; run reports 0 suspects, and anything NEW that shows up is actually worth your attention — which is the whole reason to keep rkhunter running in the first place. The signal is only useful once you've cleared your own noise.&lt;/p&gt;

&lt;p&gt;Full write-up (including how I verified each path was legit before whitelisting): &lt;a href="https://igornews.com/2026/11/08/rkhunter-false-positives-whitelist/" rel="noopener noreferrer"&gt;https://igornews.com/2026/11/08/rkhunter-false-positives-whitelist/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>linux</category>
      <category>devops</category>
      <category>selfhosting</category>
    </item>
    <item>
      <title>fail2ban Bans That Quietly Do Nothing on Docker Ports</title>
      <dc:creator>Igor Rakov</dc:creator>
      <pubDate>Sun, 15 Nov 2026 03:29:25 +0000</pubDate>
      <link>https://dev.to/igor_rakov_3d397069722c96/fail2ban-bans-that-quietly-do-nothing-on-docker-ports-5edg</link>
      <guid>https://dev.to/igor_rakov_3d397069722c96/fail2ban-bans-that-quietly-do-nothing-on-docker-ports-5edg</guid>
      <description>&lt;p&gt;Spent days wondering why fail2ban kept banning IPs that kept hammering my Docker-published WordPress login. The bans were inserted, &lt;code&gt;fail2ban-client status&lt;/code&gt; said "banned" — but the traffic never stopped.&lt;/p&gt;

&lt;p&gt;The reason: on a Docker host, fail2ban's default action drops rules into the &lt;strong&gt;INPUT&lt;/strong&gt; chain. Packets to published ports are processed by Docker's &lt;strong&gt;FORWARD/DOCKER-USER&lt;/strong&gt; chain &lt;em&gt;before&lt;/em&gt; INPUT ever sees them. So the ban is real, it just drops nothing.&lt;/p&gt;

&lt;p&gt;The fix is one token — point the action at &lt;code&gt;DOCKER-USER&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="k"&gt;[igornews-wp]&lt;/span&gt;
&lt;span class="na"&gt;enabled&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;filter&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;igornews&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;
&lt;span class="na"&gt;logpath&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;opt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;igornews&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;logs&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;access&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;
&lt;span class="na"&gt;action&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;iptables&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;allports&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;DOCKER&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="no"&gt;USER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blocktype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;DROP&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;bantime&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1h&lt;/span&gt;
&lt;span class="na"&gt;findtime&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10m&lt;/span&gt;
&lt;span class="na"&gt;maxretry&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second gotcha in the same jail: it reads Caddy's JSON access log, whose timestamp is a fractional epoch mid-line, so I needed a custom &lt;code&gt;datepattern = "ts":{LEPOCH}&lt;/code&gt; or fail2ban parsed zero lines.&lt;/p&gt;

&lt;p&gt;The verify step that would've caught this in five minutes: after a ban, run &lt;code&gt;iptables -L DOCKER-USER -n&lt;/code&gt; and actually see the IP there — never trust "fail2ban is running."&lt;/p&gt;

&lt;p&gt;Full walk-through (with the JSON-log filter regex): &lt;a href="https://igornews.com/2026/11/08/fail2ban-docker-user-chain-bans/" rel="noopener noreferrer"&gt;https://igornews.com/2026/11/08/fail2ban-docker-user-chain-bans/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>security</category>
      <category>linux</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
