<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Fail2ban on Jim Diroff II</title><link>https://www.jimdiroffii.com/tags/fail2ban/</link><description>Recent content in Fail2ban on Jim Diroff II</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 16 Feb 2026 00:00:01 -0500</lastBuildDate><atom:link href="https://www.jimdiroffii.com/tags/fail2ban/index.xml" rel="self" type="application/rss+xml"/><item><title>365 Days of Code - Day 027</title><link>https://www.jimdiroffii.com/posts/2026/02/365-days-of-code-day-027-2026/</link><pubDate>Mon, 16 Feb 2026 00:00:01 -0500</pubDate><guid>https://www.jimdiroffii.com/posts/2026/02/365-days-of-code-day-027-2026/</guid><description>&lt;p&gt;Following up from yesterday&amp;rsquo;s server administration, I checked on my recidive jail, and found that no clients had been banned. This was clearly an error since I could manually check the logs and see many repeat offenders. There was one change I had to make to the configuration.&lt;/p&gt;
&lt;div
 class="code-block not-prose group relative my-6 overflow-hidden rounded-lg bg-[#02000f]"
 data-lang="ini"
&gt;
 &lt;div
 class="flex items-center justify-between px-4 py-2 bg-slate-950/40 border-b border-white/10"
 &gt;
 &lt;span class="text-md font-mono uppercase tracking-wider text-slate-300"
 &gt;ini&lt;/span
 &gt;

 &lt;button
 class="copy-button p-2 rounded-md text-slate-400 hover:text-white hover:bg-slate-700/50 transition-all duration-200"
 aria-label="Copy to Clipboard"
 type="button"
 &gt;
 &lt;svg
 width="20"
 height="20"
 viewBox="0 0 24 24"
 fill="none"
 stroke="currentColor"
 stroke-width="2"
 stroke-linecap="round"
 stroke-linejoin="round"
 &gt;
 &lt;rect x="9" y="9" width="13" height="13" rx="2" ry="2"&gt;&lt;/rect&gt;
 &lt;path
 d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
 &gt;&lt;/path&gt;
 &lt;/svg&gt;
 &lt;/button&gt;
 &lt;/div&gt;

 &lt;pre class="code-raw sr-only"&gt;[recidive]
enabled = true
filter = recidive
logpath = /var/log/fail2ban.log
backend = polling # &amp;lt;--- Add this line
findtime = 1d
maxretry = 2
bantime = 1y&lt;/pre&gt;

 &lt;div class="overflow-x-auto my-2"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[recidive]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;enabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;filter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;recidive&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;logpath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;/var/log/fail2ban.log&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;backend&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;polling # &amp;lt;--- Add this line&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;findtime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;1d&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;maxretry&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;bantime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;1y&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;By default, fail2ban was using the systemd journal to find repeat offenders, but the log is being stored in fail2ban&amp;rsquo;s own log. It was necessary to add &lt;code&gt;backend = polling&lt;/code&gt; to the configuration to force f2b to read its own log file.&lt;/p&gt;</description></item><item><title>365 Days of Code - Day 026</title><link>https://www.jimdiroffii.com/posts/2026/02/365-days-of-code-day-026-2026/</link><pubDate>Sun, 15 Feb 2026 00:00:01 -0500</pubDate><guid>https://www.jimdiroffii.com/posts/2026/02/365-days-of-code-day-026-2026/</guid><description>Hardening Server Deployments: Securing GitHub Actions with Least Privilege</description></item></channel></rss>