<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Documentation - Catégorie - arleo.eu</title><link>https://www.arleo.eu/categories/documentation/</link><description>Documentation - Catégorie - arleo.eu</description><generator>Hugo -- gohugo.io</generator><language>fr</language><lastBuildDate>Sun, 12 Apr 2026 21:24:00 +0200</lastBuildDate><atom:link href="https://www.arleo.eu/categories/documentation/" rel="self" type="application/rss+xml"/><item><title>Documentation Infrastructure</title><link>https://www.arleo.eu/documentation/</link><pubDate>Sun, 12 Apr 2026 21:24:00 +0200</pubDate><author>Jmr</author><guid>https://www.arleo.eu/documentation/</guid><description><![CDATA[<h2 id="1-architecture-de-sécurité-10-couches">1. Architecture de sécurité (10 couches)</h2>
<table>
  <thead>
      <tr>
          <th>#</th>
          <th>Couche</th>
          <th>Technologie</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>1</td>
          <td>DNS</td>
          <td>DNSSEC ECDSA P256-SHA256</td>
      </tr>
      <tr>
          <td>2</td>
          <td>CDN + WAF Cloud</td>
          <td>Cloudflare WAF + DDoS + AI Crawl Control</td>
      </tr>
      <tr>
          <td>3</td>
          <td>Réseau</td>
          <td>CrowdSec nftables Bouncer</td>
      </tr>
      <tr>
          <td>4</td>
          <td>Firewall</td>
          <td>Netgear PR60X SPI</td>
      </tr>
      <tr>
          <td>5</td>
          <td>WAF Local</td>
          <td>ModSecurity + OWASP CRS 4.x</td>
      </tr>
      <tr>
          <td>6</td>
          <td>IDS/IPS</td>
          <td>CrowdSec Agent + scénarios SSH/HTTP</td>
      </tr>
      <tr>
          <td>7</td>
          <td>HTTPS</td>
          <td>TLS 1.3 + HSTS preload</td>
      </tr>
      <tr>
          <td>8</td>
          <td>DNS-TLS</td>
          <td>DoH port 853</td>
      </tr>
      <tr>
          <td>9</td>
          <td>Application</td>
          <td>Grav CMS + CSP + Secure cookies</td>
      </tr>
      <tr>
          <td>10</td>
          <td>Monitoring</td>
          <td>BetterStack + CrowdSec poller + Vector</td>
      </tr>
  </tbody>
</table>
<hr>
<h2 id="2-crowdsec--cloudflare-sync-crowdsec-cf-syncpy">2. CrowdSec → Cloudflare Sync (<code>crowdsec-cf-sync.py</code>)</h2>
<p><strong>Emplacement :</strong> <code>/usr/local/bin/crowdsec-cf-sync.py</code>
<strong>Service :</strong> <code>crowdsec-cf-sync.service</code>
<strong>Logs :</strong> <code>/var/log/crowdsec/cf-sync.log</code></p>]]></description></item><item><title>Scripts Infrastructure</title><link>https://www.arleo.eu/scripts/</link><pubDate>Sun, 12 Apr 2026 21:24:00 +0200</pubDate><author>Jmr</author><guid>https://www.arleo.eu/scripts/</guid><description><![CDATA[<h2 id="1-crowdsec-cf-syncpy">1. crowdsec-cf-sync.py</h2>
<p><strong>Emplacement :</strong> <code>/usr/local/bin/crowdsec-cf-sync.py</code>
<strong>Service systemd :</strong> <code>crowdsec-cf-sync.service</code>
<strong>Logs :</strong> <code>/var/log/crowdsec/cf-sync.log</code></p>
<h3 id="installation">Installation</h3>
<div class="code-block code-line-numbers open" data-start="0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copier dans le presse-papiers"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cp crowdsec-cf-sync.py /usr/local/bin/
</span></span><span class="line"><span class="cl">chmod +x /usr/local/bin/crowdsec-cf-sync.py
</span></span><span class="line"><span class="cl">systemctl <span class="nb">enable</span> crowdsec-cf-sync
</span></span><span class="line"><span class="cl">systemctl start crowdsec-cf-sync</span></span></code></pre></div></div>
<h3 id="fonctionnalités">Fonctionnalités</h3>
<ul>
<li>Synchronise les bans CrowdSec actifs → Cloudflare IP Access Rules (tag <code>crowdsec-local-ban</code>)</li>
<li>Reporte les IPs bannies → AbuseIPDB (fenêtre 48h, dédupliqué)</li>
<li><strong>Escalade récidivistes</strong> : 1er ban CrowdSec gère | 2ème → 24h | 3ème+ → 7j (fenêtre 7j)</li>
<li><strong>ModSecurity</strong> score ≥ 5 → ban CF immédiat 2h (tag <code>modsec-ban</code>) + report AbuseIPDB</li>
<li><strong>Ban /24</strong> automatique : 2+ IPs du même bloc en 7j → ban CF + CrowdSec 24h (tag <code>crowdsec-cidr-ban</code>)</li>
</ul>
<h3 id="bugs-corrigés-avril-2026">Bugs corrigés (avril 2026)</h3>
<ul>
<li><code>cs_origin</code> vs <code>origin</code> dans <code>get_recent_local_bans()</code> — le champ JSON s&rsquo;appelle <code>cs_origin</code></li>
<li>Pagination API REST <code>/v1/decisions?limit=1000</code> rate les bans <code>cscli</code> → remplacé par <code>cscli decisions list --origin</code></li>
<li><code>Items</code> → <code>items</code> (minuscule) dans le parsing JSON de la allowlist CrowdSec</li>
</ul>
<blockquote>
<p>⚠️ <strong>Important</strong> : les vrais tokens (<code>CF_API_TOKEN</code>, <code>CF_ZONE_ID</code>, <code>CS_API_KEY</code>, <code>ABUSEIPDB_KEY</code>) doivent être stockés dans <code>/etc/secrets/</code> avec <code>chmod 600</code> et chargés via variables d&rsquo;environnement, pas hardcodés dans le script. Les valeurs <code>VOTRE_*</code> ci-dessous sont des placeholders.</p>]]></description></item></channel></rss>