This commit is contained in:
github-actions[bot] 2021-08-13 08:31:06 +00:00
parent a9f5030129
commit 12cc407e28
3 changed files with 207 additions and 41 deletions

View file

@ -72,6 +72,11 @@
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#configuration-files" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
@ -615,10 +620,78 @@
<label class="md-nav__link md-nav__link--active" for="__toc">
Fail2Ban
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
Fail2Ban
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#configuration-files" class="md-nav__link">
Configuration files
</a>
<nav class="md-nav" aria-label="Configuration files">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#docker-compose-config" class="md-nav__link">
Docker-compose config
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#manage-bans" class="md-nav__link">
Manage bans
</a>
<nav class="md-nav" aria-label="Manage bans">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#list-bans" class="md-nav__link">
List bans
</a>
</li>
<li class="md-nav__item">
<a href="#un-ban" class="md-nav__link">
Un-ban
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
@ -1236,6 +1309,78 @@
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" hidden>
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#configuration-files" class="md-nav__link">
Configuration files
</a>
<nav class="md-nav" aria-label="Configuration files">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#docker-compose-config" class="md-nav__link">
Docker-compose config
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#manage-bans" class="md-nav__link">
Manage bans
</a>
<nav class="md-nav" aria-label="Manage bans">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#list-bans" class="md-nav__link">
List bans
</a>
</li>
<li class="md-nav__item">
<a href="#un-ban" class="md-nav__link">
Un-ban
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
@ -1248,8 +1393,21 @@
<h1>Fail2Ban</h1>
<p>Fail2Ban is installed automatically and bans IP addresses for 3 hours after 3 failed attempts in 10 minutes by default. If you want to change this, you can easily edit <a href="https://github.com/docker-mailserver/docker-mailserver/blob/master/config/fail2ban-jail.cf"><code>config/fail2ban-jail.cf</code></a>.</p>
<p>Fail2Ban is installed automatically and bans IP addresses for 3 hours after 3 failed attempts in 10 minutes by default.</p>
<h2 id="configuration-files"><a class="toclink" href="#configuration-files">Configuration files</a></h2>
<p>If you want to change this, you can easily edit <a href="https://github.com/docker-mailserver/docker-mailserver/blob/master/config/fail2ban-jail.cf"><code>config/fail2ban-jail.cf</code></a>.</p>
<p>You can do the same with the values from <code>fail2ban.conf</code>, e.g <code>dbpurgeage</code>. In that case you need to edit <a href="https://github.com/docker-mailserver/docker-mailserver/blob/master/config/fail2ban-fail2ban.cf"><code>config/fail2ban-fail2ban.cf</code></a>.</p>
<p>The configuration files need to be located at the root of the <code>/tmp/docker-mailserver/</code> volume bind.</p>
<p>This following configuration files from <code>/tmp/docker-mailserver/</code> will be copied at boot time.</p>
<ul>
<li><code>fail2ban-jail.cf</code> -&gt; <code>/etc/fail2ban/jail.d/user-jail.local</code></li>
<li><code>fail2ban-fail2ban.cf</code> -&gt; <code>/etc/fail2ban/fail2ban.local</code></li>
</ul>
<h3 id="docker-compose-config"><a class="toclink" href="#docker-compose-config">Docker-compose config</a></h3>
<p>Example configuration volume bind:</p>
<div class="highlight"><pre><span></span><code> <span class="nt">volumes</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">./config/:/tmp/docker-mailserver/</span>
</code></pre></div>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>The mail container must be launched with the <code>NET_ADMIN</code> capability in order to be able to install the iptable rules that actually ban IP addresses.</p>
@ -1265,7 +1423,15 @@
<span class="go">2016-06-01 00:53:51,284 fail2ban.action [678]: ERROR iptables -w -D INPUT -p tcp -m multiport --dports smtp,465,submission -</span>
<span class="go">j f2b-postfix</span>
</code></pre></div>
<h2 id="manage-bans"><a class="toclink" href="#manage-bans">Manage bans</a></h2>
<p>You can also manage and list the banned IPs with the <a href="../../setup.sh/"><code>setup.sh</code></a> script.</p>
<h3 id="list-bans"><a class="toclink" href="#list-bans">List bans</a></h3>
<div class="highlight"><pre><span></span><code>./setup.sh debug fail2ban
</code></pre></div>
<h3 id="un-ban"><a class="toclink" href="#un-ban">Un-ban</a></h3>
<p>Here <code>192.168.1.15</code> is our banned IP.</p>
<div class="highlight"><pre><span></span><code>./setup.sh debug fail2ban unban <span class="m">192</span>.168.1.15
</code></pre></div>

File diff suppressed because one or more lines are too long

View file

@ -2,197 +2,197 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/faq/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/introduction/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/environment/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/pop3/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/setup.sh/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/auth-ldap/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/full-text-search/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/ipv6/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/kubernetes/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/mail-fetchmail/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/mail-sieve/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/optional-config/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/mail-forwarding/aws-ses/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/mail-forwarding/relay-hosts/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/maintenance/update-and-cleanup/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/override-defaults/dovecot/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/override-defaults/postfix/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/override-defaults/user-patches/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/best-practices/autodiscover/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/best-practices/dkim/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/best-practices/dmarc/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/best-practices/spf/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/security/fail2ban/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/security/mail_crypt/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/security/ssl/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/troubleshooting/debugging/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/user-management/accounts/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/config/user-management/aliases/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/contributing/coding-style/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/contributing/documentation/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/contributing/issues-and-pull-requests/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/contributing/tests/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/examples/tutorials/basic-installation/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/examples/tutorials/blog-posts/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/examples/tutorials/mailserver-behind-proxy/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/examples/uses-cases/forward-only-mailserver-with-ldap-authentication/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docker-mailserver.github.io/docker-mailserver/edge/examples/uses-cases/imap-folders/</loc>
<lastmod>2021-08-12</lastmod>
<lastmod>2021-08-13</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>