<?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 Apuntes de root</title>
    <link>https://blog.099c.org/tags/fail2ban/</link>
    <description>Recent content in Fail2ban on Apuntes de root</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <managingEditor>jorti@pm.me (Juan Orti Alcaine)</managingEditor>
    <webMaster>jorti@pm.me (Juan Orti Alcaine)</webMaster>
    <lastBuildDate>Tue, 03 Mar 2026 16:35:37 +0100</lastBuildDate>
    <atom:link href="https://blog.099c.org/tags/fail2ban/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>From Fail2ban to Reaction</title>
      <link>https://blog.099c.org/posts/from-fail2ban-to-reaction/</link>
      <pubDate>Tue, 03 Mar 2026 16:35:37 +0100</pubDate><author>jorti@pm.me (Juan Orti Alcaine)</author>
      <guid>https://blog.099c.org/posts/from-fail2ban-to-reaction/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/fail2ban/fail2ban&#34;&gt;Fail2ban&lt;/a&gt; has been an important security tool I&amp;rsquo;ve been using in my servers for many years.&#xA;However sometimes is difficult to configure, lacks certain features and can consume too many resources.&lt;/p&gt;&#xA;&lt;p&gt;Recently I&amp;rsquo;ve switched to &lt;a href=&#34;https://reaction.ppom.me/&#34;&gt;Reaction&lt;/a&gt;, a new tool with the same philosophy:&#xA;monitor logs and execute some actions based on log matches. Reaction is written&#xA;in Rust, so it&amp;rsquo;s fast and resource efficient.&lt;/p&gt;</description>
    </item>
    <item>
      <title>fail2ban 0.9</title>
      <link>https://blog.099c.org/posts/fail2ban-0-9/</link>
      <pubDate>Tue, 25 Mar 2014 00:00:00 +0000</pubDate><author>jorti@pm.me (Juan Orti Alcaine)</author>
      <guid>https://blog.099c.org/posts/fail2ban-0-9/</guid>
      <description>&lt;p&gt;With the recent release of &lt;a href=&#34;https://github.com/fail2ban/fail2ban/releases/tag/0.9.0&#34; title=&#34;fail2ban 0.9&#34;&gt;fail2ban 0.9&lt;/a&gt; there are very important improvements to the journal and firewalld integration. With these simple configurations, I get fail2ban working in Fedora 20 without a syslog daemon and avoiding being &lt;a href=&#34;http://www.fail2ban.org/wiki/index.php/MANUAL_0_8#Possibility_of_DOS_attack_by_a_local_user&#34; title=&#34;DOSed by a local user&#34;&gt;DOSed  by a local user&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;/etc/fail2ban/fail2ban.local&lt;/code&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[Definition]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;loglevel = INFO&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;logtarget = SYSLOG&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In &lt;code&gt;/etc/fail2ban/jail.local&lt;/code&gt; we set the backend to &lt;code&gt;systemd&lt;/code&gt;, so we monitor directly the journal, we also choose as default action &lt;code&gt;firewallcmd-ipset&lt;/code&gt;, so the rules are inserted with firewall-cmd and use the ipset facility. Finally, all the jails needed are enabled.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[DEFAULT]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;backend = systemd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;banaction = firewallcmd-ipset&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bantime = 3600&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[sshd]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;enabled = true&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[postfix]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;enabled = true&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[dovecot]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;enabled = true&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Configure fail2ban in Fedora 20 to use firewall-cmd and ipset</title>
      <link>https://blog.099c.org/posts/configure-fail2ban-in-fedora-20-to-use-firewall-cmd-and-ipset/</link>
      <pubDate>Thu, 27 Feb 2014 00:00:00 +0000</pubDate><author>jorti@pm.me (Juan Orti Alcaine)</author>
      <guid>https://blog.099c.org/posts/configure-fail2ban-in-fedora-20-to-use-firewall-cmd-and-ipset/</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note (October 20 2014):&lt;/strong&gt; This post is outdated, please, refer to the post &lt;a href=&#34;https://blog.099c.org/posts/fail2ban-0-9/&#34;&gt;fail2ban 0.9&lt;/a&gt; for more up to date information.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;fail2ban is a handy daemon that monitors the log files to identify connection attempts and other kind of attacks and ban those IPs for a certain period of time.&lt;/p&gt;&#xA;&lt;p&gt;Currently, fail2ban upstream is adding support to firewalld and the use of ipset, so some modifications are needed at the stock config.&lt;/p&gt;&#xA;&lt;p&gt;First of all, install the needed packages, I add rsyslog because it&amp;rsquo;s not included in the default Fedora 20 installation and it&amp;rsquo;s needed to generate &lt;code&gt;/var/log/secure&lt;/code&gt;. I hope fail2ban will support some day querying the journal directly.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
