<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Blog de ppom</title>
    <subtitle>Le bébé blog de ppom 🍏</subtitle>
    <link rel="self" type="application/atom+xml" href="https://blog.ppom.me/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://blog.ppom.me"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2025-06-02T00:00:00+00:00</updated>
    <id>https://blog.ppom.me/atom.xml</id>
    <entry xml:lang="en">
        <title>reaction v2 : Rust &amp; NLnet</title>
        <published>2025-06-02T00:00:00+00:00</published>
        <updated>2025-06-02T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/en-reaction-v2/"/>
        <id>https://blog.ppom.me/en-reaction-v2/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/en-reaction-v2/">&lt;p&gt;&lt;em&gt;Cet article est aussi &lt;a href=&quot;/fr-reaction-v2&quot;&gt;disponible en 🇫🇷 français&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For an introduction to reaction, see &lt;a href=&quot;/en-reaction&quot;&gt;this previous article&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&#39;m pleased to announce reaction&#39;s &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/releases/v2.0.0&quot;&gt;v2.0.0 release&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;This new version brings few new features, but it opens the way for a bright future for reaction 🌞&lt;/p&gt;
&lt;h2 id=&quot;tl-dr&quot;&gt;TL;DR&lt;a class=&quot;zola-anchor&quot; href=&quot;#tl-dr&quot; aria-label=&quot;Anchor link for: tl-dr&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this article:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rust rewrite&lt;/li&gt;
&lt;li&gt;Benchmark&lt;/li&gt;
&lt;li&gt;Incompatibilities from v1 to v2&lt;/li&gt;
&lt;li&gt;New features&lt;/li&gt;
&lt;li&gt;Upcoming features&lt;/li&gt;
&lt;li&gt;NLnet support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;crab-rust-rewrite&quot;&gt;🦀 Rust rewrite&lt;a class=&quot;zola-anchor&quot; href=&quot;#crab-rust-rewrite&quot; aria-label=&quot;Anchor link for: crab-rust-rewrite&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I began one year ago a complete Rust rewrite of reaction, with the following goals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Better &lt;strong&gt;performance&lt;/strong&gt; and &lt;strong&gt;robustness&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;A language with more hype, to attract &lt;strong&gt;contributors&lt;/strong&gt; and enjoy a better &lt;strong&gt;library ecosystem&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;A language better adapted to the creation of a fast &lt;strong&gt;plugin system&lt;/strong&gt; (see below)&lt;/li&gt;
&lt;li&gt;Writing tests for most of the codebase.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After a lot of twists, I finally have a fully satisfying reaction reimplementation.
The first functional version was ready last October, but this rewrite has been an occasion to test different internal systems.&lt;/p&gt;
&lt;p&gt;I notably spent the months of February and May testing several database systems, which were not satisfying. I ended up rewriting my own implementation. There is now (once again) an embedded mini-redis in reaction!&lt;/p&gt;
&lt;h2 id=&quot;bar-chart-benchmark&quot;&gt;📊 Benchmark&lt;a class=&quot;zola-anchor&quot; href=&quot;#bar-chart-benchmark&quot; aria-label=&quot;Anchor link for: bar-chart-benchmark&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Because we all love &lt;em&gt;data&lt;/em&gt;, here&#39;s the result of a benchmark.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This benchmark isn&#39;t realistic.
It sends 4 streams of 1 million lines of logs each, as fast as possible,
requiring reaction to process all of it.
reaction will execute ~6000 actions (a &lt;code&gt;sleep 0.1&lt;/code&gt;).
This allows us to have an idea of how reaction is &lt;em&gt;reacting&lt;/em&gt; to a huge stress.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Of course, those tests should be taken with a grain of salt,
because they don&#39;t test real life.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Statistics were produced by systemd.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Go version, &lt;code&gt;v1.4.1&lt;/code&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Service runtime: 2min 10.024s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CPU time consumed: 6min 47.643s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Memory peak: 13.6G (swap: 6.6G)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IO bytes read: 18.5G written: 21.3G&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Rust version, &lt;code&gt;v2.0.0&lt;/code&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Service runtime: 42.235s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CPU time consumed: 4min 27.828s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Memory peak: 4.3G (swap: 0B)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IO bytes written: 499.9M&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those tests were executed on a PC with brand new NVME SSD and 16G RAM.
The disk IO differences would have a bigger impact on a slower disk.
Total service runtime differences would probably be less important if reaction Go hadn&#39;t had to swap.&lt;/p&gt;
&lt;p&gt;As a note, performance differences aren&#39;t just a result of the languages themselves, but stem most importantly from technical choices for the internal architecture and communication between components, from the database (which have the same general structure but implementation differences), etc.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;As a piece of evidence, the first version of the rewrite, close to the goroutine and channels proposed by Go, and less adapted to Rust, had much worse performance than the Go version.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;gear-incompatibilities&quot;&gt;⚙️ Incompatibilities&lt;a class=&quot;zola-anchor&quot; href=&quot;#gear-incompatibilities&quot; aria-label=&quot;Anchor link for: gear-incompatibilities&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Behavior differences between the v1 and v2 are few.&lt;/p&gt;
&lt;p&gt;But they can lead to side effects in some cases:&lt;/p&gt;
&lt;h3 id=&quot;adult-school-configuration-evaluation&quot;&gt;🧑‍🏫 Configuration evaluation&lt;a class=&quot;zola-anchor&quot; href=&quot;#adult-school-configuration-evaluation&quot; aria-label=&quot;Anchor link for: adult-school-configuration-evaluation&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Configuration loading is more strict in reaction v2. It includes detecting misnamed fields, which were previously ignored.&lt;/p&gt;
&lt;p&gt;In case of an incorrect configuration, a human-friendly error will be shown.&lt;/p&gt;
&lt;p&gt;A new command allows users to test the config upfront: &lt;code&gt;reaction test-config&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;straight-ruler-regex-engine&quot;&gt;📏 Regex engine&lt;a class=&quot;zola-anchor&quot; href=&quot;#straight-ruler-regex-engine&quot; aria-label=&quot;Anchor link for: straight-ruler-regex-engine&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Go and Rust regex libraries have some syntax differences on advanced features.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/google/re2/wiki/Syntax&quot;&gt;v1 syntax&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://docs.rs/regex/latest/regex/#syntax&quot;&gt;v2 syntax&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;fountain-streams&quot;&gt;⛲ Streams&lt;a class=&quot;zola-anchor&quot; href=&quot;#fountain-streams&quot; aria-label=&quot;Anchor link for: fountain-streams&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Previously, reaction only read the stdout of launched commands.&lt;/p&gt;
&lt;p&gt;Now, both stdout and stderr are read.&lt;/p&gt;
&lt;h3 id=&quot;open-file-folder-database&quot;&gt;📂 Database&lt;a class=&quot;zola-anchor&quot; href=&quot;#open-file-folder-database&quot; aria-label=&quot;Anchor link for: open-file-folder-database&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Database formats between v1 and v2 are incompatible.&lt;/p&gt;
&lt;p&gt;Stored data (matches, current actions) will be lost.&lt;/p&gt;
&lt;p&gt;In reaction&#39;s &lt;em&gt;state directory&lt;/em&gt; (probably &lt;code&gt;/var/lib/reaction&lt;/code&gt;), the following files can be deleted:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;reaction-matches.db&lt;/code&gt;, &lt;code&gt;reaction-flushes.db&lt;/code&gt; (v1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;data&lt;/code&gt; directory (v2.0.0-rc2)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The v2 uses a standalone file called &lt;code&gt;reaction.db&lt;/code&gt;, in JSONL format (a JSON object per line)&lt;/p&gt;
&lt;h2 id=&quot;tada-new-features&quot;&gt;🎉 New features&lt;a class=&quot;zola-anchor&quot; href=&quot;#tada-new-features&quot; aria-label=&quot;Anchor link for: tada-new-features&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The rewrite was the main goal, but some additions came up in this new version!&lt;/p&gt;
&lt;h3 id=&quot;configuration-directory&quot;&gt;Configuration directory&lt;a class=&quot;zola-anchor&quot; href=&quot;#configuration-directory&quot; aria-label=&quot;Anchor link for: configuration-directory&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Main real addition for sysadmins, reaction now supports splitting configuration across multiple files.
Convenient when configuration is generated with &lt;strong&gt;Infra as Code&lt;/strong&gt; tools, or when you just like having multiple files.&lt;/p&gt;
&lt;p&gt;This feature is &lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me/faq&quot;&gt;documented in the wiki&#39;s FAQ&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;shell-command-line&quot;&gt;🐚 Command Line&lt;a class=&quot;zola-anchor&quot; href=&quot;#shell-command-line&quot; aria-label=&quot;Anchor link for: shell-command-line&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The CLI is the same, but more flexible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Argument order is less strict,&lt;/li&gt;
&lt;li&gt;Each subcommand has its own &lt;code&gt;--help&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;shell-shell-shell-completions-man-pages&quot;&gt;🐚🐚 Shell completions &amp;amp; man pages&lt;a class=&quot;zola-anchor&quot; href=&quot;#shell-shell-shell-completions-man-pages&quot; aria-label=&quot;Anchor link for: shell-shell-shell-completions-man-pages&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Shell completions are now available for bash, zsh and fish.
Man pages for the CLI, a bit more detailed than &lt;code&gt;--help&lt;/code&gt;, are available too.&lt;/p&gt;
&lt;h3 id=&quot;package-packaging&quot;&gt;📦 Packaging&lt;a class=&quot;zola-anchor&quot; href=&quot;#package-packaging&quot; aria-label=&quot;Anchor link for: package-packaging&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;reaction binaries are now available for 2 architectures: amd64 (x86-64) and arm64.&lt;/p&gt;
&lt;p&gt;For each architecture, a &lt;code&gt;.tar&lt;/code&gt; archive and a Debian package are available.
Both of them contain:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;reaction&lt;/code&gt;, &lt;code&gt;ip46tables&lt;/code&gt; and &lt;code&gt;nft46&lt;/code&gt; binaries&lt;/li&gt;
&lt;li&gt;man pages and shell completions&lt;/li&gt;
&lt;li&gt;a systemd service file.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionnally, the .tar contains a Makefile to install the other files.&lt;/p&gt;
&lt;h2 id=&quot;crystal-ball-upcoming-features&quot;&gt;🔮 Upcoming features&lt;a class=&quot;zola-anchor&quot; href=&quot;#crystal-ball-upcoming-features&quot; aria-label=&quot;Anchor link for: crystal-ball-upcoming-features&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;missing-features-from-issues&quot;&gt;Missing features from issues&lt;a class=&quot;zola-anchor&quot; href=&quot;#missing-features-from-issues&quot; aria-label=&quot;Anchor link for: missing-features-from-issues&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Now that the foundations are here, I&#39;ll finally be able to add new features,
including the most requested by reaction users:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Better IP address support (&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/79&quot;&gt;#79&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Configurable duplicates management (&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/68&quot;&gt;#68&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&quot;One shot&quot; actions (including for alerting) (&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/92&quot;&gt;#92&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Ban command (&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/93&quot;&gt;#93&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;More complete support for the NixOS distribution (upstreaming a module)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;documentation&quot;&gt;Documentation&lt;a class=&quot;zola-anchor&quot; href=&quot;#documentation&quot; aria-label=&quot;Anchor link for: documentation&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;At the same time, I want to improve documentation, by writing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a complete &lt;strong&gt;reference&lt;/strong&gt; of &lt;strong&gt;configuration&lt;/strong&gt; options&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;a step-by-step guide&lt;/strong&gt; for writing one&#39;s own configuration&lt;/li&gt;
&lt;li&gt;more configuration examples for common services&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;plugin-system&quot;&gt;Plugin system&lt;a class=&quot;zola-anchor&quot; href=&quot;#plugin-system&quot; aria-label=&quot;Anchor link for: plugin-system&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Once this is done, I&#39;ll work on a second big step: adding a &lt;strong&gt;plugin system&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This system will allow anyone to &lt;strong&gt;extend reaction&lt;/strong&gt;, without modifying the core code.&lt;/p&gt;
&lt;p&gt;It&#39;s already possible to do what you want with reaction, by using custom scripts in streams&#39; and actions&#39; commands.
But it can be &lt;strong&gt;inefficient&lt;/strong&gt; or hacky for complicated things, or to bridge reaction to other systems.&lt;/p&gt;
&lt;p&gt;For example, if you want to write IPs in a PostgreSQL database, you can write something along this:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  insert_psql:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;psql&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,  &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;HOST&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-U&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INSERT INTO ips (ip) VALUES(&amp;lt;ip&amp;gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It works, but it isn&#39;t optimized.
This example will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Execute a PostgreSQL client, which:&lt;/li&gt;
&lt;li&gt;Opens a session with the server&lt;/li&gt;
&lt;li&gt;Authenticates&lt;/li&gt;
&lt;li&gt;Inserts a line (⚠️ sensitive to SQL injections in this minimal example: see the &lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me/actions/postgresql&quot;&gt;wiki&lt;/a&gt; for a secured version)&lt;/li&gt;
&lt;li&gt;Closes the session.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A PostgreSQL plugin could allow for &lt;strong&gt;keeping a session open&lt;/strong&gt;, and to just insert the line.&lt;/p&gt;
&lt;p&gt;Fictional example:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  insert_psql:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    plugin:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;psql&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    options:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      host:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;HOST&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      user:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      query:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INSERT INTO ips (ip) VALUES(%1)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      params:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;        &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%1&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I don&#39;t plan to write database plugins! This will be left to others but should be easy.&lt;/p&gt;
&lt;h4 id=&quot;json&quot;&gt;JSON&lt;a class=&quot;zola-anchor&quot; href=&quot;#json&quot; aria-label=&quot;Anchor link for: json&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;A lot of programs can log &lt;strong&gt;structured data&lt;/strong&gt;, whether it&#39;s in JSON, or by using journald format (which &lt;code&gt;journalctl&lt;/code&gt; can then print in JSON).&lt;/p&gt;
&lt;p&gt;It&#39;s possible to write regexes to process JSON, but it&#39;s tedious and error-prone.&lt;/p&gt;
&lt;p&gt;A JSON plugin would permit to replace a reaction filter&#39;s regex by more &lt;strong&gt;advanced methods&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;clustering&quot;&gt;Clustering&lt;a class=&quot;zola-anchor&quot; href=&quot;#clustering&quot; aria-label=&quot;Anchor link for: clustering&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;reaction works alone for now.&lt;/p&gt;
&lt;p&gt;But it would be great if it could work in a &lt;strong&gt;cluster of multiple reaction instances&lt;/strong&gt;, on different machines. They could exchange messages, like IPs to ban.&lt;/p&gt;
&lt;p&gt;A clustering plugin will enable this.&lt;/p&gt;
&lt;p&gt;I guess this will be the &lt;strong&gt;most work&lt;/strong&gt; intensive plugin for me ^^&lt;/p&gt;
&lt;h4 id=&quot;http-soft-ban&quot;&gt;HTTP soft ban&lt;a class=&quot;zola-anchor&quot; href=&quot;#http-soft-ban&quot; aria-label=&quot;Anchor link for: http-soft-ban&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;When responding to attacks, for now reaction completely bans the IP at the &lt;strong&gt;firewall level&lt;/strong&gt;.
It&#39;s effective, but it can be a source of misunderstanding when there are false positives and a legit user finds themself banned.&lt;/p&gt;
&lt;p&gt;To fix this, I want to write a plugin that spawns an &lt;strong&gt;HTTP middleware&lt;/strong&gt; server, which places itself between the reverse proxy and the application server:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It would &lt;strong&gt;serve content transparently&lt;/strong&gt; for legit IPs, from the reverse proxy to the application server.&lt;/li&gt;
&lt;li&gt;It would show a &lt;strong&gt;user-friendly ban message&lt;/strong&gt; to banned IPs, effectively blocking traffic from the reverse proxy to the application server.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;I&#39;ve wanted to do this for &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/103#http-soft-ban-plugin&quot;&gt;some time&lt;/a&gt;, and some people were skeptical on this implementation choice. Since then, the same choice has been made for &lt;a rel=&quot;external&quot; href=&quot;https://anubis.techaro.lol&quot;&gt;&lt;strong&gt;Anubis&lt;/strong&gt;&lt;/a&gt;, a bot protection software which can be used alongside reaction!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;firewall&quot;&gt;Firewall&lt;a class=&quot;zola-anchor&quot; href=&quot;#firewall&quot; aria-label=&quot;Anchor link for: firewall&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;iptables&lt;/code&gt; and &lt;code&gt;nftables&lt;/code&gt; commands aren&#39;t efficient when a lot of them are launched at the same time.
This can cause an additional pressure on a server when it&#39;s attacked.&lt;/p&gt;
&lt;p&gt;A plugin that&#39;d start one command, able to stream firewall actions would &lt;strong&gt;reduce&lt;/strong&gt; this &lt;strong&gt;load&lt;/strong&gt; a lot.&lt;/p&gt;
&lt;h2 id=&quot;moneybag-nlnet&quot;&gt;💰 NLnet&lt;a class=&quot;zola-anchor&quot; href=&quot;#moneybag-nlnet&quot; aria-label=&quot;Anchor link for: moneybag-nlnet&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I applied for an &lt;strong&gt;NLnet grant&lt;/strong&gt; in June 2024, to be able to give more time to reaction.
I received an &lt;strong&gt;agreement&lt;/strong&gt; in January!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All upcoming features&lt;/strong&gt; described in this article will be financed by the foundation.
I&#39;ll be able to give a lot to reaction, while still managing to pay my rent 😄&lt;/p&gt;
&lt;p&gt;That&#39;s great news 🎉&lt;/p&gt;
&lt;p&gt;As a treat, the NLnet fund includes a &lt;strong&gt;security audit&lt;/strong&gt;, which is really important for such software.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://nlnet.nl&quot;&gt;The NLnet foundation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://nlnet.nl/project/Reaction/&quot;&gt;Reaction&#39;s project Page @ NLnet&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;handshake-how-to-contribute&quot;&gt;🤝 How to contribute&lt;a class=&quot;zola-anchor&quot; href=&quot;#handshake-how-to-contribute&quot; aria-label=&quot;Anchor link for: handshake-how-to-contribute&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use reaction 😄&lt;/p&gt;
&lt;p&gt;If you have a problem, or ideas, several spaces are available to talk about it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues&quot;&gt;reaction issues on Framagit&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Matrix development rooms :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-dev-en:club1.fr&quot;&gt;English&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-dev-fr:club1.fr&quot;&gt;French&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Matrix support rooms :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-users-en:club1.fr&quot;&gt;English&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-users-fr:club1.fr&quot;&gt;French&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ping &lt;a rel=&quot;external&quot; href=&quot;https://mamot.fr/@ppom&quot;&gt;@ppom@mamot.fr&lt;/a&gt; on the Fediverse&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And &lt;strong&gt;your configurations&lt;/strong&gt; are gladly welcomed on the
&lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me&quot;&gt;wiki&lt;/a&gt;!
Don&#39;t hesitate to create a merge request
(or even to put your code in an issue if you&#39;re lazy)
on the &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction-wiki&quot;&gt;Git repo&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;heart-hands-thanks&quot;&gt;🫶 Thanks&lt;a class=&quot;zola-anchor&quot; href=&quot;#heart-hands-thanks&quot; aria-label=&quot;Anchor link for: heart-hands-thanks&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Thanks to &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/bcareil&quot;&gt;@bcareil&lt;/a&gt; who wrote the configuration directory feature, and corrected other problems in the Rust implementation!&lt;/p&gt;
&lt;p&gt;Thanks to M for their help and advice on the advanced features of Rust (it&#39;s complicated ^^).&lt;/p&gt;
&lt;p&gt;Thanks to Bertille for her listening and her advice on technical choices and on project management.&lt;/p&gt;
&lt;p&gt;Thanks to the Rustaceans of &lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-dev-fr:club1.fr&quot;&gt;#reaction-dev-fr:club1.fr&lt;/a&gt; for their views on the database choice.&lt;/p&gt;
&lt;p&gt;Thanks to &lt;a rel=&quot;external&quot; href=&quot;https://ls.fiat-tux.fr&quot;&gt;Luc&lt;/a&gt; for help on Debian packaging.&lt;/p&gt;
&lt;p&gt;Thanks to all people contributing ideas and reporting problems in the issues.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>reaction v2 : Rust &amp; NLnet</title>
        <published>2025-06-02T00:00:00+00:00</published>
        <updated>2025-06-02T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/fr-reaction-v2/"/>
        <id>https://blog.ppom.me/fr-reaction-v2/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/fr-reaction-v2/">&lt;p&gt;&lt;em&gt;This article is also &lt;a href=&quot;/en-reaction-v2&quot;&gt;available in 🇬🇧 english&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Pour une introduction à reaction, voir &lt;a href=&quot;/fr-reaction&quot;&gt;l&#39;article précédent à ce sujet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;J&#39;ai le plaisir de vous annoncer la publication de &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/releases/v2.0.0&quot;&gt;reaction v2.0.0&lt;/a&gt; !&lt;/p&gt;
&lt;p&gt;Cette nouvelle version apporte peu de nouvelles fonctionnalités, mais ouvre la voie pour un futur radieux à reaction 🌞&lt;/p&gt;
&lt;h2 id=&quot;tl-dr&quot;&gt;TL;DR&lt;a class=&quot;zola-anchor&quot; href=&quot;#tl-dr&quot; aria-label=&quot;Anchor link for: tl-dr&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Au programme de cet article :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Réécriture en Rust&lt;/li&gt;
&lt;li&gt;Benchmark&lt;/li&gt;
&lt;li&gt;Incompatibilités de la v1 à la v2&lt;/li&gt;
&lt;li&gt;Nouvelles fonctionnalités&lt;/li&gt;
&lt;li&gt;Fonctionnalités à venir&lt;/li&gt;
&lt;li&gt;Support de NLnet&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;crab-reecriture-en-rust&quot;&gt;🦀 Réécriture en Rust&lt;a class=&quot;zola-anchor&quot; href=&quot;#crab-reecriture-en-rust&quot; aria-label=&quot;Anchor link for: crab-reecriture-en-rust&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;J&#39;ai entamé il y a un an une réécriture complète de reaction en Rust, avec pour objectifs :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Une meilleure &lt;strong&gt;performance&lt;/strong&gt; et une meilleure &lt;strong&gt;robustesse&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Un langage plus en vogue, pour attirer les &lt;strong&gt;contributions&lt;/strong&gt; et profiter d&#39;un meilleur &lt;strong&gt;écosystème de librairies&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Un langage plus adapté à la création d&#39;un &lt;strong&gt;système de plugins&lt;/strong&gt; performant (voir plus bas)&lt;/li&gt;
&lt;li&gt;Écrire des tests pour la majorité de la codebase.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Après de nombreux rebondissements, j&#39;ai enfin une réimplémentation de reaction qui me satisfait pleinement.
La première version fonctionnelle était prête en octobre, mais cette réécriture a été l&#39;occasion pour moi de continuer de tester des systèmes internes différents.&lt;/p&gt;
&lt;p&gt;J&#39;ai notamment passé les mois de février et de mai à tester plusieurs systèmes de base de données, qui ne me satisfaisaient pas, jusqu&#39;à réécrire ma propre implémentation. Il y a maintenant un mini-redis embarqué dans reaction !&lt;/p&gt;
&lt;h2 id=&quot;bar-chart-benchmark&quot;&gt;📊 Benchmark&lt;a class=&quot;zola-anchor&quot; href=&quot;#bar-chart-benchmark&quot; aria-label=&quot;Anchor link for: bar-chart-benchmark&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Puisqu&#39;on aime toustes la &lt;em&gt;data&lt;/em&gt;, voici le résultat d&#39;un benchmark.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ce benchmark n&#39;est pas du tout réaliste,
il envoie 4 flux d&#39;un million de logs chacun le plus rapidement possible,
demandant à reaction de traiter toutes ces lignes,
et de réaliser environ 6000 actions (un &lt;code&gt;sleep 0.1&lt;/code&gt;).
Il permet de donner une idée de comment &lt;em&gt;réagit&lt;/em&gt; reaction à un stress énorme.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Bien sûr, tous les tests sont à prendre avec un grain de sel,
car ils ne permettent pas de tester la vie réelle.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Les statistiques sont produites par systemd.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Version Go, &lt;code&gt;v1.4.1&lt;/code&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Service runtime: 2min 10.024s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CPU time consumed: 6min 47.643s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Memory peak: 13.6G (swap: 6.6G)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IO bytes read: 18.5G written: 21.3G&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Version Rust, &lt;code&gt;v2.0.0&lt;/code&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Service runtime: 42.235s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CPU time consumed: 4min 27.828s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Memory peak: 4.3G (swap: 0B)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IO bytes written: 499.9M&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ces tests ont été effectués sur un PC avec un SSD NVME tout neuf et 16G de RAM.
Les différences en écriture disque auraient un plus gros impact sur un disque moins performant.
Les différence en temps total auraient sûrement été moins importantes si reaction Go n&#39;avait pas eu à swapper.&lt;/p&gt;
&lt;p&gt;Il faut noter que les différences de performance ne sont pas imputables qu&#39;au langage de programmation utilisé, mais aussi voire surtout aux choix techniques qui sont faits pour la communication entre les composants du système, la base de données (même structure générale mais avec des différences d&#39;implémentation), etc.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Pour preuve, la première version de la réécriture, calquée sur le modèle de goroutines et channels proposé par Go, et moins adapté à Rust, avait des performances bien moins bonnes que la version Go.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;gear-incompatibilites&quot;&gt;⚙️ Incompatibilités&lt;a class=&quot;zola-anchor&quot; href=&quot;#gear-incompatibilites&quot; aria-label=&quot;Anchor link for: gear-incompatibilites&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Les différences de comportement entre reaction v1 et reaction v2 sont peu nombreuses.&lt;/p&gt;
&lt;p&gt;Ces changements peuvent créer des effets de bord dans certains cas :&lt;/p&gt;
&lt;h3 id=&quot;adult-school-evaluation-de-la-configuration&quot;&gt;🧑‍🏫 Évaluation de la configuration&lt;a class=&quot;zola-anchor&quot; href=&quot;#adult-school-evaluation-de-la-configuration&quot; aria-label=&quot;Anchor link for: adult-school-evaluation-de-la-configuration&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Le chargement de la configuration est plus strict sur reaction v2, qui détecte notamment les champs mal nommés, auparavant ignorés.&lt;/p&gt;
&lt;p&gt;En cas de configuration incorrecte, une erreur intelligible sera levée au lancement.&lt;/p&gt;
&lt;p&gt;Une nouvelle commande, &lt;code&gt;reaction test-config&lt;/code&gt;, permet même de tester la configuration en amont.&lt;/p&gt;
&lt;h3 id=&quot;straight-ruler-moteur-de-regex&quot;&gt;📏 Moteur de regex&lt;a class=&quot;zola-anchor&quot; href=&quot;#straight-ruler-moteur-de-regex&quot; aria-label=&quot;Anchor link for: straight-ruler-moteur-de-regex&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Les librairies Go et Rust pour les regex comportent quelques différences de syntaxe pour des fonctions avancées.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/google/re2/wiki/Syntax&quot;&gt;Syntaxe v1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://docs.rs/regex/latest/regex/#syntax&quot;&gt;Syntaxe v2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;fountain-streams&quot;&gt;⛲ Streams&lt;a class=&quot;zola-anchor&quot; href=&quot;#fountain-streams&quot; aria-label=&quot;Anchor link for: fountain-streams&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Auparavant, reaction ne lisait que la sortie stdout des commandes lancées.&lt;/p&gt;
&lt;p&gt;Maintenant, les sorties stdout et stderr sont lues.&lt;/p&gt;
&lt;h3 id=&quot;open-file-folder-base-de-donnees&quot;&gt;📂 Base de données&lt;a class=&quot;zola-anchor&quot; href=&quot;#open-file-folder-base-de-donnees&quot; aria-label=&quot;Anchor link for: open-file-folder-base-de-donnees&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Les formats de base de données de la v1 et la v2 sont incompatibles.&lt;/p&gt;
&lt;p&gt;Les données stockées (matches, actions en cours) seront perdues.&lt;/p&gt;
&lt;p&gt;Dans le &lt;em&gt;state directory&lt;/em&gt; de reaction (probablement &lt;code&gt;/var/lib/reaction&lt;/code&gt;), les fichiers suivants peuvent être supprimés :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;reaction-matches.db&lt;/code&gt;, &lt;code&gt;reaction-flushes.db&lt;/code&gt; (v1)&lt;/li&gt;
&lt;li&gt;le dossier &lt;code&gt;data&lt;/code&gt; (v2.0.0-rc2)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;La v2 utilise un fichier unique appelé &lt;code&gt;reaction.db&lt;/code&gt;, au format JSONL (un objet JSON par ligne)&lt;/p&gt;
&lt;h2 id=&quot;tada-nouvelles-fonctionnalites&quot;&gt;🎉 Nouvelles fonctionnalités&lt;a class=&quot;zola-anchor&quot; href=&quot;#tada-nouvelles-fonctionnalites&quot; aria-label=&quot;Anchor link for: tada-nouvelles-fonctionnalites&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;La réécriture était l&#39;objectif principal, mais quelques ajouts se sont glissés dans cette nouvelle version !&lt;/p&gt;
&lt;h3 id=&quot;dossier-de-configuration&quot;&gt;Dossier de configuration&lt;a class=&quot;zola-anchor&quot; href=&quot;#dossier-de-configuration&quot; aria-label=&quot;Anchor link for: dossier-de-configuration&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Principal ajout réel pour les admins, reaction supporte à présent une configuration répartie en plusieurs fichiers.
Bien pratique quand on génère de la configuration avec des outils d&#39;&lt;strong&gt;Infra as Code&lt;/strong&gt;, ou quand on aime mettre les petits plats dans les grands.&lt;/p&gt;
&lt;p&gt;Cette fonctionnalité est &lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me/faq&quot;&gt;documentée dans la FAQ du wiki&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;shell-ligne-de-commande&quot;&gt;🐚 Ligne de commande&lt;a class=&quot;zola-anchor&quot; href=&quot;#shell-ligne-de-commande&quot; aria-label=&quot;Anchor link for: shell-ligne-de-commande&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;L&#39;interface en ligne de commande est la même, mais plus flexible :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;L&#39;ordre des arguments est moins strict,&lt;/li&gt;
&lt;li&gt;Chaque sous-commande a son propre &lt;code&gt;--help&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;shell-shell-completions-shell-man-pages&quot;&gt;🐚🐚 Complétions shell &amp;amp; Man pages&lt;a class=&quot;zola-anchor&quot; href=&quot;#shell-shell-completions-shell-man-pages&quot; aria-label=&quot;Anchor link for: shell-shell-completions-shell-man-pages&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Des complétions shell sont maintenant disponibles pour bash, zsh et fish.
Des pages de manuel pour la CLI légèrement plus fournies que l&#39;aide de &lt;code&gt;--help&lt;/code&gt;, sont également crées.&lt;/p&gt;
&lt;h3 id=&quot;package-packaging&quot;&gt;📦 Packaging&lt;a class=&quot;zola-anchor&quot; href=&quot;#package-packaging&quot; aria-label=&quot;Anchor link for: package-packaging&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;reaction est maintenant précompilé pour 2 architectures: amd64 (x86-64) et arm64.&lt;/p&gt;
&lt;p&gt;Pour chaque architecture, une archive &lt;code&gt;.tar&lt;/code&gt; et un paquet debian sont disponibles.
Chacun d&#39;entre eux contient :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Les binaires : &lt;code&gt;reaction&lt;/code&gt;, &lt;code&gt;ip46tables&lt;/code&gt; et &lt;code&gt;nft46&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Les pages de manuel et les complétions shell&lt;/li&gt;
&lt;li&gt;Un fichier de service systemd&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;De plus, le .tar contient un Makefile pour installer les fichiers précédents.&lt;/p&gt;
&lt;!--
Reaction is now compiled for 2 architectures: amd64 (x86-64) and arm64.

For each architecture, a `.tar` archive and a debian package are provided.
Each of them contain:

- the reaction, ip46tables and nft46 binaries
- man pages and shell completion
- a systemd service file

Additionnally, the .tar contains a Makefile for installing the previous files.
--&gt;
&lt;h2 id=&quot;crystal-ball-fonctionnalites-a-venir&quot;&gt;🔮 Fonctionnalités à venir&lt;a class=&quot;zola-anchor&quot; href=&quot;#crystal-ball-fonctionnalites-a-venir&quot; aria-label=&quot;Anchor link for: crystal-ball-fonctionnalites-a-venir&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;ajout-de-fonctionnalites-manquantes&quot;&gt;Ajout de fonctionnalités manquantes&lt;a class=&quot;zola-anchor&quot; href=&quot;#ajout-de-fonctionnalites-manquantes&quot; aria-label=&quot;Anchor link for: ajout-de-fonctionnalites-manquantes&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Maintenant que les fondations sont posées, je vais enfin ajouter de nouvelles fonctionnalités, pour la plupart demandées par des utilisateurs et utilisatrices de reaction :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Meilleur support des adresses IP (&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/79&quot;&gt;#79&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Gestion paramétrable des duplicatas (&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/68&quot;&gt;#68&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Actions &quot;one shot&quot; (pour l&#39;alerting notamment) (&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/92&quot;&gt;#92&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Commande de ban (&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/93&quot;&gt;#93&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Support plus complet pour la distribution NixOS (ajout d&#39;un module)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;documentation&quot;&gt;Documentation&lt;a class=&quot;zola-anchor&quot; href=&quot;#documentation&quot; aria-label=&quot;Anchor link for: documentation&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;En parallèle, je compte améliorer la documentation, en écrivant :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;une &lt;strong&gt;référence&lt;/strong&gt; complète des options de &lt;strong&gt;configuration&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;un &lt;strong&gt;guide pas à pas&lt;/strong&gt; pour la configuration d&#39;un nouveau filtre&lt;/li&gt;
&lt;li&gt;plus d&#39;exemples de config toute prête pour des services courants&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;systeme-de-plugins&quot;&gt;Système de plugins&lt;a class=&quot;zola-anchor&quot; href=&quot;#systeme-de-plugins&quot; aria-label=&quot;Anchor link for: systeme-de-plugins&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Une fois ces améliorations faites, je vais me lancer dans un second gros chantier : ajouter un &lt;strong&gt;système de plugins&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Ce système permettra à d&#39;autres personnes d&#39;&lt;strong&gt;étendre reaction&lt;/strong&gt;, sans toucher au cœur du code.&lt;/p&gt;
&lt;p&gt;Il est déjà possible de faire à peu près ce qu&#39;on veut avec reaction, en utilisant des scripts custom comme commande d&#39;un stream ou d&#39;une action.
Mais ça peut vite être &lt;strong&gt;inefficace&lt;/strong&gt; ou dégueu pour des choses compliquées, ou pour se connecter à d&#39;autres systèmes.&lt;/p&gt;
&lt;p&gt;Par exemple, si on veut entrer des IPs dans PostgreSQL, on peut créer une action comme ça :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  insert_psql:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;psql&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,  &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;HOST&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-U&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INSERT INTO ips (ip) VALUES(&amp;lt;ip&amp;gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ça fonctionne, mais ce n&#39;est pas optimisé.
Cet exemple va :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lancer un client PostgreSQL&lt;/li&gt;
&lt;li&gt;Qui va ouvrir une session avec le serveur&lt;/li&gt;
&lt;li&gt;S&#39;authentifier&lt;/li&gt;
&lt;li&gt;Insérer une ligne (⚠️ sensible aux injections SQL dans ce cas minimal : voir &lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me/actions/postgresql&quot;&gt;le wiki&lt;/a&gt; pour une version sécurisée)&lt;/li&gt;
&lt;li&gt;Fermer la session.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Avoir un plugin PostgreSQL permettrait de garder une session ouverte avec le serveur, et de n&#39;avoir qu&#39;à insérer la ligne.&lt;/p&gt;
&lt;p&gt;Exemple (fictif) :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  insert_psql:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    plugin:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;psql&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    options:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      host:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;HOST&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      user:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      query:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INSERT INTO ips (ip) VALUES(%1)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      params:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;        &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;%1&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Je n&#39;ai pas prévu d&#39;écrire moi-même des plugins pour des bases de données cependant ! Ce travail est laissé à d&#39;autres, mais ça devrait être simple.&lt;/p&gt;
&lt;h4 id=&quot;json&quot;&gt;JSON&lt;a class=&quot;zola-anchor&quot; href=&quot;#json&quot; aria-label=&quot;Anchor link for: json&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;De nombreux programmes permettent de loguer des &lt;strong&gt;données structurées&lt;/strong&gt;, que ce soit en JSON,
ou en utilisant le format de journald, (que &lt;code&gt;journalctl&lt;/code&gt; peut ensuite afficher en JSON).&lt;/p&gt;
&lt;p&gt;C&#39;est possible de faire des regex sur du JSON, mais c&#39;est désagréable et source potentielle d&#39;erreurs.&lt;/p&gt;
&lt;p&gt;Un plugin JSON pourrait remplacer les regex d&#39;un filter reaction par des &lt;strong&gt;méthodes&lt;/strong&gt; plus &lt;strong&gt;avancées&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;clustering&quot;&gt;Clustering&lt;a class=&quot;zola-anchor&quot; href=&quot;#clustering&quot; aria-label=&quot;Anchor link for: clustering&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Pour l&#39;instant reaction fonctionne en solo.&lt;/p&gt;
&lt;p&gt;Mais ce serait super qu&#39;il puisse fonctionner en bande, pour que &lt;strong&gt;plusieurs instances de reaction&lt;/strong&gt;,
sur des machines différentes, puissent s&#39;échanger des messages, comme des IPs à bannir.&lt;/p&gt;
&lt;p&gt;Un plugin de clustering permettra ça.&lt;/p&gt;
&lt;p&gt;Je pense que ce sera le plugin qui demandera &lt;strong&gt;le plus de travail&lt;/strong&gt; ^^&lt;/p&gt;
&lt;h4 id=&quot;http-soft-ban&quot;&gt;HTTP soft ban&lt;a class=&quot;zola-anchor&quot; href=&quot;#http-soft-ban&quot; aria-label=&quot;Anchor link for: http-soft-ban&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;En cas d&#39;attaque, la réponse actuelle de reaction est de bannir l&#39;IP complètement &lt;strong&gt;au niveau du firewall&lt;/strong&gt;.
C&#39;est efficace, mais ça peut être source d&#39;incompréhension en cas de faux positif, quand une personne légitime se retrouve bannie.&lt;/p&gt;
&lt;p&gt;Un plugin qui crée un &lt;strong&gt;middleware HTTP&lt;/strong&gt;, c&#39;est à dire un serveur HTTP qui se place entre le reverse proxy et le serveur applicatif,
pourrait corriger ce problème :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Il serait &lt;strong&gt;complètement transparent&lt;/strong&gt; pour les IPs légitimes, et passerait le trafic entre le reverse proxy et le serveur applicatif.&lt;/li&gt;
&lt;li&gt;Il afficherait un &lt;strong&gt;message user-friendly&lt;/strong&gt; aux IPs bloquées, bloquant le trafic du reverse proxy vers le serveur applicatif.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;J&#39;ai envie de faire ça depuis &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues/103#http-soft-ban-plugin&quot;&gt;un bon moment&lt;/a&gt;, et plusieurs personnes se sont montrées dubitatives quand à ce choix d&#39;implémentation. C&#39;est cependant le choix qui a été récemment fait pour &lt;a rel=&quot;external&quot; href=&quot;https://anubis.techaro.lol&quot;&gt;&lt;strong&gt;Anubis&lt;/strong&gt;&lt;/a&gt;, un logiciel de protection contre les bots qui peut être utilisé de concert avec reaction !&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;firewall&quot;&gt;Firewall&lt;a class=&quot;zola-anchor&quot; href=&quot;#firewall&quot; aria-label=&quot;Anchor link for: firewall&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Les commandes d&#39;&lt;code&gt;iptables&lt;/code&gt; et &lt;code&gt;nftables&lt;/code&gt; sont peu efficaces quand de nombreuses sont lancées en parallèle.
Ça peut causer une pression supplémentaire sur le serveur en cas d&#39;attaque.&lt;/p&gt;
&lt;p&gt;Un plugin qui maintiendrait une seule commande capable de streamer les actions de firewall à réaliser &lt;strong&gt;réduirait&lt;/strong&gt; de beaucoup cette &lt;strong&gt;charge&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;moneybag-nlnet&quot;&gt;💰 NLnet&lt;a class=&quot;zola-anchor&quot; href=&quot;#moneybag-nlnet&quot; aria-label=&quot;Anchor link for: moneybag-nlnet&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Dans le but de pouvoir dédier plus de temps à reaction, j&#39;ai fait une demande de bourse à NLnet en juin 2024.
J&#39;ai reçu la validation de cette bourse en janvier !&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Toutes les fonctionnalités à venir&lt;/strong&gt; décrites dans cet article seront financées par la fondation,
me permettant de m&#39;y consacrer pleinement tout en payant mon loyer 😄&lt;/p&gt;
&lt;p&gt;C&#39;est une super nouvelle 🎉&lt;/p&gt;
&lt;p&gt;En bonus, cette bourse inclut un &lt;strong&gt;audit de sécurité&lt;/strong&gt;, ce qui est spécialement important pour un logiciel comme celui-ci.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://nlnet.nl&quot;&gt;La fondation NLnet&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://nlnet.nl/project/Reaction/&quot;&gt;La page du projet Reaction @ NLnet&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;handshake-comment-participer&quot;&gt;🤝 Comment participer ?&lt;a class=&quot;zola-anchor&quot; href=&quot;#handshake-comment-participer&quot; aria-label=&quot;Anchor link for: handshake-comment-participer&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Utilisez reaction 😄&lt;/p&gt;
&lt;p&gt;En cas de problème, ou d&#39;idées, plusieurs espaces sont ouverts pour en discuter :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/issues&quot;&gt;Les issues de reaction sur Framagit&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Les rooms Matrix de développement :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-dev-en:club1.fr&quot;&gt;Anglais&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-dev-fr:club1.fr&quot;&gt;Français&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Les rooms Matrix de support :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-users-en:club1.fr&quot;&gt;Anglais&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-users-fr:club1.fr&quot;&gt;Français&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ping &lt;a rel=&quot;external&quot; href=&quot;https://mamot.fr/@ppom&quot;&gt;@ppom@mamot.fr&lt;/a&gt; sur le Fediverse&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Et &lt;strong&gt;vos configurations&lt;/strong&gt; sont plus que bienvenues sur le
&lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me&quot;&gt;wiki&lt;/a&gt; !
N&#39;hésitez pas à proposer une merge request
(ou même à la poser dans une issue si flemme)
sur le &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction-wiki&quot;&gt;dépôt Git&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;heart-hands-remerciements&quot;&gt;🫶 Remerciements&lt;a class=&quot;zola-anchor&quot; href=&quot;#heart-hands-remerciements&quot; aria-label=&quot;Anchor link for: heart-hands-remerciements&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Merci à &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/bcareil&quot;&gt;@bcareil&lt;/a&gt; qui a écrit la fonctionnalité du dossier de configuration et corrigé d&#39;autres problèmes dans l&#39;implémentation Rust !&lt;/p&gt;
&lt;p&gt;Merci à M pour son aide et ses conseils avisés dans les fonctionnalités avancées de Rust (cé compliqué).&lt;/p&gt;
&lt;p&gt;Merci à Bertille pour son écoute et son avis sur les choix techniques et la gestion de projet.&lt;/p&gt;
&lt;p&gt;Merci aux Rustacéens de &lt;a rel=&quot;external&quot; href=&quot;https://matrix.to/#/#reaction-dev-fr:club1.fr&quot;&gt;#reaction-dev-fr:club1.fr&lt;/a&gt; pour leurs remarques judicieuses sur les choix de base de données.&lt;/p&gt;
&lt;p&gt;Merci à &lt;a rel=&quot;external&quot; href=&quot;https://ls.fiat-tux.fr&quot;&gt;Luc&lt;/a&gt; pour l&#39;aide au packaging Debian.&lt;/p&gt;
&lt;p&gt;Merci aux gens qui ont donnée des idées et alerté sur des problèmes dans les issues.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://www.acceptess-t.com/fast&quot;&gt;Faire un don 💌&lt;/a&gt;&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Confidentialité : par où commencer ?</title>
        <published>2025-05-27T00:00:00+00:00</published>
        <updated>2025-05-27T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/privacy/"/>
        <id>https://blog.ppom.me/privacy/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/privacy/">&lt;p&gt;Tu cherches à quitter un max les GAFAM, pour plus de vie privée, de libertés numériques, de confidentialité, d&#39;indépendance vis-à-vis des USA ?
Tu as un peu de motivation ?&lt;/p&gt;
&lt;p&gt;Cet article est là pour ça. Il ne s&#39;attardera pas vraiment sur le &lt;em&gt;pourquoi&lt;/em&gt;, mais surtout sur le &lt;em&gt;comment&lt;/em&gt;. Parce que c&#39;est souvent ça qui manque quand on est pas geek (moi si 😇).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;J&#39;ai créé cet article de blog à partir d&#39;une conversation que j&#39;ai eu avec une amie qui me demandait des conseils pour sortir des GAFAMs.&lt;/em&gt;
&lt;em&gt;En voici une version mise en forme !&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Cet article est long, tout n&#39;est pas faisable en une aprem. Vas-y tranquillement, te mets pas la pression, et fais bien ce qu&#39;il te plait !&lt;/em&gt;
&lt;em&gt;J&#39;utilise parfois l&#39;impératif par facilité, mais tu fais bien ce que tu veux bien sûr. Ce n&#39;est que mon avis sur la question.&lt;/em&gt;
&lt;em&gt;Ça me donne une ressource à envoyer aux personnes qui me posent des questions, que je complèterai sûrement au fil du temps.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;1-navigateur-globe-with-meridians&quot;&gt;1. Navigateur 🌐&lt;a class=&quot;zola-anchor&quot; href=&quot;#1-navigateur-globe-with-meridians&quot; aria-label=&quot;Anchor link for: 1-navigateur-globe-with-meridians&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Selon moi, la première étape, la plus facile, c&#39;est de changer de navigateur.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Cliquer pour ouvrir&lt;/summary&gt;
&lt;p&gt;Tu sais, c&#39;est l&#39;appli qui te permet de consulter des sites webs, services en ligne...
C&#39;est souvent &lt;strong&gt;Google Chrome&lt;/strong&gt; par défaut.&lt;/p&gt;
&lt;h3 id=&quot;installer-firefox&quot;&gt;Installer Firefox&lt;a class=&quot;zola-anchor&quot; href=&quot;#installer-firefox&quot; aria-label=&quot;Anchor link for: installer-firefox&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Firefox&lt;/strong&gt; est un navigateur très bon en termes de confidentialité.&lt;/p&gt;
&lt;p&gt;Contrairement à &lt;strong&gt;Google Chrome&lt;/strong&gt;, il n&#39;envoie pas tout ton historique de recherche à Google, ni à personne d&#39;autre.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Firefox&lt;/strong&gt; est installable :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;sur ordi (Mac / Windows / Linux)&lt;/li&gt;
&lt;li&gt;sur smartphone (Android / iOS).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://firefox.com&quot;&gt;Installer &lt;strong&gt;Firefox&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Firefox, sur ordi et sur smartphone, permet en bonus de lire les PDF. Il permet aussi de les éditer sur ordi.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Mais pour améliorer encore nettement les choses, voici ce qu&#39;il faut faire :&lt;/p&gt;
&lt;h3 id=&quot;installer-un-bloqueur-de-pubs&quot;&gt;Installer un bloqueur de pubs&lt;a class=&quot;zola-anchor&quot; href=&quot;#installer-un-bloqueur-de-pubs&quot; aria-label=&quot;Anchor link for: installer-un-bloqueur-de-pubs&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Pour bloquer au mieux tous les pisteurs des GAFAM, répandus sur la plupart des sites, on installe &lt;strong&gt;uBlock Origin&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/&quot;&gt;Installer &lt;strong&gt;uBlock Origin&lt;/strong&gt; sur Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Je ne recommande pas :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AdBlock Plus&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ghostery&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;et la plupart des autres bloqueurs de pubs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Il sont pour la plupart de mèche avec les publicitaires, voire collectent carrément vos données personnelles.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;uBlock Origin&lt;/strong&gt; est un projet bénévole, mature, efficace et économe en ressources.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Se protéger des pubs est aussi une mesure pour se &lt;a rel=&quot;external&quot; href=&quot;https://blog.middleearth.fr/ublock-origin-nest-pas-un-adblocker.html&quot;&gt;protéger des virus&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;changer-de-moteur-de-recherche&quot;&gt;Changer de moteur de recherche&lt;a class=&quot;zola-anchor&quot; href=&quot;#changer-de-moteur-de-recherche&quot; aria-label=&quot;Anchor link for: changer-de-moteur-de-recherche&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Le moteur de recherche est le site web qu&#39;on utilise pour faire ses recherches.
Par défaut, malheureusement, c&#39;est &lt;strong&gt;Google&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Pour éviter encore une fois de dire tout ce qu&#39;on cherche à Google, on va en utiliser un autre.
Je recommande &lt;strong&gt;DuckDuckGo&lt;/strong&gt;, qui est bien niveau confidentialité et qui donne des résultats satisfaisants.&lt;/p&gt;
&lt;p&gt;Pour cela, il faut aller dans les &lt;strong&gt;préférences&lt;/strong&gt; de Firefox, onglet &quot;Recherche&quot; et sélectionner &lt;strong&gt;DuckDuckGo&lt;/strong&gt; dans la liste.&lt;/p&gt;
&lt;p&gt;Si, de temps en temps, les résultats d&#39;une recherche ne te satisfont pas, ajoute &lt;code&gt;!g&lt;/code&gt; à ta recherche et ça te redirigera vers Google 👌&lt;/p&gt;
&lt;h3 id=&quot;optionnel-isoler-facebook-instagram-whatsapp&quot;&gt;&lt;em&gt;Optionnel :&lt;/em&gt; Isoler Facebook / Instagram / WhatsApp&lt;a class=&quot;zola-anchor&quot; href=&quot;#optionnel-isoler-facebook-instagram-whatsapp&quot; aria-label=&quot;Anchor link for: optionnel-isoler-facebook-instagram-whatsapp&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Facebook Container&lt;/strong&gt; est une extension officielle de Firefox apporte une protection supplémentaire
contre le pistage des services de Meta (Facebook, Instagram, WhatsApp).&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/en-US/firefox/addon/facebook-container/&quot;&gt;Installer &lt;strong&gt;Facebook Container&lt;/strong&gt; sur Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;optionnel-cacher-les-bannieres-de-cookies&quot;&gt;&lt;em&gt;Optionnel :&lt;/em&gt; Cacher les bannières de cookies&lt;a class=&quot;zola-anchor&quot; href=&quot;#optionnel-cacher-les-bannieres-de-cookies&quot; aria-label=&quot;Anchor link for: optionnel-cacher-les-bannieres-de-cookies&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Ces bannières de cookies nous saoûlent, c&#39;est une façon dégueu et relou de respecter le règlement européen sur la protection des données (RGPD) pour les sites web, tout en te pistant quand même.&lt;/p&gt;
&lt;p&gt;Cette extension permet de cacher cette banière : comme ça on ne répond même pas à la question, ce que les sites interprètent comme un &quot;non&quot;.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/en-US/firefox/addon/istilldontcareaboutcookies/&quot;&gt;Installer &lt;strong&gt;I still don&#39;t care about cookies&lt;/strong&gt; sur Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;optionnel-extension-de-confidentialite-supplementaire&quot;&gt;&lt;em&gt;Optionnel :&lt;/em&gt; Extension de confidentialité supplémentaire&lt;a class=&quot;zola-anchor&quot; href=&quot;#optionnel-extension-de-confidentialite-supplementaire&quot; aria-label=&quot;Anchor link for: optionnel-extension-de-confidentialite-supplementaire&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Flemme d&#39;expliquer le pourquoi du comment, mais &lt;strong&gt;Decentraleyes&lt;/strong&gt; permet de te protéger de certaines formes de pistage contre lesquelles &lt;strong&gt;uBlock Origin&lt;/strong&gt; ne peut rien.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/&quot;&gt;Installer &lt;strong&gt;Decentraleyes&lt;/strong&gt; sur Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;optionnel-parametre-de-confidentialite-de-firefox&quot;&gt;&lt;em&gt;Optionnel :&lt;/em&gt; Paramètre de confidentialité de Firefox&lt;a class=&quot;zola-anchor&quot; href=&quot;#optionnel-parametre-de-confidentialite-de-firefox&quot; aria-label=&quot;Anchor link for: optionnel-parametre-de-confidentialite-de-firefox&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Dans les préférences de Firefox, on peut choisir d&#39;effacer tous les cookies à la fermeture du navigateur.&lt;/p&gt;
&lt;p&gt;C&#39;est dans la catégorie &lt;em&gt;Vie privée et sécurité&lt;/em&gt;, cocher &lt;em&gt;Supprimer les cookies et les données des sites à la fermeture de Firefox&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Ça a le désavantage de te déconnecter de tous les sites d&#39;une session à l&#39;autre, mais ça te permet de repartir d&#39;une page vide à chaque fois.&lt;/p&gt;
&lt;p&gt;Après tu peux gérer une liste d&#39;exceptions pour pas te déconnecter des services auxquels tu te connectes souvent (par exemple si de toute façon la première chose que tu fais quand tu vas sur Discord c&#39;est t&#39;y connecter, autant que Firefox y reste connecté quoi)&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Pour encore d&#39;autres astuces sur Firefox, j&#39;ai écrit &lt;a href=&quot;/firefox&quot;&gt;un article à ce sujet&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Clic Et Cetera a également &lt;a rel=&quot;external&quot; href=&quot;https://www.clicetcetera.fr/general/pour-retrouver-un-web-douillet/&quot;&gt;un très bon article sur Firefox&lt;/a&gt;,
avec encore d&#39;autres possibilités qui ne sont pas listées ici.&lt;/p&gt;
&lt;/details&gt;
&lt;h2 id=&quot;2-cartographie-map&quot;&gt;2. Cartographie 🗺️&lt;a class=&quot;zola-anchor&quot; href=&quot;#2-cartographie-map&quot; aria-label=&quot;Anchor link for: 2-cartographie-map&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Une deuxième étape, simple aussi, c&#39;est de te déplacer sans tenir au courant les GAFAMs de tes trajets.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Cliquer pour ouvrir&lt;/summary&gt;
&lt;p&gt;Savais-tu que Waze appartient à Google, comme Google Maps ?&lt;/p&gt;
&lt;p&gt;En face du géant, une alternative solide existe : &lt;strong&gt;OpenStreetMap&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C&#39;est une carte collaborative, à la manière de &lt;strong&gt;Wikipédia&lt;/strong&gt;. C&#39;est facile de s&#39;y créer un compte et de rajouter des infos dessus.&lt;/p&gt;
&lt;p&gt;Toutes cartes du monde confondues, OpenStreetMap est juste après Google en termes d&#39;utilisation : la plupart des cartes en ligne sont &lt;strong&gt;basées&lt;/strong&gt; dessus.&lt;/p&gt;
&lt;p&gt;OpenStreetMap contient souvent des &lt;strong&gt;tracés plus précis&lt;/strong&gt; que Google, comme les tracés de randonnée.
Elle répertorie des infos utiles, comme les points d&#39;eau potable, etc.&lt;/p&gt;
&lt;p&gt;En revanche, elle est moins fournie en &lt;strong&gt;commerces&lt;/strong&gt; : il en manque, et il manque souvent les horaires.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Pour chercher des lieux et faire des itinéraires :&lt;/p&gt;
&lt;h3 id=&quot;sur-ordi&quot;&gt;Sur ordi&lt;a class=&quot;zola-anchor&quot; href=&quot;#sur-ordi&quot; aria-label=&quot;Anchor link for: sur-ordi&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Il suffit d&#39;aller sur le site web.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://openstreetmap.org&quot;&gt;Consulter &lt;strong&gt;OpenStreetMap&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;sur-smartphone&quot;&gt;Sur smartphone&lt;a class=&quot;zola-anchor&quot; href=&quot;#sur-smartphone&quot; aria-label=&quot;Anchor link for: sur-smartphone&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;C&#39;est ce qui nous intéresse le plus, en vrai.&lt;/p&gt;
&lt;p&gt;Il existe une super appli, facile d&#39;utilisation, confidentielle, libre :&lt;/p&gt;
&lt;p&gt;🌱🧭 &lt;strong&gt;CoMaps&lt;/strong&gt; 🧭🌱&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://play.google.com/store/apps/details?id=app.comaps.google&quot;&gt;Installer &lt;strong&gt;CoMaps&lt;/strong&gt; pour Android&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://apps.apple.com/us/app/comaps/id6747180809&quot;&gt;Installer &lt;strong&gt;CoMaps&lt;/strong&gt; pour iOS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;L&#39;interface est très épurée, c&#39;est facile de s&#39;y retrouver.&lt;/p&gt;
&lt;p&gt;C&#39;est une carte qui fonctionne hors-ligne : on commence par télécharger les cartes dont on a besoin, par département.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Il suffit de zoomer quelque part pour que l&#39;appli te propose de télécharger la carte si elle manque.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Une fois qu&#39;on a les cartes qu&#39;on veut, tout se fait &lt;strong&gt;hors-ligne&lt;/strong&gt; : la visualisation, les recherches, les itinéraires, le GPS.
En termes de vie privée, c&#39;est l&#39;idéal.&lt;/p&gt;
&lt;p&gt;La &lt;strong&gt;recherche&lt;/strong&gt; est moins puissante que sur le site web &lt;a rel=&quot;external&quot; href=&quot;https://openstreetmap.org&quot;&gt;openstreetmap.org&lt;/a&gt;,
si on fait une faute d&#39;orthographe, on risque de ne pas trouver.&lt;/p&gt;
&lt;p&gt;Les &lt;strong&gt;itinéraires&lt;/strong&gt; à pied, à vélo et en voiture sont plutôt bons (les estimations de temps sont trèès optimistes par contre 😅).&lt;/p&gt;
&lt;p&gt;Les &lt;strong&gt;marque-page&lt;/strong&gt; sont très pratiques pour sauvegarder les endroits où l&#39;on va souvent, les restaus, qu&#39;on veut essayer, etc.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Et point bonus : c&#39;est très facile d&#39;&lt;strong&gt;ajouter des infos&lt;/strong&gt; simples !&lt;/p&gt;
&lt;p&gt;Il faut d&#39;abord se créer un compte sur OpenStreetMap et se connecter dans l&#39;appli.&lt;/p&gt;
&lt;p&gt;Puis pour ajouter des &lt;strong&gt;horaires&lt;/strong&gt; à un commerce, ou même ajouter un commerce, l&#39;interface est intuitive.&lt;/p&gt;
&lt;p&gt;Pour proposer des changements plus complexes qu&#39;il n&#39;est pas possible de faire avec l&#39;appli,
il suffit de &lt;strong&gt;laisser une note&lt;/strong&gt;, et des personnes plus expérimentées feront la modification.&lt;/p&gt;
&lt;p&gt;Comme Wikipédia quoi 😄&lt;/p&gt;
&lt;p&gt;Note : Si l&#39;envie vous prend, il existe quand même une application plus complète et mieux faite pour ajouter des informations :
&lt;a rel=&quot;external&quot; href=&quot;https://streetcomplete.app/&quot;&gt;&lt;strong&gt;StreetComplete&lt;/strong&gt;&lt;/a&gt;, disponible uniquement sur Android.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/details&gt;
&lt;h2 id=&quot;3-mail-email&quot;&gt;3. Mail 📧&lt;a class=&quot;zola-anchor&quot; href=&quot;#3-mail-email&quot; aria-label=&quot;Anchor link for: 3-mail-email&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;La deuxième étape, plus reloue mais essentielle, c&#39;est de plus utiliser de mail des GAFAMs (Gmail, Outlook, etc).&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Cliquer pour ouvrir&lt;/summary&gt;
&lt;p&gt;T&#39;es toujours là ? 😮&lt;/p&gt;
&lt;p&gt;Les mails c&#39;est le miroir de toute ton activité en ligne : en plus des échanges avec des vrais gens, tu y reçois toutes tes notifs de connexion, tes rappels, confirmations d&#39;achat, d&#39;opération bancaire, etc.
Ça fait un paquet d&#39;infos sur ta vie, qui sont utilisées pour déduire tes goûts, tes actvités, etc.&lt;/p&gt;
&lt;p&gt;Donc ça veut dire te créer une nouvelle adresse.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;👉 Pour te trouver un nouveau fournisseur de mail, on a fait un site avec des copaines du collectif CHATONS : &lt;a rel=&quot;external&quot; href=&quot;https://www.demailnagement.net&quot;&gt;Le déMAILnagement&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ Comme fournisseur de mail, je ne recommande pas Tutanota ni Proton : c&#39;est pas que c&#39;est pas bien, c&#39;est que leur fonctionnement rend impossible l&#39;utilisation d&#39;un logiciel comme Thunderbird dont je parle ensuite. Ça rend la transition d&#39;un mail à un autre plus compliquée, puisque tu ne peux pas tout avoir au même endroit. En pratique, j&#39;ai l&#39;impression que les personnes qui s&#39;y sont créé une boite mail ont plus de mal à faire la transition.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Une fois ta nouvelle adresse crée, il faut prévenir que t&#39;as changé d&#39;adresse au fur et à mesure qu&#39;on te contacte sur l&#39;ancienne.
C&#39;est aussi changer ton mail sur tous les sites. Pareil, tu peux le faire au fur et à mesure que tu reçois des mails de notif sur l&#39;ancienne.&lt;/p&gt;
&lt;p&gt;C&#39;est un changement qui se fait au long cours, avec je dirais une semaine - un mois où ça te prend pas mal de temps, puis de manière plus disparate sur 6 mois / un an, jusqu&#39;à pouvoir supprimer complètement son ancienne adresse.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ Je recommande pas de garder Gmail comme adresse &quot;poubelle&quot;, toujours parce que tes mails &quot;poubelle&quot; en disent long sur qui tu es.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Pendant ce processus de transition 🏳️‍⚧️ deux outils te seront très utiles :&lt;/p&gt;
&lt;h3 id=&quot;un-client-mail&quot;&gt;Un client mail&lt;a class=&quot;zola-anchor&quot; href=&quot;#un-client-mail&quot; aria-label=&quot;Anchor link for: un-client-mail&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Un client mail, c&#39;est un logiciel séparé du navigateur, qui te permet de réunir toutes tes boites mails.&lt;/p&gt;
&lt;p&gt;Je recommande &lt;strong&gt;Thunderbird&lt;/strong&gt;, qui fonctionne sur ordi et sur Android.&lt;/p&gt;
&lt;p&gt;Tu peux directement lire et envoyer des mails de &lt;strong&gt;toutes tes adresses mail&lt;/strong&gt; que tu as ajoutées dessus.&lt;/p&gt;
&lt;p&gt;Tu peux même avoir une vue &lt;em&gt;Boite de réception unifiée&lt;/em&gt; où tu vois toutes tes boites de réceptions... unifiées en une. Et oui.&lt;/p&gt;
&lt;h3 id=&quot;un-gestionnaire-de-mots-de-passe&quot;&gt;Un gestionnaire de mots de passe&lt;a class=&quot;zola-anchor&quot; href=&quot;#un-gestionnaire-de-mots-de-passe&quot; aria-label=&quot;Anchor link for: un-gestionnaire-de-mots-de-passe&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Un gestionnaire de mots de passe te permet de garder trace de quel mail et quel mot de passe tu utilises pour chaque site.&lt;/p&gt;
&lt;p&gt;Je recommande &lt;strong&gt;Bitwarden&lt;/strong&gt;. Tu peux utiliser &lt;a rel=&quot;external&quot; href=&quot;https://www.chatons.org/search/by-service?field_software_target_id=288&quot;&gt;celui d&#39;un CHATONS&lt;/a&gt;, ou utiliser le &lt;a rel=&quot;external&quot; href=&quot;https://bitwarden.com&quot;&gt;service officiel&lt;/a&gt; de la boite Bitwarden si tu veux pas te prendre la tête, je pense que c&#39;est ok.&lt;/p&gt;
&lt;p&gt;Tu peux ensuite installer l&#39;extension Firefox, et l&#39;appli Android. Very pratique.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/&quot;&gt;Installer &lt;strong&gt;Bitwarden&lt;/strong&gt; sur Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;optionnel-les-alias-de-mail&quot;&gt;&lt;em&gt;Optionnel :&lt;/em&gt; Les alias de mail&lt;a class=&quot;zola-anchor&quot; href=&quot;#optionnel-les-alias-de-mail&quot; aria-label=&quot;Anchor link for: optionnel-les-alias-de-mail&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Pour encore plus de privacy, tu peux éviter d&#39;avoir une seule identité (un seul mail), pour toute ton activité en ligne.&lt;/p&gt;
&lt;p&gt;Pour cela, je recommande l&#39;utilisation d&#39;un service d&#39;alias de mail. Il permet de créer un nouveau mail aléatoire pour chaque service en ligne. Tous les mails reçus seront redirigés à ton mail perso, donc ça complique pas trop, si tu es un peu à l&#39;aise avec l&#39;informatique.&lt;/p&gt;
&lt;p&gt;Comme tu as un mail différent pour chaque site, c&#39;est plus difficile de croiser les données entre tous les différents services en ligne que tu utilises.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Oui, il a des boites qui sont spécialisées dans le croisement des données entre une quantité énorme de sites, le commerce de la surveillance en ligne est catastrophique !&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Perso j&#39;utilise directement mon mail perso :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pour les sites gouvernementaux. De toute façon, ils savent qui je suis a priori ^^&lt;/li&gt;
&lt;li&gt;Pour les communications avec des vrais gens qui ont pas leur mail chez les GAFAM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pour tout le reste, j&#39;utilise des alias.
&lt;em&gt;Et en vrai des fois j&#39;ai la flemme de créer un alias pour parler à un vrai gens qui est chez Gmail, vasy on fait ce qu&#39;on peut hein !&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;À noter que l&#39;utilisation d&#39;un service d&#39;alias de mail, c&#39;est ingérable sans gestionnaire de mots de passe. Tu peux pas retenir ces 200 adresses mails aléatoires !&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Je recommande &lt;strong&gt;Simple Login&lt;/strong&gt;, une filiale de ProtonMail, mais il y en a plein d&#39;autres. C&#39;est 30€ par an. Genre 2 pizzas !&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://simplelogin.io&quot;&gt;Simple Login&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/&quot;&gt;Installer &lt;strong&gt;Simple Login&lt;/strong&gt; sur Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://play.google.com/store/apps/details?id=io.simplelogin.android&quot;&gt;Installer &lt;strong&gt;Simple Login&lt;/strong&gt; pour Android&lt;/a&gt;.&lt;/p&gt;
&lt;/details&gt;
&lt;h2 id=&quot;4-agenda-date-et-contacts&quot;&gt;4. Agenda 📅 et Contacts&lt;a class=&quot;zola-anchor&quot; href=&quot;#4-agenda-date-et-contacts&quot; aria-label=&quot;Anchor link for: 4-agenda-date-et-contacts&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Si le mail est le reflet de ta vie numérique,
alors ton agenda en ligne, c&#39;est le reflet de toute ta vie physique !&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Cliquer pour ouvrir&lt;/summary&gt;
&lt;p&gt;Un service de synchronisation d&#39;agenda et de contacts vient souvent avec ton mail. Les paramètres dépendront du service de mail que tu choisis.&lt;/p&gt;
&lt;p&gt;En tout cas, c&#39;est possible d&#39;ajouter ses agendas et contacts sur Thunderbird (même logiciel que pour les mails) sur ordi.&lt;/p&gt;
&lt;p&gt;Sur Android, c&#39;est un peu plus chiant, faut installer DAVx5, pour la synchronisation des agendas et des contacts, et une appli d&#39;agenda (&lt;strong&gt;Etar&lt;/strong&gt; par exemple).&lt;/p&gt;
&lt;p&gt;Sur iOS, je crois que c&#39;est facile aussi, à confirmer.&lt;/p&gt;
&lt;p&gt;Je vais pas plus loin dans l&#39;explication, ton fournisseur de mail a sûrement une documentation adaptée.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://play.google.com/store/apps/details?id=at.bitfire.davdroid&quot;&gt;Installer &lt;strong&gt;DAVx5&lt;/strong&gt; pour Android&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://play.google.com/store/apps/details?id=ws.xsoh.etar&quot;&gt;Installer &lt;strong&gt;Etar&lt;/strong&gt; pour Android&lt;/a&gt;.&lt;/p&gt;
&lt;/details&gt;
&lt;h2 id=&quot;5-messagerie-instantanee-speech-balloon&quot;&gt;5. Messagerie instantanée 💬&lt;a class=&quot;zola-anchor&quot; href=&quot;#5-messagerie-instantanee-speech-balloon&quot; aria-label=&quot;Anchor link for: 5-messagerie-instantanee-speech-balloon&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bon, les applis de messagerie instantanée, tu en as sûrement déjà &lt;em&gt;quarante-douze&lt;/em&gt;. Mais lesquelles sont privacy-friendly ?&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Cliquer pour ouvrir&lt;/summary&gt;
&lt;p&gt;Là, on commence à toucher à un truc plus compliqué.
Parce que pour &lt;strong&gt;utiliser&lt;/strong&gt; une messagerie, il faut que &lt;strong&gt;tes contacts&lt;/strong&gt; l&#39;utilisent aussi.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C&#39;est ce qu&#39;on appelle l&#39;&lt;strong&gt;effet réseau&lt;/strong&gt; : Plus il y a de personnes sur un réseau social ou une messagerie, plus ce service est incontournable.&lt;/p&gt;
&lt;p&gt;Ça fonctionne aussi dans l&#39;autre sens : moins un service est utilisé, moins il est utilisable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Comme messagerie instantanée, je recommande sans hésitation &lt;strong&gt;Signal&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://signal.org/install/&quot;&gt;Installer &lt;strong&gt;Signal&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Les nerds te diront peut-être que c&#39;est pas bien parce que c&#39;est &lt;em&gt;centralisé&lt;/em&gt;, et c&#39;est en partie vrai, mais :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;C&#39;est un logiciel libre, géré par une association à but non lucratif.&lt;/li&gt;
&lt;li&gt;C&#39;est &lt;strong&gt;très sécurisé&lt;/strong&gt; et &lt;strong&gt;chiffré de bout en bout&lt;/strong&gt;, et à un point beaucoup plus avancé que &lt;strong&gt;toutes les alternatives&lt;/strong&gt; qui pèsent dans le game (bien plus que &lt;strong&gt;Whatsapp&lt;/strong&gt;, bien plus que &lt;strong&gt;Matrix&lt;/strong&gt;, etc).&lt;/li&gt;
&lt;li&gt;C&#39;est &lt;strong&gt;facile&lt;/strong&gt; à utiliser. Ça ressemble à Whatsapp. Tu peux trouver tes contacts qui sont déjà dessus avec ton carnet d&#39;adresses. Ça &lt;strong&gt;fonctionne bien&lt;/strong&gt;. Tu peux aussi avoir l&#39;appli sur ton ordi.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;En particulier, je ne &lt;strong&gt;recommande pas&lt;/strong&gt; :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Facebook Messenger&lt;/strong&gt; / &lt;strong&gt;Instagram&lt;/strong&gt; / &lt;strong&gt;Whatsapp&lt;/strong&gt; : les 3 appartiennent à la société Meta, on ne présente plus le désastre en termes de confidentialité et de démocratie que représente ces services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Telegram&lt;/strong&gt;. Telegram fait genre son service est sécurisé, mais il n&#39;est même pas chiffré de bout en bout. C&#39;est une vraie blague leur histoire, mais ce qui est tragique c&#39;est que de nombreuses personnes pensent vraiment que Telegram est une messagerie sécurisée.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;J&#39;ai espoir pour &lt;strong&gt;Matrix&lt;/strong&gt;, qui est décentralisé, mais je trouve que niveau usabilité, c&#39;est pas encore ça.
Et niveau sécurité / chiffrement de bout en bout c&#39;est pas au niveau de Signal.
Chouette à utiliser entre nerds, mais pas prêt pour le grand public, &lt;em&gt;à mon avis&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;J&#39;aime bien &lt;strong&gt;DeltaChat&lt;/strong&gt;, qui est décentralisé aussi, et plutôt léger.
Niveau sécurité / chiffrement de bout en bout ça se rapproche de Signal, et c&#39;est simple à utiliser.
Mais c&#39;est très peu utilisé pour le moment, donc ça fait un peu vide pour l&#39;instant.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;p&gt;Aujourd&#39;hui, 90% de mes communications se font sur Signal.
En expliquant pourquoi je préfère utiliser Signal, la majorité de mon entourage s&#39;y est mis.&lt;/p&gt;
&lt;p&gt;En installant &lt;strong&gt;Signal&lt;/strong&gt; :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Vous vous permettez d&#39;avoir des conversations &lt;strong&gt;vraiment privées&lt;/strong&gt; avec votre entourage.&lt;/li&gt;
&lt;li&gt;Vous permettez à votre entourage d&#39;avoir des conversations vraiment privées avec vous (effet réseau !)&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Pourquoi ne pas utiliser les SMS ?&lt;/p&gt;
&lt;p&gt;Les SMS sont &lt;strong&gt;lisibles&lt;/strong&gt; par tous les opérateurs réseau (Free, SFR, etc) et par l&#39;État.
Ils sont également &lt;strong&gt;très peu sécurisés&lt;/strong&gt;, et il est facile (bien qu&#39;illégal)
pour une personne malveillante de &lt;strong&gt;recevoir et envoyer&lt;/strong&gt; des SMS à ta place.&lt;/p&gt;
&lt;p&gt;En plus de ça, l&#39;application de SMS par défaut est souvent &lt;strong&gt;celle de Google&lt;/strong&gt;,
qui en profite pour te surveiller aussi (et les personnes avec qui tu communiques d&#39;un même coup !&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/details&gt;
&lt;h2 id=&quot;6-reseaux-sociaux-space-invader&quot;&gt;6. Réseaux sociaux 👾&lt;a class=&quot;zola-anchor&quot; href=&quot;#6-reseaux-sociaux-space-invader&quot; aria-label=&quot;Anchor link for: 6-reseaux-sociaux-space-invader&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Les réseaux sociaux aujourd&#39;hui ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Facebook&lt;/strong&gt;, &lt;strong&gt;Instagram&lt;/strong&gt; et &lt;strong&gt;Threads&lt;/strong&gt;, c&#39;est le &lt;em&gt;F&lt;/em&gt; de &lt;em&gt;GAFAM&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linkedin&lt;/strong&gt; appartient à &lt;strong&gt;Microsoft&lt;/strong&gt;, le &lt;em&gt;M&lt;/em&gt; de &lt;em&gt;GAFAM&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Twitter&lt;/strong&gt;/&lt;strong&gt;X&lt;/strong&gt; appartient à &lt;em&gt;Musk&lt;/em&gt;, le M de &lt;em&gt;Sale Ordure Fasciste&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;(ah bon, y&#39;a pas de M ? zut.)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;details&gt;
&lt;summary&gt;Cliquer pour ouvrir&lt;/summary&gt;
&lt;p&gt;Deux alternatives émergent :&lt;/p&gt;
&lt;h3 id=&quot;bluesky&quot;&gt;Bluesky&lt;a class=&quot;zola-anchor&quot; href=&quot;#bluesky&quot; aria-label=&quot;Anchor link for: bluesky&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Je ne &lt;strong&gt;recommande pas&lt;/strong&gt;, ça a les mêmes racines &lt;strong&gt;techno-capitalistes&lt;/strong&gt; de la Silicon Valley que les réseaux sociaux précédents.
C&#39;est très centralisé, y&#39;a des &lt;strong&gt;actionnaires&lt;/strong&gt;, c&#39;est voué à devenir la même merde que les autres.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;👩‍🍳 Les mêmes ingrédients donnent souvent la même recette.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;le-fediverse&quot;&gt;Le Fediverse&lt;a class=&quot;zola-anchor&quot; href=&quot;#le-fediverse&quot; aria-label=&quot;Anchor link for: le-fediverse&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Un truc de hippies (je dis ça positivement !)&lt;/p&gt;
&lt;p&gt;C&#39;est une vraie alternative, pensée complètement différemment.&lt;/p&gt;
&lt;p&gt;Plutôt qu&#39;un seul service central, opéré par une société, le Fediverse est un &lt;strong&gt;ensemble&lt;/strong&gt; de réseaux sociaux, opérés par des assos, des collectifs...&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ça permet d&#39;avoir plusieurs façons différentes de gérer le service. Chaque instance a des règles différentes, et permet de plaire à des publics différents.
Mais tout le monde peut quand même communiquer.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Certains ressemblent plus à Twitter (&lt;strong&gt;Mastodon&lt;/strong&gt;), d&#39;autres plus à Instagram (&lt;strong&gt;PixelFed&lt;/strong&gt;), ou à Reddit (&lt;strong&gt;Lemmy&lt;/strong&gt;), et d&#39;autres qui sont des petits Youtube (&lt;strong&gt;Peertube&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;Tous ces réseaux sont &lt;strong&gt;connectés&lt;/strong&gt;, donc depuis ton compte tu peux suivre des comptes sur &lt;strong&gt;tous les autres réseaux&lt;/strong&gt; !&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C&#39;est le feu, c&#39;est le futur. Les réseaux sociaux auraient pu ressembler à ça depuis le début, s&#39;ils avaient pas été faits par des silos en quête de pouvoir.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Voici une courte vidéo qui permet de visualiser à quoi ça ressemble :&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://framatube.org/videos/watch/4294a720-f263-4ea4-9392-cf9cea4d5277&quot;&gt;Regarder &lt;strong&gt;What is the Fediverse ?&lt;/strong&gt; (sous titré)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ça peut être un peu compliqué à prendre en main, mais c&#39;est un espace en ligne sympa, &lt;strong&gt;sans pub&lt;/strong&gt;, sans algorithmes qui sélectionnent le contenu pour toi...
Il y a beaucoup de ressources à son sujet.&lt;/p&gt;
&lt;p&gt;Je recommande de se créer un compte sur un réseau &lt;strong&gt;Mastodon&lt;/strong&gt;, le logiciel le plus &lt;strong&gt;mature&lt;/strong&gt; du Fediverse (il parait qu&#39;il y a encore pas mal de bugs sur PixelFed).&lt;/p&gt;
&lt;p&gt;Mastodon a plusieurs millions d&#39;utilisateurices. C&#39;est peu mais c&#39;est pas rien ! Si tu m&#39;envoies un message (mon nom d&#39;utilisateur : &lt;em&gt;@ppom@mamot.fr&lt;/em&gt;), je pourrai répondre à tes questions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On remarque qu&#39;une adresse Fediverse est un peu comme une adresse mail : &lt;em&gt;nom_utilisateur@nom_service&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Je recommande de se créer un compte sur un grosse instance généraliste francophone, comme piaille.fr.
Si tu veux déménager plus tard, c&#39;est possible de migrer ton compte d&#39;un endroit à l&#39;autre, et garder tes abonnements et abonnés.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://piaille.fr&quot;&gt;Se créer un compte sur piaille.fr&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Ça t&#39;empêche pas de garder tes comptes Insta, Facebook etc, mais ça permet de découvrir autre chose !&lt;/p&gt;
&lt;p&gt;Et ptet faire découvrir à tes copaines (&lt;em&gt;effet réseau !&lt;/em&gt;) un endroit sans pubs et placements de produits, loin du capitalisme 😌&lt;/p&gt;
&lt;/details&gt;
&lt;h2 id=&quot;7-autres-applications-android&quot;&gt;7. Autres applications Android&lt;a class=&quot;zola-anchor&quot; href=&quot;#7-autres-applications-android&quot; aria-label=&quot;Anchor link for: 7-autres-applications-android&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Il existe une myriade d&#39;applications Android, et je ne peux pas tout couvrir. Ici, des conseils pour en choisir de nouvelles.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Cliquer pour ouvrir&lt;/summary&gt;
&lt;p&gt;La suite d&#39;applications &lt;strong&gt;Fossify&lt;/strong&gt; a plein d&#39;applications de base pour remplacer celles de Google :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Clavier,&lt;/li&gt;
&lt;li&gt;SMS,&lt;/li&gt;
&lt;li&gt;Galerie,&lt;/li&gt;
&lt;li&gt;Notes,&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Elles sont pour la plupart de bonne qualité, je recommande !&lt;/p&gt;
&lt;p&gt;De plus, il existe un store d&#39;applications alternatif au Play Store : &lt;strong&gt;F-Droid&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Ce store ne contient que des applis libres, donc garanties de ne pas contenir de pisteurs, etc.
Les applis qui se connectent à des services non-libres comportent un avertissement.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Toutes les applications citées, à l&#39;exception de Signal, sont présentes sur F-Droid par exemple !
Certaines, comme CoMaps, sont mêmes plus privacy-friendly sur F-Droid.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Recommandations d&#39;applications en vrac :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lecteur de PDF : Firefox ou &lt;strong&gt;MJ PDF&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Lecteur de Musique (pas en streaming, seulement en local) : &lt;strong&gt;Metro&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Lecteur de vidéos (pas en streaming, seulement en local) : &lt;strong&gt;VLC&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wikipédia&lt;/strong&gt;, pour chercher une info rapidement&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Notification Notes&lt;/strong&gt;, pour des notes rapides qui resteront dans la barre de notifications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lexica&lt;/strong&gt;, un jeu hors-ligne similaire au Boggle. Assez jouable, sans être trop addictif.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ces applications permettent de se connecter à des services privateurs, (toujours mieux avec une appli libre que l&#39;appli officielle) :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appli alternative pour regarder Youtube : &lt;strong&gt;PipePipe&lt;/strong&gt; ou NewPipe.&lt;/li&gt;
&lt;li&gt;Appli alternative pour Reddit : &lt;strong&gt;Stealth&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Appli alternative pour Telegram : &lt;strong&gt;Forkgram&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;F-Droid est intégré par défaut à /e/OS, dont je parle dans la section suivante !&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Pour les applications que tu télécharges sur le Google Play Store, je conseille les rapports
d&#39;&lt;a rel=&quot;external&quot; href=&quot;https://reports.exodus-privacy.eu.org/fr/&quot;&gt;Exodus Privacy&lt;/a&gt; : ce site permet de chercher une appli
et de voir tous les pisteurs inclus dedans. Ça donne une idée de son niveau de mouchardise,
et ça permet d&#39;en savoir un peu plus sur le marché de la surveillance en ligne.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/details&gt;
&lt;h2 id=&quot;8-systeme-d-exploitation-desktop&quot;&gt;8. Système d&#39;exploitation 🖥️&lt;a class=&quot;zola-anchor&quot; href=&quot;#8-systeme-d-exploitation-desktop&quot; aria-label=&quot;Anchor link for: 8-systeme-d-exploitation-desktop&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Système d&#39;exploitation&lt;/em&gt; ? Non, je ne parle pas du capitalisme !&lt;/p&gt;
&lt;p&gt;Ici on va parler du logiciel principal de ton ordi ou de ton smartphone.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Cliquer pour ouvrir&lt;/summary&gt;
&lt;blockquote&gt;
&lt;p&gt;Système d&#39;exploitation 🇫🇷 = Operating System 🇬🇧 = OS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ok, cette partie est une ébauche, parce qu&#39;il y a trop à dire sur ce sujet.&lt;/p&gt;
&lt;h3 id=&quot;ordi&quot;&gt;Ordi&lt;a class=&quot;zola-anchor&quot; href=&quot;#ordi&quot; aria-label=&quot;Anchor link for: ordi&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Pour les ordis, &lt;strong&gt;Windows&lt;/strong&gt; est l&#39;OS le plus courant.&lt;/p&gt;
&lt;p&gt;Désavantages en vrac :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rempli de pisteurs qui surveillent ton activité&lt;/li&gt;
&lt;li&gt;Peu sécurisé, la proie préférée des virus&lt;/li&gt;
&lt;li&gt;Gourmand en ressources, devient rapidement lentissime&lt;/li&gt;
&lt;li&gt;Windows 10 ne sera plus maintenu à la fin de l&#39;année 2025, et Windows 11 a des pré-requis matériels que la plupart des ordis n&#39;ont pas&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Oui oui, c&#39;est pour te forcer à racheter un PC&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Je recommande l&#39;utilisation de &lt;strong&gt;Linux&lt;/strong&gt; à la place.&lt;/p&gt;
&lt;p&gt;C&#39;est pas tout rose non plus :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;C&#39;est pas installé par défaut sur l&#39;ordi, donc ça peut être compliqué à installer&lt;/li&gt;
&lt;li&gt;Tu perds tes repères, pas la même façon d&#39;installer des logiciels&lt;/li&gt;
&lt;li&gt;C&#39;est pas aussi lissé que Windows&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pour installer ça, si t&#39;as la motivation, je te recommande de trouver quelqu&#39;un qui fait un peu d&#39;informatique pour t&#39;aider.&lt;/p&gt;
&lt;p&gt;Y&#39;a jamais juste &quot;Linux&quot;, y&#39;a tout un enrobage autour, qu&#39;on appelle une &lt;em&gt;distribution&lt;/em&gt; Linux. Le choix de la distribution est important.&lt;/p&gt;
&lt;p&gt;Je recommande &lt;strong&gt;Manjaro Linux&lt;/strong&gt; ou &lt;strong&gt;Linux Mint&lt;/strong&gt; pour commencer !&lt;/p&gt;
&lt;h3 id=&quot;android&quot;&gt;Android&lt;a class=&quot;zola-anchor&quot; href=&quot;#android&quot; aria-label=&quot;Anchor link for: android&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Android, par défaut, vient dans la version de Google,
c&#39;est-à-dire avec toutes les applis de Google pré-installées et pas désactivables (Play Store, Google Chrome, etc).&lt;/p&gt;
&lt;p&gt;Mais il existe d&#39;autres &lt;em&gt;distributions&lt;/em&gt;* d&#39;Android (comme Linux !)&lt;/p&gt;
&lt;p&gt;La plus facile à installer et utiliser est certainement &lt;strong&gt;/e/ OS&lt;/strong&gt; (oui c&#39;est un nom pourri, incompréhensible mais bref).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/e/ OS&lt;/strong&gt; ne comporte aucune application Google installée par défaut.
Toutes les applications de base (Play Store, SMS, Calendrier, etc) sont remplacées par des équivalents libres (ou presque).&lt;/p&gt;
&lt;p&gt;Notamment, leur magasin d&#39;applications, &lt;strong&gt;App Lounge&lt;/strong&gt;, permet d&#39;installer à la fois des applications qui viennent de &lt;strong&gt;F-Droid&lt;/strong&gt; et du &lt;strong&gt;Play Store&lt;/strong&gt;.
Quand une application est présente sur les deux magasins, App Lounge choisira de passer par F-Droid 👌&lt;/p&gt;
&lt;p&gt;De plus, cette version d&#39;Android permet de &lt;strong&gt;bloquer&lt;/strong&gt; l&#39;accès à &lt;strong&gt;Internet&lt;/strong&gt; à une appli.
Utile par exemple pour jouer à des jeux sans les pubs et le tracking.&lt;/p&gt;
&lt;p&gt;C&#39;est facile de voir sur le site d&#39;&lt;strong&gt;/e/&lt;/strong&gt; si ton &lt;strong&gt;téléphone&lt;/strong&gt; est &lt;strong&gt;supporté&lt;/strong&gt; ou pas.&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://doc.e.foundation/devices&quot;&gt;Checker la liste des téléphones supportés&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;S&#39;il est supporté avec l&#39;&lt;strong&gt;Easy Installer&lt;/strong&gt;, tu as de la chance : avec ce logiciel, c&#39;est faisable sans compétences techniques.&lt;/p&gt;
&lt;p&gt;Sinon, c&#39;est comme Linux, je te recommande de faire ça avec une personne qui a un peu d&#39;expérience.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Si ton smartphone n&#39;est pas supporté :
La prochaine fois que tu t&#39;achètes un smartphone (peut-être d&#39;occasion ?), tu pourras en chercher un parmi cette liste !&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/details&gt;
&lt;h2 id=&quot;ce-qui-manque&quot;&gt;Ce qui manque&lt;a class=&quot;zola-anchor&quot; href=&quot;#ce-qui-manque&quot; aria-label=&quot;Anchor link for: ce-qui-manque&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Un glossaire (logiciel libre, CHATONS...)&lt;/li&gt;
&lt;li&gt;Une partie &quot;Espace de stockage en ligne&quot;&lt;/li&gt;
&lt;li&gt;Une partie &quot;Musique&quot;&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Faire un site low-cost avec Hedgedoc</title>
        <published>2024-03-09T00:00:00+00:00</published>
        <updated>2024-03-09T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/site-lowcost-hedgedoc/"/>
        <id>https://blog.ppom.me/site-lowcost-hedgedoc/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/site-lowcost-hedgedoc/">&lt;p&gt;J&#39;ai une &lt;a rel=&quot;external&quot; href=&quot;https://ppom.fr&quot;&gt;activité de webmaster&lt;/a&gt;, où je propose de la conception et de la
maintenance de sites web vitrine. J&#39;utilise pour cela un savant mélange de
&lt;a rel=&quot;external&quot; href=&quot;https://directus.io/&quot;&gt;Directus&lt;/a&gt; et de &lt;a rel=&quot;external&quot; href=&quot;https://www.getzola.org/&quot;&gt;Zola&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Directus me permet de proposer à mes client·es une &lt;strong&gt;interface jolie&lt;/strong&gt;, simple et strictement adaptée
aux besoins du site. C&#39;est ça qui contient toutes les données du site. Directus génère une interface
d&#39;édition complètement adaptable, crée sa propre base de données SQL en fonction du modèle de
données créé par moi, génère une API, gère le téléversement de fichiers, dispose de permissions
fines, etc.&lt;/p&gt;
&lt;p&gt;Zola me permet de générer un &lt;strong&gt;site statique&lt;/strong&gt; à partir de templates HTML et des données rentrées dans
Directus. Pourquoi découper le système en une interface d&#39;édition et un site statique, au lieu
d&#39;un CMS standard ? Plusieurs raisons :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Si l&#39;interface d&#39;édition ne fonctionne plus, le site est toujours en ligne. Les client·es ne
peuvent juste pas mettre à jour le site. Je n&#39;ai presque jamais d&#39;incident de prod à gérer en
urgence.&lt;/li&gt;
&lt;li&gt;L&#39;interface d&#39;édition et le site peuvent être sur des serveurs différents : L&#39;interface d&#39;édition,
qui demande un peu de ressources, est sur mon serveur perso, dans mon salon, et ne me coûte
absolument rien. Le site statique est hébergé sur un VPS minuscule à quelques euros par mois.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Mais ce n&#39;est pas de ça dont je viens parler ici&lt;/strong&gt;, ce sera pour un autre article, quand j&#39;aurais bien
peaufiné cette suite d&#39;outils.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Aujourd&#39;hui, on va faire du low-cost&lt;/strong&gt;, pas chiadé du tout, faisable en quelques heures !&lt;/p&gt;
&lt;p&gt;Cette idée a germé dans mon esprit il y a environ un an, avant que je ne découvre Directus.
Je l&#39;ai reprise cette semaine, alors qu&#39;une asso qui n&#39;avait &lt;strong&gt;pas les moyens&lt;/strong&gt; d&#39;une prestation
complète me contactait pour refaire leur site fait en 2010, en plus simple. Et sans avoir besoin de
connaître le HTML pour éditer le site.&lt;/p&gt;
&lt;p&gt;On va donc s&#39;appuyer sur &lt;a rel=&quot;external&quot; href=&quot;https://hedgedoc.org/&quot;&gt;Hedgedoc&lt;/a&gt; &lt;em&gt;(anciennement CodiMD)&lt;/em&gt;, un éditeur
collaboratif de fichiers en &lt;strong&gt;Markdown&lt;/strong&gt;. J&#39;utilise l&#39;instance ouverte aux inscriptions de Picasoft,
&lt;a rel=&quot;external&quot; href=&quot;https://md.picasoft.net&quot;&gt;md.picasoft.net&lt;/a&gt;, et crée un site pour l&#39;asso, qu&#39;on appellera &lt;code&gt;LASSO&lt;/code&gt;
dans la suite de l&#39;article.&lt;/p&gt;
&lt;p&gt;Voici la vue d&#39;ensemble :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Le contenu statique de la page HTML contient un minimum de HTML/CSS pour avoir une coquille vide
(header, logo, barre de navigation)&lt;/li&gt;
&lt;li&gt;Un script JS va aller chercher le contenu d&#39;un pad sur Hedgedoc, convertir le Markdown en HTML et
l&#39;insérer dans la page.&lt;/li&gt;
&lt;li&gt;Et c&#39;est tout dans l&#39;idée 😁&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;En pratique :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Je crée donc sur l&#39;instance Hedgedoc un compte pour l&#39;asso.&lt;/li&gt;
&lt;li&gt;Je crée les quelques pages qui feront le site avec ce compte. Je mets la visibilité des pages en
&lt;em&gt;Locked&lt;/em&gt;/&lt;em&gt;Verrouillé&lt;/em&gt;, pour que seul le compte de l&#39;asso puisse modifier ces pages mais qu&#39;elles
soient visibles sans authentification. Elles ont l&#39;URL
&lt;code&gt;https://md.picasoft.net/LASSO-{nomdelapage.html}&lt;/code&gt;. Exemples :
&lt;code&gt;https://md.picasoft.net/LASSO-index.html&lt;/code&gt;, &lt;code&gt;https://md.picasoft.net/LASSO-news.html&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Je crée mon fichier HTML, qui sera exactement le même pour toutes les pages. En voici une version
simplifiée :&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;html&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;!&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;doctype&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; html&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;html&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;head&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;meta&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; charset&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;utf-8&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;meta&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;viewport&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; content&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;width=device-width, initial-scale=1&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;link&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; rel&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;icon&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; href&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;./favicon.ico&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;title&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;LASSO&lt;/span&gt;&lt;span&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;title&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;style&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		html&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-family&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; Gill Sans&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; Aller&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; ui-sans-serif&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; system-ui&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -apple-system&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; BlinkMacSystemFont&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Segoe UI&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; Roboto&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Helvetica Neue&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; Arial&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Noto Sans&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; sans-serif&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Apple Color Emoji&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Segoe UI Emoji&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Segoe UI Symbol&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;Noto Color Emoji&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			line-height&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.5&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		html&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		body&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		main&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			max-width&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 900&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;px&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			min-height&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 100&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;vh&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		img&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			display&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; block&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			max-width&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 100&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;%&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			height&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; auto&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		a&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			color&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; inherit&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			text-decoration&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; underline&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		nav&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt; a&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			text-decoration&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; inherit&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-weight&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 600&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			color&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;027d00&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;		.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;w-full&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			width&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 100&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;%&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;		.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;flex&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			display&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; flex&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			flex-direction&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; row&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;		.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;flex&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;center&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			justify-content&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; center&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		article&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt; h1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-weight&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 800&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-size&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 2.25&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-top&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-bottom&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0.8888889&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			line-height&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.1111111&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		article&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt; h2&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-weight&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 700&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-size&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.5&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-top&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-bottom&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			line-height&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.3333333&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		article&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt; h3&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-weight&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 600&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-size&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.25&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-top&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-bottom&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0.6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			line-height&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.6&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		article&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt; h4&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			font-weight&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 600&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-top&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.5&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-bottom&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0.5&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			line-height&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1.5&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;		article&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt; img&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-top&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;			margin-bottom&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;em&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&amp;lt;&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;style&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;head&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; class&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;w-full flex center&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; style&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;background-color: #lacouleurquetuveux&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    &amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Limiter la largeur du contenu &lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; class&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;w-full&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; style&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;max-width: 900px; background-color: #fff&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; class&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;flex&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            &amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Logo, etc&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;header&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nav&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; style&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;font-size: 1.2em&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; href&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;./index.html&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;Accueil&lt;/span&gt;&lt;span&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;a&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; href&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;./news.html&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;Newsletter&lt;/span&gt;&lt;span&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;a&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            &amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Autres pages &lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nav&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;article&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; id&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; style&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;margin: 2em&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;article&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        &amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; La librairie qui va convertir le markdown en html &lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        &amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Téléchargée depuis https://cdn.jsdelivr.net/npm/marked/marked.min.js &lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; src&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;./marked.min.js&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;script&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        &amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; La librairie qui va supprimer les éventuels cochonneries de hackers. Le contenu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        markdown devrait être de confiance, mais si jamais l&amp;#39;asso se trompe dans les permissions de&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        ses pages, mieux vaut jouer la prudence. &lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        &amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Téléchargée depuis https://github.com/cure53/DOMPurify/raw/main/dist/purify.min.js &lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; src&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;./purify.min.js&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;script&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;script&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;			async&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; put_content&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;                //&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On extrait le nom du fichier HTML actuel&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;				const&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; url&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; window&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;location&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;pathname&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;				const&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; filename&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; url&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;substring&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;url&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;lastIndexOf&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;                //&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On va télécharger le contenu de la page Hedgedoc correspondante&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;				const&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; response&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; fetch&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;https://md.picasoft.net/LASSO-&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;${&lt;/span&gt;&lt;span&gt;filename&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/download&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;`&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;				const&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; markdown&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; await&lt;/span&gt;&lt;span&gt; response&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;text&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;                //&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On convertit le Markdown en HTML,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;                //&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On le purifie,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;                //&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Et on l&amp;#39;insère dans le HTML, dans l&amp;#39;&amp;lt;article&amp;gt; 20 lignes plus haut ↑&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;				document&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;getElementById&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;innerHTML&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; DOMPurify&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;sanitize&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;marked&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;parse&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;markdown&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;			}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;			put_content&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		&amp;lt;&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;script&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;main&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;body&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;html&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Maintenant qu&#39;on a ça, on a plus qu&#39;à l&#39;installer sur l&#39;hébergement web de l&#39;asso. Dans mon cas,
c&#39;est un hébergement gratuit avec Free, mais ce fichier HTML peut carrément aller n&#39;importe où !&lt;/p&gt;
&lt;p&gt;Personnellement, j&#39;ai tous ces fichiers sur mon PC :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Mes images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;favicon.ico&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;  header.png&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;  logo.png&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Les librairies Javascript&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;marked.min.js&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;  purify.min.js&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Les fichiers HTML&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;index.html&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;  news.html&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Tous les fichiers HTML ne sont en vrai qu&#39;un seul et même fichier : ce sont des liens durs (&lt;em&gt;hard
links&lt;/em&gt;) d&#39;un seul fichier, créés avec la commande &lt;code&gt;ln&lt;/code&gt; sous Linux.&lt;/li&gt;
&lt;li&gt;Sinon, ça fonctionne très bien aussi d&#39;éditer toujours le même fichier puis de le copier en écrasant
les autres, mais c&#39;est plus sujet à erreur.&lt;/li&gt;
&lt;li&gt;Encore une autre solution, c&#39;est d&#39;envoyer le même fichier côté serveur web pour toutes les routes qui finissent
par .html. Mais ça demande un accès au serveur web, ce qui n&#39;est pas mon cas sur de l&#39;hébergement
mutualisé Free.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Je mets à jour le HTML du site avec un :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; rsync&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ./&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; host:/path/to/directory&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;Partant ce principe, c&#39;est assez facile de faire sa sauce et de faire plein de petites améliorations
je pense !&lt;/p&gt;
&lt;p&gt;Notamment :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Afficher une erreur en Javascript si on arrive pas à récupérer le contenu.&lt;/li&gt;
&lt;li&gt;Cacher le Markdown avec du PHP côté serveur, pour résister à une éventuelle panne de Hedgedoc.&lt;/li&gt;
&lt;li&gt;Faire le rendu Markdown → HTML → HTML assaini, côté serveur, pour se débarasser du Javascript&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mais j&#39;ai la flemme 🙃&lt;/p&gt;
&lt;p&gt;Voilà, hésitez pas à vous abonner, à cliquer sur la cloche, tout ça...&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Mon flux RSS en bas à droite&lt;/em&gt; ↘&lt;/p&gt;
&lt;!-- vim: set tw=100 : --&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Auto-hébergement : adresse IPv6 dynamique avec une zone DNS chez OVH</title>
        <published>2024-02-29T00:00:00+00:00</published>
        <updated>2024-02-29T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/dyndns-ovh/"/>
        <id>https://blog.ppom.me/dyndns-ovh/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/dyndns-ovh/">&lt;p&gt;La plupart des personnes qui font de l&#39;informatique savent très bien qu&#39;IPv4 c&#39;est fini, en théorie,
et qu&#39;&lt;a rel=&quot;external&quot; href=&quot;https://www.internetsociety.org/deploy360/ipv6/faq/&quot;&gt;il est grand temps de passer à IPv6&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pourtant, malgré plusieurs années d&#39;auto-hébergement, je n&#39;avais jamais franchi le pas.
La faute à plusieurs paramètres :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mon fournisseur d&#39;accès Internet, Free, permet d&#39;avoir une adresse IPv4 fixe (ex &lt;code&gt;1.2.3.4&lt;/code&gt;), mais
ne garantit pas de préfixe IPv6 fixe (ex &lt;code&gt;12:34:ab:cd:/64&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Mon registraire et hébergeur de ma zone DNS, OVH, supporte DynHost, une façon d&#39;automatiser
facilement la mise à jour d&#39;une entrée DNS. Mais que pour IPv4 🤡&lt;/li&gt;
&lt;li&gt;En pratique je comprenais pas si bien comment ça marchait IPv6 sur des réseaux domestiques&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;determiner-son-adresse-ipv6&quot;&gt;Déterminer son adresse IPv6&lt;a class=&quot;zola-anchor&quot; href=&quot;#determiner-son-adresse-ipv6&quot; aria-label=&quot;Anchor link for: determiner-son-adresse-ipv6&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;details&gt;
&lt;summary&gt;Préfixe IPv6 ? De quoi on parle ?&lt;/summary&gt;
&lt;blockquote&gt;
&lt;p&gt;Attention : je fais des raccourcis, je suis pas en train de faire un cours sur IPv6 (j&#39;en serais
d&#39;ailleurs pas capable). L&#39;idée c&#39;est d&#39;avoir une vue d&#39;ensemble suffisante pour
pratico-pratiquer. Mais n&#39;hésitez pas à me corriger si je dis des grosses bêtises 😉&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Il y a ~ 2 milliards d&#39;adresses IPv4, qui sont de plus en plus rares et chères. Pour minimiser leurs
coûts, et tout simplement avoir assez d&#39;adresses, les FAI ne donnent qu&#39;une adresse IPv4 par box.
(Souvent, ils partagent même une IP entre plusieurs box. Dans ce cas, il faut demander une adresse
IPv4 full-stack, c&#39;est-à-dire non partagée.)&lt;/p&gt;
&lt;p&gt;Mais chaque appareil connecté au réseau doit avoir sa propre adresse IP pour être joignable ! Avec
IPv4, la box fait ce qu&#39;on appelle du
&lt;a rel=&quot;external&quot; href=&quot;https://en.wikipedia.org/wiki/Network_address_translation&quot;&gt;NAT&lt;/a&gt; : elle donne aux appareils une
adresse IPv4 privée (souvent en &lt;code&gt;192.168.X.XXX&lt;/code&gt;), et quand ils envoient un paquet, elle remplace
l&#39;adresse privée par sa propre adresse IPv4 publique, envoie le paquet à l&#39;internet mondial
décentralisé, et fait le tour de passe-passe inverse quand elle reçoit un paquet depuis l&#39;internet
et le transfère à un appareil local.&lt;/p&gt;
&lt;p&gt;Franchement, relou, quoi. On peut pas avoir une vraie adresse publique par appareil ?&lt;/p&gt;
&lt;p&gt;Ben avec IPv6, si, carrément. Et même des centaines d&#39;adresses par appareil si on veut : il y a
plus d&#39;adresses IPv6 que d&#39;atomes dans l&#39;univers (ou quelque chose comme ça 😋).&lt;/p&gt;
&lt;p&gt;Là où on avait grosso modo 2^32 adresses IPv4 (&lt;em&gt;parce qu&#39;elles font 32 bits&lt;/em&gt;), on a maintenant grosso
modo 2^128 adresses IPv6 (&lt;em&gt;parce qu&#39;elles font... 128 bits. bravo !&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Donc ce qu&#39;ont l&#39;air de faire la plupart des FAI, c&#39;est qu&#39;ils donnent un &quot;préfixe&quot; de 64 bits à
ta box.&lt;/p&gt;
&lt;p&gt;Exemple : &lt;code&gt;2a01:e0a:b3a:1dd0::/64&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Et ensuite, chaque appareil connecté à internet via la box se choisit dans son coin une adresse
aléatoire en complétant au pif les 64 octets qui restent.&lt;/p&gt;
&lt;p&gt;Exemple : &lt;code&gt;2a01:e0a:b3a:1dd0:694a:810f:1f18:9b9/64&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Et ça marche ! La chance qu&#39;il y ait une collision est vraiment négligeable : 1 / 2^64.&lt;/p&gt;
&lt;hr /&gt;
&lt;/details&gt;
&lt;p&gt;En pratique, les ordinateurs semblent jongler avec plusieurs IPv6s temporaires.
Sur mon serveur :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ip&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; address&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Ça c&amp;#39;est mon interface *loopback*, on s&amp;#39;en fout&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;1:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; lo:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;LOOPBACK,UP,LOWER_U&lt;/span&gt;&lt;span&gt;P&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; mtu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 65536&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; qdisc&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; noqueue&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; state&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; UNKNOWN&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; group&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; qlen&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    link/loopback&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 00:00:00:00:00:00&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; brd&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 00:00:00:00:00:00&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 127.0.0.1/8&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; host&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; lo&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; forever&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; forever&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ::1/128&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; host&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; noprefixroute&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; forever&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; forever&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Ça c&amp;#39;est l&amp;#39;interface de ma connexion ethernet.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; La votre ne s&amp;#39;appelle ptet pas enp6s0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; (elle peut avoir un nom comme eno1, eth0, etc)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;2:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; enp6s0:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;BROADCAST,MULTICAST,UP,LOWER_U&lt;/span&gt;&lt;span&gt;P&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; mtu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1500&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; qdisc&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; fq_codel&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; state&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; UP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; group&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; qlen&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 1000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Mon adresse MAC&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    link/ether&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; b5:1d:96:b8:01:f1&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; brd&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ff:ff:ff:ff:ff:ff&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Mon adresse IPv4 privée&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 192.168.1.35/24&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; brd&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 192.168.1.255&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; noprefixroute&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; enp6s0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;                        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; preferred lifetime pas à zéro&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 36422sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 31022sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Seule adresse IPv6 &amp;quot;temporary&amp;quot; pas &amp;quot;deprecated&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; (j&amp;#39;ai raccourci les adresses pour la lisibilité)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 2a01::cf08/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; temporary&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 86387sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 54092sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Toutes les adresses &amp;quot;deprecated&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 2a01::2879/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; temporary&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 86387sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 0sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 2a01::46c3/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; temporary&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 86387sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 0sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 2a01::eeed/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; temporary&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 86387sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 0sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 2a01::4ab6/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; temporary&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 86387sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 0sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 2a01::a15a/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; temporary&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 86387sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 0sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 2a01::5758/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; temporary&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 56383sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 0sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Seule adresse IPv6 pas &amp;quot;temporary&amp;quot; ni &amp;quot;deprecated&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 2a01::2c1/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; dynamic&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; mngtmpaddr&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; noprefixroute&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;                        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; preferred lifetime pas à zéro&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 86387sec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; 86387sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Celle-ci elle compte pas, c&amp;#39;est une adresse locale&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; (&amp;quot;scope link&amp;quot;, commence par fe80)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; La suite c&amp;#39;est mon adresse MAC,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; avec un ff:fe inséré au milieu, si vous suivez 😉&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; fe80::b51d:96ff:feb8:1f1/64&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; link&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;       valid_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; forever&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; preferred_lft&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; forever&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Avec l&#39;option &lt;code&gt;-j&lt;/code&gt;/&lt;code&gt;--json&lt;/code&gt;, &lt;code&gt;ip a[ddress]&lt;/code&gt; nous donne une sortie en JSON, plus pratique pour en
extraire des données.
Ça nous sort un truc comme ça :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ifname&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;nom&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;addr_info&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;family&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;inet&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;2a01:e0a:b3a:1dd0:6750:6872:c4f7:4ab6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;dynamic&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; true&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; true&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;preferred_life_time&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;details&gt;
&lt;summary&gt;Extraction de l&#39;IP avec la commande `jq`&lt;/summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Condensé :&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ ip -j a | ${pkgs.jq}/bin/jq -r &amp;#39;[.[] | select(.ifname == &amp;quot;enp6s0&amp;quot;) | .addr_info[] | select(.scope == &amp;quot;global&amp;quot;) | select(.family == &amp;quot;inet6&amp;quot;) | select(.deprecated == false or has(&amp;quot;deprecated&amp;quot;) | not)] | max_by(.preferred_life_time) | .local&amp;#39;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2a01:e0a:b3a:1dd0:b62e:99ff:fec7:2c1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Étendu :&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# ip address avec une sortie JSON&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ ip --json address \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  | ${pkgs.jq}/bin/jq -r &amp;#39;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      # On récupère tous les items de la liste&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      .[]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      # On ne garde que l&amp;#39;item qui porte le nom enp6s0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      | select(.ifname == &amp;quot;enp6s0&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      # On récupère les items de la liste addr_info&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      | .addr_info[]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      # On ne garde que les items qui sont publiques&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      | select(.scope == &amp;quot;global&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      # Et en ipv6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      | select(.family == &amp;quot;inet6&amp;quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      # Et qui sont pas dépréciées&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      | select(.deprecated == false or has(&amp;quot;deprecated&amp;quot;) | not)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    # On refait une liste du stream obtenu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    # On récupère celle qui a le plus long preferred_life_time&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    # (celle qui restera le plus longtemps)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    | max_by(.preferred_life_time)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    # On récupère l&amp;#39;IP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    | .local&amp;#39;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2a01:e0a:b3a:1dd0:b62e:99ff:fec7:2c1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/details&gt;
&lt;details&gt;
&lt;summary&gt;Extraction de l&#39;IP en python&lt;/summary&gt;
&lt;p&gt;Je le refais en python parce qu&#39;on va en avoir besoin plus tard :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; json&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; subprocess&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Mettre ici le nom de l&amp;#39;interface qui nous intéresse&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;INTERFACE_NAME&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;enp6s0&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; getIp&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On exécute la commande `ip --json address`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    res&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; subprocess&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;run&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ip&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;--json&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;address&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;        capture_output&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;True&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;        text&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;True&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On parse le JSON&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    data&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; json&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;loads&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;res&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;stdout&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    addresses&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère le champ addr_info&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        interface&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;addr_info&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;        for&lt;/span&gt;&lt;span&gt; interface&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; in&lt;/span&gt;&lt;span&gt; data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; De l&amp;#39;interface paramétrée&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;        if&lt;/span&gt;&lt;span&gt; interface&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ifname&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; INTERFACE_NAME&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Et on ne garde que le premier&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; (et seul) élément de la liste&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère l&amp;#39;élément max&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ipv6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; max&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; de cette liste&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            address&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;            for&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; in&lt;/span&gt;&lt;span&gt; addresses&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;adresse est publique&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;            if&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;adresse est une IPv6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;            and&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;family&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;adresse n&amp;#39;est pas dépréciée&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;            and&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; not&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; in&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; and&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ]&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; en calculant quel est l&amp;#39;élément max&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; par son preferred_life_time&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;        key&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;lambda&lt;/span&gt;&lt;span&gt; a&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; a&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;preferred_life_time&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On ne garde plus que l&amp;#39;adresse en elle-même&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    return&lt;/span&gt;&lt;span&gt; ipv6&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/details&gt;
&lt;h1 id=&quot;mettre-a-jour-sa-zone-dns-avec-ovh&quot;&gt;Mettre à jour sa zone DNS avec OVH&lt;a class=&quot;zola-anchor&quot; href=&quot;#mettre-a-jour-sa-zone-dns-avec-ovh&quot; aria-label=&quot;Anchor link for: mettre-a-jour-sa-zone-dns-avec-ovh&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Ici, je suppose que vous avez une compréhension basique de ce qu&#39;est une zone DNS.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Ptite explication quand même&lt;/summary&gt;
&lt;p&gt;C&#39;est une liste de &lt;em&gt;records&lt;/em&gt; (entrées), avec une clé, qui est le nom ou sous-nom de domaine
concerné, et une valeur, dont le sens dépend du type du &lt;em&gt;record&lt;/em&gt; :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;A&lt;/code&gt; : la valeur est une IPv4.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AAAA&lt;/code&gt; : la valeur est une IPv6&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CNAME&lt;/code&gt; : la valeur un autre nom de domaine. C&#39;est comme un pointeur en programmation, pour toute
question (&lt;code&gt;A&lt;/code&gt;, &lt;code&gt;AAAA&lt;/code&gt;, ...) concernant le nom de domaine en clé, demande au nom de domaine en valeur
à la place.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Il y a plein d&#39;autres champs qui ne nous intéressent pas aujourd&#39;hui.
Si vous ne savez pas ce que fait un champ, ne le supprimez pas au pif, ça pourrait faire des
problèmes.&lt;/p&gt;
&lt;p&gt;Exemple, dans le cas de la zone de &lt;code&gt;ppom.me&lt;/code&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Tous les sous-noms de domaine de ppom.me (*.ppom.me) sont&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# redirigés vers musi (musi.ppom.me)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*      IN CNAME musi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# musi (musi.ppom.me) est redirigé vers ppom.me.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# (&amp;#39;.&amp;#39; à la fin = on ne parle pas d&amp;#39;un sous-nom de domaine)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;musi   IN CNAME ppom.me.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Si la clé (premier champ) est omise, c&amp;#39;est qu&amp;#39;on parle du&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# nom de domaine en lui-même,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# pas d&amp;#39;un sous-nom de domaine&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# ppom.me est joignable à l&amp;#39;adresse IPv4 1.2.3.4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       IN A 1.2.3.4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# ppom.me est joignable à l&amp;#39;adresse IPv6 a:b:c:d:5:6:7:8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       IN AAAA a:b:c:d:5:6:7:8&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/details&gt;
&lt;p&gt;Dans l&#39;interface web d&#39;OVH, on a une interface qui permet de tout éditer facilement.
Je vous propose de vous assurer que vous avez bien une entrée &lt;code&gt;AAAA&lt;/code&gt; pour le nom de domaine qui vous
intéresse, puis on va le mettre à jour avec un script python !&lt;/p&gt;
&lt;h2 id=&quot;les-parties-de-l-api-qui-nous-interessent&quot;&gt;Les parties de l&#39;API qui nous intéressent&lt;a class=&quot;zola-anchor&quot; href=&quot;#les-parties-de-l-api-qui-nous-interessent&quot; aria-label=&quot;Anchor link for: les-parties-de-l-api-qui-nous-interessent&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Il nous faut d&#39;abord nous familiariser avec l&#39;API d&#39;OVH.
&lt;a rel=&quot;external&quot; href=&quot;https://eu.api.ovh.com/console-preview/?section=%2Fdomain&amp;amp;branch=v1#get-/domain/zone&quot;&gt;L&#39;API est documentée
ici&lt;/a&gt;. C&#39;est
toute la partie &lt;code&gt;/domain/zone&lt;/code&gt; qui nous intéresse : elle permet d&#39;éditer la zone DNS d&#39;un domaine.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://eu.api.ovh.com/console/&quot;&gt;On peut aussi jouer pour de vrai avec l&#39;API ici&lt;/a&gt;, en se connectant
avec son compte OVH et en mettant des vrais paramètres aux requêtes pour tester dans une interface
avant d&#39;essayer de le faire en programmation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Là je pars du principe qu&#39;on ne va pas créer de nouveau &lt;em&gt;record&lt;/em&gt;, mais seulement d&#39;éditer celui (ou
ceux) qui nous intéresse.&lt;/p&gt;
&lt;p&gt;Pour chaque &lt;em&gt;record&lt;/em&gt; a éditer :&lt;/p&gt;
&lt;h3 id=&quot;recuperer-l-id&quot;&gt;Récupérer l&#39;id&lt;a class=&quot;zola-anchor&quot; href=&quot;#recuperer-l-id&quot; aria-label=&quot;Anchor link for: recuperer-l-id&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;On doit récupérer son id avec&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;GET /domain/zone/{domain}/record&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Exemple 1, le champ &lt;code&gt;A&lt;/code&gt; de musi.ppom.me :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;GET /domain/zone/ppom.me/record?subDomain=musi&amp;amp;fieldType=A&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Exemple 2, le champ &lt;code&gt;AAAA&lt;/code&gt; de ppom.me :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;GET /domain/zone/ppom.me/record?fieldType=AAAA&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Exemple de réponse : &lt;code&gt;[123456]&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;recuperer-ses-infos&quot;&gt;Récupérer ses infos&lt;a class=&quot;zola-anchor&quot; href=&quot;#recuperer-ses-infos&quot; aria-label=&quot;Anchor link for: recuperer-ses-infos&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Avec son id en poche, on peut récupérer ses infos avec :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;GET /domain/zone/{domain}/record/{id}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Exemple avec l&#39;id précédent :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;GET /domain/zone/ppom.me/record/123456&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Exemple de réponse :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;fieldType&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;AAAA&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 123456&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;subDomain&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;2a01:e0a:b3a:1dd0:b62e:99ff:fec7:2c1&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ttl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;zone&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ppom.me&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&quot;mettre-a-jour-l-adresse-ip&quot;&gt;Mettre à jour l&#39;adresse IP&lt;a class=&quot;zola-anchor&quot; href=&quot;#mettre-a-jour-l-adresse-ip&quot; aria-label=&quot;Anchor link for: mettre-a-jour-l-adresse-ip&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Si on voit que l&#39;IPv6 n&#39;est pas celle qu&#39;on veut, on met à jour le &lt;em&gt;record&lt;/em&gt; avec&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PUT /domain/zone/{domain}/record/{id}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Avec &lt;code&gt;PUT&lt;/code&gt; on ne met à jour qu&#39;on veut changer, sans tout remplacer. C&#39;est pratique.&lt;/p&gt;
&lt;p&gt;Exemple avec l&#39;id précédent :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PUT /domain/zone/ppom.me/record/123456&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Avec dans le corps de la requête :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;2a01:e0a:b3a:1dd0:b62e:99ff:fec7:2c1&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;La réponse est vide.&lt;/p&gt;
&lt;h3 id=&quot;publier-la-nouvelle-zone&quot;&gt;Publier la nouvelle zone&lt;a class=&quot;zola-anchor&quot; href=&quot;#publier-la-nouvelle-zone&quot; aria-label=&quot;Anchor link for: publier-la-nouvelle-zone&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Dans mon cas, je n&#39;ai qu&#39;un &lt;em&gt;record&lt;/em&gt; à changer, mais vous en avez peut-être plusieurs.
Une fois qu&#39;on a fait tous les changements qu&#39;on voulait, il faut dire à OVH de publier cette
nouvelle version de la zone DNS avec un&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;GET /domain/zone/{domain}/refresh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Dans mon cas :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;GET /domain/zone/ppom.me/refresh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;authentification&quot;&gt;Authentification&lt;a class=&quot;zola-anchor&quot; href=&quot;#authentification&quot; aria-label=&quot;Anchor link for: authentification&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Si vous avez utilisé la console OVH pour tester les requêtes, vous avez dû voir que vous créiez un
token pour utiliser l&#39;API.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/ovh-authorize.png&quot; alt=&quot; OVH API console wants to access your account. This application will have accessto: GET /*, POST /*, PUT /*, DELETE /* &quot; /&gt;&lt;/p&gt;
&lt;p&gt;Ici on voit que cette autorisation porte sur toutes les actions possibles (&lt;code&gt;/*&lt;/code&gt; sur les 4 méthodes
GET, POST, PUT, DELETE). Ça allait tant qu&#39;on jouait temporairement dans la console, mais j&#39;ai pas
envie de donner autant de pouvoirs à mon serveur, qui n&#39;a que besoin de mettre à jour sa zone DNS.&lt;/p&gt;
&lt;p&gt;Pour créer un jeton d&#39;authentification, &lt;em&gt;token&lt;/em&gt;, on va ouvrir notre plus beau navigateur (sûrement
Firefox 🦊) et ouvrir ce lien (remplacer ppom.me par votre zone):&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://api.ovh.com/createToken/index.cgi?GET=/domain/zone*&amp;amp;PUT=/domain/zone/ppom.me/record/*&amp;amp;POST=/domain/zone/ppom.me/refresh&quot;&gt;https://api.ovh.com/createToken/index.cgi?GET=/domain/zone*&amp;amp;PUT=/domain/zone/ppom.me/record/*&amp;amp;POST=/domain/zone/ppom.me/refresh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Remplir les champs, notamment le temps de validité, qu&#39;on va mettre à &lt;em&gt;Unlimited&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/ovh-new-token.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Bien sauvegarder quelque part les 3 secrets qui nous sont donnés.&lt;/p&gt;
&lt;h2 id=&quot;utiliser-l-api-d-ovh-en-python&quot;&gt;Utiliser l&#39;API d&#39;OVH en Python&lt;a class=&quot;zola-anchor&quot; href=&quot;#utiliser-l-api-d-ovh-en-python&quot; aria-label=&quot;Anchor link for: utiliser-l-api-d-ovh-en-python&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;OVH propose un paquet Python pour faciliter l&#39;utilisation de son API.
On va pas cracher dans la soupe et utiliser leur paquet. C&#39;est pour ça que j&#39;ai choisi le Python
d&#39;aileurs !&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Je ne sais pas installer un paquet Python !&lt;/summary&gt;
&lt;p&gt;Trop dommage !&lt;/p&gt;
&lt;p&gt;C&#39;est un peut comme &lt;code&gt;package.json&lt;/code&gt;/&lt;code&gt;node_modules&lt;/code&gt; en Javascript.&lt;/p&gt;
&lt;p&gt;Y&#39;a moults tutos sur Internet qui expliqueront ça mieux que moi, mais en gros :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Créer un &amp;quot;environnement virtuel&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; dans un nouveau dossier ~/.python-ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; J&amp;#39;ai mis ~/.python-ovh, mais&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; ça peut aussi être /opt/ovh, ou ce que tu veux.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; python3&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;m&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; venv&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ~/.python-ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; &amp;quot;Entrer&amp;quot; dans le venv&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; source&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ~/.python-ovh/bin/activate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Installer le paquet ovh dans le venv&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; python3&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;m&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; pip&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; C&amp;#39;est bon !&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; python3&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; mon_script_qui_a_besoin_du_paquet_ovh.py&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Pour &amp;quot;sortir&amp;quot; du venv :&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; deactivate&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Pour les prochaines fois, il suffit de l&#39;activer/désactiver :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; source&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ~/.python-ovh/bin/activate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; python3&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; mon_script_qui_a_besoin_du_paquet_ovh.py&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; deactivate&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/details&gt;
&lt;p&gt;Pour se connecter à OVH dans notre script, on va avoir besoin des secrets récupérés plus haut.
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/ovh/python-ovh?tab=readme-ov-file#environment-vars-and-predefined-configuration-files&quot;&gt;Le paquet OVH propose plusieurs
méthodes&lt;/a&gt;.
On peut passer par un fichier de configuration.
Perso je préfère passer par les variables d&#39;environnement :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;OVH_ENDPOINT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;v&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;u&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;OVH_APPLICATION_KEY&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;OVH_APPLICATION_SECRET&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;OVH_CONSUMER_KEY&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cette fonction Python prend en paramètre une IP qu&#39;on a déjà récupérée avec &lt;code&gt;ip address&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; sys&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Mettre ici la zone qu&amp;#39;on veut éditer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ppom.me&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; updateIp&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On initialise le client OVH&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    client&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; ovh&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Client&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère le champ qui nous intéresse.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; En l&amp;#39;occurence, le AAAA de ppom.me.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;get&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record?fieldType=AAAA&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si le tableau est vide, c&amp;#39;est caca&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; len&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;error no AAAA &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;. record&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; file&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;sys&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;stderr&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        sys&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;exit&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère le premier et seul élément du tableau retourné&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; recordId&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère ses informations, maintenant qu&amp;#39;on a l&amp;#39;id&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    recordData&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;get&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; En particulier, l&amp;#39;IP.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; recordData&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;IP ne correspond pas à celle qu&amp;#39;on a récupérée avec `ip address`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    if&lt;/span&gt;&lt;span&gt; oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; !=&lt;/span&gt;&lt;span&gt; newIp&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On met à jour l&amp;#39;IP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;put&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; target&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On publie la nouvelle version de la zone&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;post&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/refresh&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;update from &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; to &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    else&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;unchanged &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;details&gt;
&lt;summary&gt;Si on veut mettre à jour plusieurs records&lt;/summary&gt;
&lt;p&gt;On va boucler sur tous les records à mettre à jour :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; sys&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Mettre ici la zone qu&amp;#39;on veut éditer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ppom.me&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;RECORDS&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record?fieldType=AAAA&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record?fieldType=AAAA&amp;amp;subDomain=musi&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; updateIp&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On initialise le client OVH&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    client&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; ovh&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Client&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    modificated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; False&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    for&lt;/span&gt;&lt;span&gt; recordUrl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; in&lt;/span&gt;&lt;span&gt; records&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère le champ qui nous intéresse.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;get&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;recordUrl&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si le tableau est vide, c&amp;#39;est caca&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; len&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;            print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;error no &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;recordUrl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; record&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; file&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;sys&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;stderr&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            sys&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;exit&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère le premier et seul élément du tableau retourné&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; recordId&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère ses informations, maintenant qu&amp;#39;on a l&amp;#39;id&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        recordData&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;get&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; En particulier, l&amp;#39;IP.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; recordData&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;IP ne correspond pas à celle qu&amp;#39;on a récupérée avec `ip address`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;        if&lt;/span&gt;&lt;span&gt; oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; !=&lt;/span&gt;&lt;span&gt; newIp&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            modificated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; True&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On met à jour l&amp;#39;IP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;put&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; target&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    if&lt;/span&gt;&lt;span&gt; modificated&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On publie la nouvelle version de la zone&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;post&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/refresh&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;update from &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; to &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    else&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;unchanged &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/details&gt;
&lt;details&gt;
&lt;summary&gt;Fichier complet&lt;/summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; json&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; subprocess&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; sys&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;import&lt;/span&gt;&lt;span&gt; ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Mettre ici le nom de l&amp;#39;interface qui nous intéresse&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;INTERFACE_NAME&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;enp6s0&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Mettre ici la zone qu&amp;#39;on veut éditer&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ppom.me&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; getIp&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On exécute la commande `ip --json address`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    res&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; subprocess&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;run&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ip&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;--json&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;address&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; capture_output&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;True&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; text&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;True&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On parse le JSON&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    data&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; json&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;loads&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;res&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;stdout&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    addresses&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère le champ addr_info&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        interface&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;addr_info&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;        for&lt;/span&gt;&lt;span&gt; interface&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; in&lt;/span&gt;&lt;span&gt; data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; De l&amp;#39;interface paramétrée&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;        if&lt;/span&gt;&lt;span&gt; interface&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ifname&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; INTERFACE_NAME&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Et on ne garde que le premier (et seul) élément de la liste&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère l&amp;#39;élément max&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ipv6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; max&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; de cette liste&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            address&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;            for&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; in&lt;/span&gt;&lt;span&gt; addresses&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;adresse est publique&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;            if&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;adresse est une IPv6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;            and&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;family&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;inet6&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;            #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;adresse n&amp;#39;est pas dépréciée&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;            and&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; not&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; in&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; and&lt;/span&gt;&lt;span&gt; address&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;deprecated&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ]&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; en calculant quel est l&amp;#39;élément max par son preferred_life_time&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;        key&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;lambda&lt;/span&gt;&lt;span&gt; a&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; a&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;preferred_life_time&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On ne garde plus que l&amp;#39;adresse en elle-même&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    return&lt;/span&gt;&lt;span&gt; ipv6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; updateIp&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On initialise le client OVH&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    client&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; ovh&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Client&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère le champ qui nous intéresse.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; En l&amp;#39;occurence, le AAAA de ppom.me.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;get&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record?fieldType=AAAA&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si le tableau est vide, c&amp;#39;est caca&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; len&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 0&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;error no AAAA &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;. record&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; file&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;sys&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;stderr&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        sys&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;exit&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère le premier et seul élément du tableau retourné&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; recordId&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;0&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On récupère ses informations, maintenant qu&amp;#39;on a l&amp;#39;id&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    recordData&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;get&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; En particulier, l&amp;#39;IP.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; recordData&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;    #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Si l&amp;#39;IP ne correspond pas à celle qu&amp;#39;on a récupérée avec `ip address`&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    if&lt;/span&gt;&lt;span&gt; oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; !=&lt;/span&gt;&lt;span&gt; newIp&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On met à jour l&amp;#39;IP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;put&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/record/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;recordId&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt; target&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;        #&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On publie la nouvelle version de la zone&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        client&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;post&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/domain/zone/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;ZONE&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/refresh&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;update from &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; to &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;newIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;    else&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;unchanged &lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;{&lt;/span&gt;&lt;span&gt;oldIp&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; On exécute tout ça&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;updateIp&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;getIp&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/details&gt;
&lt;h2 id=&quot;execution-du-script&quot;&gt;Exécution du script&lt;a class=&quot;zola-anchor&quot; href=&quot;#execution-du-script&quot; aria-label=&quot;Anchor link for: execution-du-script&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ici, on part du principe que :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;les variables d&#39;environnement sont dans un fichier &lt;code&gt;/var/secrets/ovh&lt;/code&gt; (lisibles que depuis
l&#39;utilisateur qui en a besoin, faire le &lt;code&gt;chmod&lt;/code&gt;/&lt;code&gt;chown&lt;/code&gt; qui convient !)&lt;/li&gt;
&lt;li&gt;le venv est à &lt;code&gt;/usr/local/lib/ovh&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;le script python est exécutable et à &lt;code&gt;/usr/local/lib/update-zone.py&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; charger venv&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; source&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; /usr/local/lib/ovh/bin/activate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; charger env vars&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; source&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; /var/secrets/ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; +a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; exécuter script&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; python3&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; /usr/local/lib/update-zone.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On peut créer un fichier qui fait tout ça :
&lt;code&gt;/usr/local/bin/update-zone&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#!&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;/usr/bin/env bash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; /usr/local/lib/ovh/bin/activate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; /var/secrets/ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; +a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;python3&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; /usr/local/lib/update-zone.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;automatisation&quot;&gt;Automatisation&lt;a class=&quot;zola-anchor&quot; href=&quot;#automatisation&quot; aria-label=&quot;Anchor link for: automatisation&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Maintenant qu&#39;on a notre script &lt;code&gt;/usr/local/bin/update-zone&lt;/code&gt; et qu&#39;il fonctionne (à vérifier de son
côté !), on peut le mettre dans un &lt;code&gt;cron&lt;/code&gt; pour qu&#39;il soit exécuté toutes les 15 minutes :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; crontab&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;e&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ajouter ceci :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*/15 * * * * /usr/local/bin/update-zone&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Voir aussi : &lt;a rel=&quot;external&quot; href=&quot;https://cron.help/#*/15_*_*_*_*&quot;&gt;Comprendre la syntaxe CRON&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Perso, je n&#39;utilise pas cron, mais systemd. Ça demande un peu plus de fichiers et tout, mais les
fonctionnalités sont bien plus nombreuses.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Automatisation avec systemd&lt;/summary&gt;
&lt;p&gt;On va créer un fichier &lt;code&gt;.service,&lt;/code&gt; qui décrit une action à effectuer, et un fichier &lt;code&gt;.timer,&lt;/code&gt; qui va
lancer périodiquement l&#39;exécution du fichier .service du même nom.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/etc/systemd/system/update-zone.service&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;systemd&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Unit]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;Description&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;Mettre à jour l&amp;#39;entrée IPv6 d&amp;#39;une zone DNS chez OVH&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;Documentation&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;https://blog.ppom.me/dyndns-ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Service]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;EnvironmentFile&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;/var/secrets/ovh-token&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ExecStart&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;bash -c &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;source /usr/local/lib/ovh/bin/activate &amp;amp;&amp;amp; python3 /usr/local/lib/update-zone.py&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;/etc/systemd/system/update-zone.timer&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;systemd&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Unit]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;Description&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;Mettre à jour l&amp;#39;entrée IPv6 d&amp;#39;une zone DNS chez OVH&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;Documentation&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;https://blog.ppom.me/dyndns-ovh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Timer]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;OnCalendar&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;*:0/10&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Install]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;WantedBy&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;multi-user.target&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Maintenant on doit dire à systemd de prendre en compte ces nouveaux fichiers :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; systemctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; daemon-reload&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;D&#39;activer le timer au démarrage :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; systemctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; enable&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; update-zone.timer&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Et de l&#39;activer maintenant :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; systemctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; start&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; update-zone.timer&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Si on veut lancer le script tout de suite maintenant, pour vérifier que ça marche bien :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; systemctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; start&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; update-zone.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On peut voir les logs avec :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; ajouter -e pour aller à la fin des logs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; ajouter -f pour voir les nouveaux logs arriver en live&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; update-zone&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;/details&gt;
&lt;p&gt;Et voilà, il n&#39;y a plus qu&#39;à attendre sagement que son adresse IPv6 change et s&#39;extasier d&#39;avoir
enfin connecté son serveur au réseau IPv6, le futuur !&lt;/p&gt;
&lt;!-- vim: set tw=100 : --&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>reaction, in replacement of fail2ban</title>
        <published>2023-11-24T00:00:00+00:00</published>
        <updated>2023-11-24T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/en-reaction/"/>
        <id>https://blog.ppom.me/en-reaction/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/en-reaction/">&lt;p&gt;&lt;em&gt;This article is also &lt;a href=&quot;/fr-reaction&quot;&gt;available in 🇫🇷 French&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;concerns&quot;&gt;Concerns&lt;a class=&quot;zola-anchor&quot; href=&quot;#concerns&quot; aria-label=&quot;Anchor link for: concerns&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;This article is formulated to show that the program I made is useful &lt;del&gt;to society&lt;/del&gt; to server administrators.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;problem&quot;&gt;Problem&lt;a class=&quot;zola-anchor&quot; href=&quot;#problem&quot; aria-label=&quot;Anchor link for: problem&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A lot of people are writing programs (called bots) which scan the Internet and try to break in servers (the computers behind the Internet) they find.
Most often, when they get control of a server, they will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mine cryptocurrencies,&lt;/li&gt;
&lt;li&gt;send mail spam,&lt;/li&gt;
&lt;li&gt;use this server to attack others,&lt;/li&gt;
&lt;li&gt;or steal the data on the server and blackmail its owners to give it back.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;All those examples are problematic. The last one over others, because a server often contains sensitive data for its users.&lt;/p&gt;
&lt;p&gt;As an example, at the Picasoft non-profit, we host an alternative messaging app, facing the web giants.
If a bot accesses the server, it can retrieve all their conversations, which is true for any online service.&lt;/p&gt;
&lt;p&gt;It&#39;s therefore important to protect your servers well.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;solution&quot;&gt;Solution&lt;a class=&quot;zola-anchor&quot; href=&quot;#solution&quot; aria-label=&quot;Anchor link for: solution&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The honorable &lt;a rel=&quot;external&quot; href=&quot;https://github.com/fail2ban/fail2ban&quot;&gt;fail2ban&lt;/a&gt; is a software that permits to ban bots which blindly try to break a server&#39;s barriers.&lt;/p&gt;
&lt;p&gt;Its principle is simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Various programs, or services, are executed on a server.
&lt;ul&gt;
&lt;li&gt;The most common is the SSH service, which permits to remotely connect to the server on which it is running.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Each service writes logs, which are information about incoming events.
&lt;ul&gt;
&lt;li&gt;For SSH, one of those events is &quot;&lt;em&gt;[such IP address] tried to connect with a bad password&lt;/em&gt;&quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;fail2ban scan those logs.
&lt;ul&gt;
&lt;li&gt;After a few failed login attempts, fail2ban updates its server&#39;s firewall so that it blocks the IP address for a certain amount of time.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;problem-of-the-solution&quot;&gt;Problem of the solution&lt;a class=&quot;zola-anchor&quot; href=&quot;#problem-of-the-solution&quot; aria-label=&quot;Anchor link for: problem-of-the-solution&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Fail2ban does correctly its job. However, I have 2 concerns about it:&lt;/p&gt;
&lt;h4 id=&quot;slowness-consumption&quot;&gt;Slowness/consumption&lt;a class=&quot;zola-anchor&quot; href=&quot;#slowness-consumption&quot; aria-label=&quot;Anchor link for: slowness-consumption&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To treat the logs of various services on my server, fail2ban used to take approximately 1 hour of work (CPU) per week.
It may look like it&#39;s few, but it&#39;s actually a lot, taking into account the little traffic on my server. fail2ban is just reading text and sending actions to the firewall!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;As a comparison, it&#39;s as much as the Funkwhale service on my server, a Spotify alternative, which does much more:
Funkwhale permits me to listen to my music, from my devices, and I use it around 24h a week.
It&#39;s a heavier task.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fail2ban also consumes a lot of RAM, and gets easily to 300 MB.&lt;/p&gt;
&lt;p&gt;On a server with more traffic, it can quickly become a real problem. So I wanted a solution that consumes less.&lt;/p&gt;
&lt;h4 id=&quot;complexity-of-a-very-abstract-configuration&quot;&gt;Complexity of a very abstract configuration...&lt;a class=&quot;zola-anchor&quot; href=&quot;#complexity-of-a-very-abstract-configuration&quot; aria-label=&quot;Anchor link for: complexity-of-a-very-abstract-configuration&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Fail2ban has a very large default configuration.&lt;/p&gt;
&lt;p&gt;There is a lot of preliminary engineering, which aims to make configuration as easy as possible for the server admin.&lt;/p&gt;
&lt;p&gt;It comes with default rules for a lot of different firewalls and services, divided across 160 files, containing 2600 lines (8900 including comments and newlines).&lt;/p&gt;
&lt;p&gt;Finally, this configuration makes getting familiar with it harder:
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/fail2ban/fail2ban/blob/06d2623/config/action.d/iptables.conf&quot;&gt;&lt;code&gt;iptables&lt;/code&gt; action&#39;s file&lt;/a&gt;
is 45 lines long (170 including comments and newlines).
It&#39;s a mixture of TOML and a second layer of poorly-documented substitutions, made by fail2ban, which permit to define variables, options etc.&lt;/p&gt;
&lt;p&gt;As long as one can be satisfied by the default configuration, it&#39;s not a big deal.
But as soon as one wants to build its own configuration for an unsupported service, or when the firewall is a bit different, it becomes way too complex.&lt;/p&gt;
&lt;h4 id=&quot;but-not-that-flexible&quot;&gt;...but not that flexible&lt;a class=&quot;zola-anchor&quot; href=&quot;#but-not-that-flexible&quot; aria-label=&quot;Anchor link for: but-not-that-flexible&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;If we have a program that reads something as input, and executes commands as output, why not present things that simply?&lt;/p&gt;
&lt;p&gt;I wanted a solution without default configuration, which would permit to admins to easily build their own, based on well documented examples. Then, only the abstraction needed would be used.&lt;/p&gt;
&lt;p&gt;Let&#39;s say I want to execute an action when some (hidden or not) URL is activated on the server. Instead of creating a web app, with &quot;webhooks&quot; etc, only a few lines of conf should be necessary to execute an arbitrary action.&lt;/p&gt;
&lt;p&gt;I wanted something also ready to do something else than ban bots.&lt;/p&gt;
&lt;h2 id=&quot;solution-of-the-problem-of-the-solution&quot;&gt;Solution of the problem of the solution&lt;a class=&quot;zola-anchor&quot; href=&quot;#solution-of-the-problem-of-the-solution&quot; aria-label=&quot;Anchor link for: solution-of-the-problem-of-the-solution&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After this very long introduction, let me introduce &lt;em&gt;reaction&lt;/em&gt;!&lt;/p&gt;
&lt;h3 id=&quot;speed&quot;&gt;Speed&lt;a class=&quot;zola-anchor&quot; href=&quot;#speed&quot; aria-label=&quot;Anchor link for: speed&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;I have no expertise in the Go language.
It is most likely possible to improve reaction&#39;s performance, but its current consumption already fully satisfies me.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On my server, on which a lot more logs are analyzed that only the SSH service, reaction (and all the commands it launches) consumes approximately 5 min of CPU a week and 25 MB of RAM.&lt;/p&gt;
&lt;p&gt;With equal task work, fail2ban used to consume 1 hour and 300 MB, namely 30 times more and 10 times more resources.&lt;/p&gt;
&lt;h3 id=&quot;configuration&quot;&gt;Configuration&lt;a class=&quot;zola-anchor&quot; href=&quot;#configuration&quot; aria-label=&quot;Anchor link for: configuration&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ Configuration present here is deprecated.
An up-to-date version of this tutorial is available
&lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me/tutorial.en.html&quot;&gt;in reaction wiki&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;details&gt;
&lt;summary&gt;Ancienne version&lt;/summary&gt;
&lt;blockquote&gt;
&lt;p&gt;Starting here, it becomes technical. Read at your own risk.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Three configuration languages are available: JSON, YAML, &lt;a rel=&quot;external&quot; href=&quot;https://jsonnet.org&quot;&gt;JSONnet&lt;/a&gt; (❤️).
I won&#39;t present the first two, but I do speak of the last at the end.&lt;/p&gt;
&lt;p&gt;Let&#39;s first specify how reaction must recognize an IP.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;atterns&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  i&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;p&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;egex&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As a replacement of fail2ban &lt;em&gt;jails&lt;/em&gt;, reaction has &lt;em&gt;streams&lt;/em&gt;, which define a data source (e.g. &lt;code&gt;tail -f /var/log/nginx/access.log&lt;/code&gt; for nginx).&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;treams&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We attach one or more &lt;em&gt;filters&lt;/em&gt; to those &lt;em&gt;streams&lt;/em&gt;. They are groups of regular expressions. It&#39;s on a &lt;em&gt;filter&lt;/em&gt; that we define the number of bad retries (&lt;code&gt;retry&lt;/code&gt;) we grant on an IP before &lt;em&gt;react&lt;/em&gt;ing.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;treams&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ilters&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ail&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;egex&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authentication failure;.*rhost=&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etry&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etryperiod&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;3h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We add one or more &lt;em&gt;actions&lt;/em&gt; to a &lt;em&gt;filter&lt;/em&gt;, which will be executed when the &lt;em&gt;filter&lt;/em&gt; is triggered.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;treams&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ilters&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ail&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;egex&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authentication failure;.*rhost=&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etry&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etryperiod&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;3h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ctions&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;          b&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;an&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;            c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-A&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Actions&lt;/em&gt; can be executed right now, or can be delayed with &lt;code&gt;after&lt;/code&gt;. This permits to ban an IP now, and to unban it later.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;treams&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ilters&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ail&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;egex&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authentication failure;.*rhost=&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etry&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etryperiod&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;3h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ctions&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;          b&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;an&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;            c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-A&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;          u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nban&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;            c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-D&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;            a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;fter&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;24h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those &lt;code&gt;iptables&lt;/code&gt; commands need the existence of the &lt;code&gt;reaction&lt;/code&gt; &lt;em&gt;chain&lt;/em&gt; in the firewall.
On startup, we ask reaction to create it, add it to the INPUT &lt;em&gt;chain&lt;/em&gt;, which controls incoming connections.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;tart&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-N&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-I&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INPUT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We also ask reaction to empty it and delete it when quitting:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;top&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-D&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INPUT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-F&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-X&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Et voilà&lt;/em&gt;. With 26 lines of configuration, no hidden defaults, reaction will watch SSH connections and ban malicious connections for 24h, after 3 bad tries.&lt;/p&gt;
&lt;h4 id=&quot;jsonnet&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://jsonnet.org&quot;&gt;JSONnet&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#jsonnet&quot; aria-label=&quot;Anchor link for: jsonnet&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;It is a simple and flexible language, with a syntax close to JavaScript and JSON.
By default, it&#39;s just a more flexible JSON:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;// We can put comments&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;  // No need to put quotes everywhere&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  streams:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    ssh:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;      // We even can add commas after the last element ↓&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To avoid repetitions, we write variables and functions.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; hour2second&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;i&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; i &lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 60&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; *&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 60&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  seconds:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    hour2second&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    hour2second&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;3&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    hour2second&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;5&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;JSONnet works as a preprocessor. It generates a JSON-compatible data structure. This result will be handed to reaction.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;seconds&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3600&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 10800&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 18000&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;It resembles the &lt;a rel=&quot;external&quot; href=&quot;https://nixos.org&quot;&gt;Nix&lt;/a&gt; language, but with a more pleasant syntax.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now that JSONnet is presented,
let&#39;s use the previous example written in YAML.
We can rewrite it in JSONnet, adding a second stream to protect another service.&lt;/p&gt;
&lt;p&gt;We want to avoid repeating the &lt;code&gt;iptables&lt;/code&gt; commands (once is enough 😆).&lt;/p&gt;
&lt;p&gt;So we write a &lt;code&gt;banFor()&lt;/code&gt; function, which takes as an argument the duration the IPs should be banned for, and returns a set of actions.
We can then reuse it on each stream.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; banFor&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;time&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  ban:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-A&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  unban:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    after:&lt;/span&gt;&lt;span&gt; time,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-D&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  patterns:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    ip:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      regex:&lt;/span&gt;&lt;span&gt; @&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;(([0-9]{1,3}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#B31D28, #FDAEB7);font-style: italic;&quot;&gt;\.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;){3}[0-9]{1,3})|([0-9a-fA-F:]{2,90})&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  start:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-N&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-I&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INPUT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  stop:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-D&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INPUT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-F&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-X&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  streams:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    ssh:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      filters:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;        login:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          regex:&lt;/span&gt;&lt;span&gt; [ @&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authentication failure;.*rhost=&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          retry:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          retryperiod:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;3h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          actions:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; banFor&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;24h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    nginx:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;tail&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/var/log/nginx/access.log&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      filters:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;        directus:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          regex:&lt;/span&gt;&lt;span&gt; [ @&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;^&amp;lt;ip&amp;gt; .* &amp;quot;POST /auth/login HTTP/...&amp;quot; 401&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          retry:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 6&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          retryperiod:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;4h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          actions:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; banFor&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;4h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Et voilà !
We wrote the few abstractions needed.
We can now define in 8 lines how to protect a new service.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Here, it&#39;s &lt;a rel=&quot;external&quot; href=&quot;https://directus.io/&quot;&gt;Directus&lt;/a&gt;, which I advice to construct tailored user interfaces and database very easily.
Directus has been an inspiration source to build an expressive and flexible software.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;This configuration file is working, but simplified a bit.
A more complete example for SSH bans is available &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/blob/main/config/example.jsonnet&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;installation&quot;&gt;Installation&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation&quot; aria-label=&quot;Anchor link for: installation&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It is possible to compile it from &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction&quot;&gt;source&lt;/a&gt;, or to download a &lt;a rel=&quot;external&quot; href=&quot;https://static.ppom.me/reaction/releases&quot;&gt;release&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# curl -o /usr/local/bin/reaction https://static.ppom.me/reaction/releases/$VERSION/reaction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# chmod 755 /usr/local/bin/reaction&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To launch reaction via a systemd unit:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/etc/systemd/system/reaction.service&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;systemd&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Install]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;WantedBy&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;multi-user.target&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Service]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ExecStart&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;/usr/local/bin/reaction start -c /etc/reaction.yml&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;StateDirectory&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;reaction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;RuntimeDirectory&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;reaction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;WorkingDirectory&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;/var/lib/reaction&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Write your configuration file: &lt;code&gt;/etc/reaction.yml&lt;/code&gt; or &lt;code&gt;/etc/reaction.jsonnet&lt;/code&gt; (adapt the systemd file, depending on the format used).&lt;/p&gt;
&lt;p&gt;Then reload systemd so that it discovers the new unit, activate it at boot and start it now:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# systemctl daemon-reload&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# systemctl enable reaction.service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# systemctl start reaction.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&quot;usage&quot;&gt;Usage&lt;a class=&quot;zola-anchor&quot; href=&quot;#usage&quot; aria-label=&quot;Anchor link for: usage&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Read the logs with &lt;code&gt;journalctl -f -u reaction.service&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Read current ban state with &lt;code&gt;reaction show&lt;/code&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; reaction show&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  l&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ogin&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    4.3.2.1&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ctions&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nban&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;2023-11-01 22:00:00&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    112.113.114.115&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ctions&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nban&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;2023-10-29 00:16:16&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Remove a ban with &lt;code&gt;reaction flush&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Test your regexes with &lt;code&gt;reaction test-regex&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Look at the help for all those commands with &lt;code&gt;reaction --help&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Look at other configuration examples on the &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction&quot;&gt;repo&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Browse the &lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me&quot;&gt;wiki&lt;/a&gt;, which is slowly growing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/details&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After 6 (part-part-time) months of work, reaction is mature enough to be v1.
It&#39;s been 5 months since it replaces &lt;code&gt;fail2ban&lt;/code&gt; on my infrastructure.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The v2 is already planned, and will permit multiple reaction running on different servers to work as a cluster,
exchanging IPs to ban using peer-to-peer!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;you have questions,&lt;/li&gt;
&lt;li&gt;ideas,&lt;/li&gt;
&lt;li&gt;you discover bugs,&lt;/li&gt;
&lt;li&gt;or need guidance for setup,&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;then don&#39;t hesitate&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;to create an issue on the &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction&quot;&gt;repo&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;or to send a mail to {reaction &lt;em&gt;*at*&lt;/em&gt; ppom &lt;em&gt;*dot*&lt;/em&gt; me} 🙂&lt;/li&gt;
&lt;/ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>reaction, remplaçant de fail2ban</title>
        <published>2023-10-28T00:00:00+00:00</published>
        <updated>2023-10-28T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/fr-reaction/"/>
        <id>https://blog.ppom.me/fr-reaction/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/fr-reaction/">&lt;p&gt;&lt;em&gt;This article is also &lt;a href=&quot;/en-reaction&quot;&gt;available in 🇬🇧 English&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;enjeux&quot;&gt;Enjeux&lt;a class=&quot;zola-anchor&quot; href=&quot;#enjeux&quot; aria-label=&quot;Anchor link for: enjeux&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Cet article est organisé de manière à montrer qu&#39;un programme que j&#39;ai conçu est utile &lt;del&gt;à la société&lt;/del&gt; aux personnes qui administrent des serveurs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;probleme&quot;&gt;Problème&lt;a class=&quot;zola-anchor&quot; href=&quot;#probleme&quot; aria-label=&quot;Anchor link for: probleme&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;De nombreuses personnes écrivent des programmes (appelés robots ou bots) qui scannent Internet et cherchent à s&#39;introduire sur les serveurs (les ordinateurs qui font fonctionner Internet) qu&#39;ils trouvent.
Le plus souvent, une fois que ces robots ont pris le contrôle d&#39;un serveur, ils vont :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;miner des cryptomonnaies,&lt;/li&gt;
&lt;li&gt;envoyer du spam par mail,&lt;/li&gt;
&lt;li&gt;utiliser ce nouveau serveur pour en attaquer d&#39;autres,&lt;/li&gt;
&lt;li&gt;ou voler les données présentes dessus et faire du chantage à ses propriétaires pour rendre les données.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Tous ces exemples sont problématiques. Le dernier l&#39;est particulièrement, car un serveur contient souvent des données sensibles des personnes qui l&#39;utilisent.&lt;/p&gt;
&lt;p&gt;Par exemple, à l&#39;association Picasoft, on héberge une application de messagerie alternative, face aux géants du web.
Si un robot accède au serveur, il peut potentiellement récupérer toutes leurs conversations, ce qui est vrai pour n&#39;importe quel service en ligne.&lt;/p&gt;
&lt;p&gt;C&#39;est donc important de bien protéger ses serveurs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;solution&quot;&gt;Solution&lt;a class=&quot;zola-anchor&quot; href=&quot;#solution&quot; aria-label=&quot;Anchor link for: solution&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;L&#39;honorable &lt;a rel=&quot;external&quot; href=&quot;https://github.com/fail2ban/fail2ban&quot;&gt;fail2ban&lt;/a&gt; est un logiciel qui permet de bannir les robots qui tentent bêtement de briser les barrières des serveurs.&lt;/p&gt;
&lt;p&gt;Le principe est simple :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Différents programmes, ou services, s&#39;exécutent sur un serveur.
&lt;ul&gt;
&lt;li&gt;Le plus commun est le service SSH, qui permet de se connecter à distance de façon sécurisée au serveur sur lequel il fonctionne.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Chaque service écrit des logs, c&#39;est-à-dire des informations à propos des évènements qui arrivent au fil de l&#39;eau.
&lt;ul&gt;
&lt;li&gt;Pour SSH, un de ces évènements est &quot;&lt;em&gt;[telle adresse IP] a tenté de se connecter avec un mauvais mot de passe&lt;/em&gt;&quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;fail2ban scanne ces logs.
&lt;ul&gt;
&lt;li&gt;Au bout de plusieurs tentatives de connexions ratées pour un robot, fail2ban met à jour le pare-feu du serveur pour qu&#39;il bloque pendant un certain temps son adresse IP (son adresse sur Internet).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;probleme-de-la-solution&quot;&gt;Problème de la solution&lt;a class=&quot;zola-anchor&quot; href=&quot;#probleme-de-la-solution&quot; aria-label=&quot;Anchor link for: probleme-de-la-solution&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Fail2ban fait correctement son travail. Cependant, j&#39;ai deux grands reproches à lui faire :&lt;/p&gt;
&lt;h4 id=&quot;lenteur-consommation&quot;&gt;Lenteur / consommation&lt;a class=&quot;zola-anchor&quot; href=&quot;#lenteur-consommation&quot; aria-label=&quot;Anchor link for: lenteur-consommation&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Pour traiter les logs de plusieurs services de mon serveur, fail2ban prenait à peu près 1h/semaine de temps de travail (CPU).
Ça peut paraître peu, mais c&#39;est beaucoup, vu le peu de trafic qu&#39;il y a sur mon serveur. fail2ban ne fait que lire du texte et envoyer des actions au pare-feu !&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Pour comparaison, c&#39;est autant que le service Funkwhale sur mon serveur, une alternative à Spotify, qui fait bien plus :
Funkwhale me permet d&#39;écouter ma musique, depuis mes différents appareils, et je l&#39;utilise ~ 24h par semaine.
C&#39;est une tâche nettement plus lourde.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fail2ban consomme également beaucoup de mémoire vive, facilement 300 Mo.&lt;/p&gt;
&lt;p&gt;Sur un serveur avec plus de trafic, ça peut rapidement devenir un vrai problème. Je voulais donc une solution qui consomme moins.&lt;/p&gt;
&lt;h4 id=&quot;complexite-d-une-configuration-tres-abstraite&quot;&gt;Complexité d&#39;une configuration très abstraite...&lt;a class=&quot;zola-anchor&quot; href=&quot;#complexite-d-une-configuration-tres-abstraite&quot; aria-label=&quot;Anchor link for: complexite-d-une-configuration-tres-abstraite&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;fail2ban dispose d&#39;une configuration par défaut très étoffée.&lt;/p&gt;
&lt;p&gt;Il y a une grosse ingénierie préalable
avec pour objectif de rendre la configuration le plus simple possible pour l&#39;admin.&lt;/p&gt;
&lt;p&gt;Elle vient avec des règles par défaut pour plein de pare-feux et services différents, réparties en 160 fichiers, et comprenant 2600 lignes de configuration (8900 avec les commentaires).&lt;/p&gt;
&lt;p&gt;Finalement, elle rend plus difficile de s&#39;approprier le sujet :
le &lt;a rel=&quot;external&quot; href=&quot;https://github.com/fail2ban/fail2ban/blob/06d2623/config/action.d/iptables.conf&quot;&gt;fichier pour l&#39;action iptables&lt;/a&gt;
fait 45 lignes de code (170 avec les commentaires).
C&#39;est un mélange de TOML et d&#39;une 2e couche mal documentée de substitutions, faites par fail2ban, qui permet de définir des variables, des options etc.&lt;/p&gt;
&lt;p&gt;Tant qu&#39;on peut se contenter de la configuration par défaut, ce n&#39;est pas un gros problème.
Mais dès qu&#39;on veut faire sa propre configuration pour un service qui n&#39;est pas supporté, ou parce que notre pare-feu est un petit peu différent, ça devient beaucoup trop complexe.&lt;/p&gt;
&lt;h4 id=&quot;mais-pas-tres-flexible&quot;&gt;...mais pas très flexible&lt;a class=&quot;zola-anchor&quot; href=&quot;#mais-pas-tres-flexible&quot; aria-label=&quot;Anchor link for: mais-pas-tres-flexible&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Puisqu&#39;on a un programme qui lit quelque chose en entrée, et qui exécute des commandes en sortie, pourquoi ne pas présenter les choses aussi simplement ?&lt;/p&gt;
&lt;p&gt;Je voulais une solution sans configuration par défaut, qui permette aux admins de construire simplement la leur, à partir d&#39;exemples bien documentés, et de n&#39;avoir que les couches d&#39;abstraction que les admins estiment nécessaire.&lt;/p&gt;
&lt;p&gt;Disons que je veux exécuter une action quand on active une certaine URL (cachée ou pas) sur mon serveur. Plutôt que de créer une application web, avec des &quot;webhooks&quot; etc, quelques lignes devraient suffire pour exécuter une action arbitraire.&lt;/p&gt;
&lt;p&gt;Je voulais un outil aussi adapté pour faire autre chose que des bans de robots.&lt;/p&gt;
&lt;h2 id=&quot;solution-au-probleme-de-la-solution&quot;&gt;Solution au problème de la solution&lt;a class=&quot;zola-anchor&quot; href=&quot;#solution-au-probleme-de-la-solution&quot; aria-label=&quot;Anchor link for: solution-au-probleme-de-la-solution&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Après cette très longue introduction, permettez-moi de vous présenter &lt;em&gt;reaction&lt;/em&gt; !&lt;/p&gt;
&lt;h3 id=&quot;vitesse&quot;&gt;Vitesse&lt;a class=&quot;zola-anchor&quot; href=&quot;#vitesse&quot; aria-label=&quot;Anchor link for: vitesse&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Je n&#39;ai pas d&#39;expertise dans le langage Go.
Il est sûrement possible d&#39;améliorer ses performances, mais sa consommation actuelle me satisfait déjà pleinement.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sur mon serveur, sur lequel sont analysés bien plus de logs que seulement ceux du service SSH, reaction (+ toutes les commandes lancées) consomme 5 min de temps de travail par semaine et 25 Mo de mémoire vive.&lt;/p&gt;
&lt;p&gt;À charge de travail égale, fail2ban consommait 1 heure et 300 Mo, soit 30 fois et 10 fois plus de ressources.&lt;/p&gt;
&lt;h3 id=&quot;configuration&quot;&gt;Configuration&lt;a class=&quot;zola-anchor&quot; href=&quot;#configuration&quot; aria-label=&quot;Anchor link for: configuration&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ La configuration présente ici est dépréciée.
Une version à jour de ce tutoriel est présente
&lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me/tutorial.fr.html&quot;&gt;dans le wiki de reaction&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;details&gt;
&lt;summary&gt;Ancienne version&lt;/summary&gt;
&lt;blockquote&gt;
&lt;p&gt;À partir de là, ça devient technique. À vos risques et périls.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Trois langages de configuration sont disponibles : JSON, YAML, &lt;a rel=&quot;external&quot; href=&quot;https://jsonnet.org&quot;&gt;JSONnet&lt;/a&gt; (❤️).
Je ne vous présente pas les deux premiers, mais je parle du dernier à la fin.&lt;/p&gt;
&lt;p&gt;On commence par préciser comment reaction va reconnaitre une IP.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;atterns&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  i&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;p&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;egex&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;En remplacement des &lt;em&gt;jails&lt;/em&gt; de fail2ban, on a des &lt;em&gt;streams&lt;/em&gt;, qui définissent une source de données (par exemple &lt;code&gt;tail -f /var/log/nginx/access.log&lt;/code&gt; pour nginx).&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;treams&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;À ces &lt;em&gt;streams&lt;/em&gt;, on attache un ou plusieurs &lt;em&gt;filters&lt;/em&gt;. Ce sont des groupes d&#39;expressions régulières. C&#39;est aussi sur un &lt;em&gt;filter&lt;/em&gt; qu&#39;on décide du nombre de mauvais essais (&lt;code&gt;retry&lt;/code&gt;) qu&#39;on accorde à une IP avant de &lt;em&gt;réa&lt;/em&gt;gir.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;treams&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ilters&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ail&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;egex&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authentication failure;.*rhost=&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etry&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etryperiod&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;3h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;À un &lt;em&gt;filter&lt;/em&gt;, on rajoute une ou plusieurs &lt;em&gt;actions&lt;/em&gt;, qui seront exécutées quand il se déclenche.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;treams&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ilters&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ail&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;egex&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authentication failure;.*rhost=&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etry&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etryperiod&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;3h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ctions&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;          b&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;an&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;            c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-A&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Elles peuvent être effectuées tout de suite, ou être délayées avec &lt;code&gt;after&lt;/code&gt;, ce qui permet de bannir une IP maintenant, et de la débannir quelque temps plus tard.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;treams&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ilters&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ail&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;egex&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authentication failure;.*rhost=&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etry&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;etryperiod&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;3h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ctions&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;          b&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;an&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;            c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-A&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;          u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nban&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;            c&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;md&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-D&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;            a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;fter&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;24h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ces commandes &lt;code&gt;iptables&lt;/code&gt; ont besoin de l&#39;existence de la &lt;em&gt;chain&lt;/em&gt; &lt;code&gt;reaction&lt;/code&gt; dans le pare-feu.
Au démarrage, on demande à reaction de la créer, et l&#39;ajouter à la chaine INPUT, qui contrôle les connexions entrantes.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;tart&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-N&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-I&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INPUT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On lui demande aussi de la vider et la supprimer en quittant :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;top&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-D&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INPUT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-F&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-X&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Et voilà. En 26 lignes de configuration, sans aucune configuration par défaut, reaction va surveiller les connexions SSH et bannir les connexions malveillantes pendant 24h au bout de 3 essais infructueux.&lt;/p&gt;
&lt;h4 id=&quot;jsonnet&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://jsonnet.org&quot;&gt;JSONnet&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#jsonnet&quot; aria-label=&quot;Anchor link for: jsonnet&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;C&#39;est un langage simple et flexible, avec une syntaxe proche de Javascript et JSON.
Par défaut, c&#39;est juste un langage qui ressemble à JSON, mais en plus flexible :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;// On peut mettre des commentaires&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;  // Pas besoin de mettre des &amp;quot;quotes&amp;quot; partout&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  streams:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    ssh:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;      // On peut avoir des virgules après le dernier élément ↓&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-fu&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Pour éviter les répétitions, on écrit des variables et des fonctions.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; hour2second&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;i&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; i &lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 60&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; *&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 60&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  seconds:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    hour2second&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    hour2second&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;3&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;    hour2second&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;5&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;JSONnet fonctionne comme un préprocesseur qui va générer une structure de données compatible JSON. C&#39;est ce résultat qui est donné à reaction.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;  &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;seconds&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3600&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 10800&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 18000&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;C&#39;est un peu comme le langage &lt;a rel=&quot;external&quot; href=&quot;https://nixos.org&quot;&gt;Nix&lt;/a&gt;, mais avec une syntaxe plus agréable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Maintenant que JSONnet est présenté,
on reprend l&#39;exemple précédemment écrit en YAML.
On peut le réécrire en JSONnet en imaginant qu&#39;on rajoute un deuxième stream pour protéger un autre service.&lt;/p&gt;
&lt;p&gt;On veut éviter d&#39;écrire plusieurs fois les commandes &lt;code&gt;iptables&lt;/code&gt; (une fois suffit amplement 😆).&lt;/p&gt;
&lt;p&gt;On va donc écrire une fonction &lt;code&gt;banFor()&lt;/code&gt;, qui prend en argument la durée selon laquelle on va bannir les IPs, et retourne une liste d&#39;actions.
On peut la réutiliser sur chaque stream.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;jsonnet&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; banFor&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;time&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; =&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  ban:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-A&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  unban:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    after:&lt;/span&gt;&lt;span&gt; time,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-D&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  patterns:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    ip:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      regex:&lt;/span&gt;&lt;span&gt; @&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;(([0-9]{1,3}&lt;/span&gt;&lt;span style=&quot;color: light-dark(#B31D28, #FDAEB7);font-style: italic;&quot;&gt;\.&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;){3}[0-9]{1,3})|([0-9a-fA-F:]{2,90})&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  start:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-N&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-I&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INPUT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  stop:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w,&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-D&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;INPUT&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-j&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-F&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [ &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;iptables&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-X&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;reaction&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;  streams:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    ssh:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;journalctl&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;sshd.service&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      filters:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;        login:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          regex:&lt;/span&gt;&lt;span&gt; [ @&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;authentication failure;.*rhost=&amp;lt;ip&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          retry:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 3&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          retryperiod:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;3h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          actions:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; banFor&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;24h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;    nginx:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      cmd:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;tail&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;-f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/var/log/nginx/access.log&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;      filters:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;        directus:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          regex:&lt;/span&gt;&lt;span&gt; [ @&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;^&amp;lt;ip&amp;gt; .* &amp;quot;POST /auth/login HTTP/...&amp;quot; 401&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;, ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          retry:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; 6&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          retryperiod:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;4h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E36209, #FFAB70);&quot;&gt;          actions:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt; banFor&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;4h&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Et voilà !
On a écrit le soupçon de généricité dont on avait besoin.
On peut maintenant définir en 8 lignes comment protéger un nouveau service.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;En l&#39;occurence, c&#39;est &lt;a rel=&quot;external&quot; href=&quot;https://directus.io/&quot;&gt;Directus&lt;/a&gt;, que je conseille vivement pour construire des interfaces et des bases de données sur-mesure très simplement.
Directus a été une source d&#39;inspiration pour construire un logiciel expressif et flexible.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Ce fichier de configuration est fonctionnel, mais un petit peu simplifié.
Un exemple plus complet pour un ban SSH est disponible &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction/-/blob/main/config/example.jsonnet&quot;&gt;ici&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;installation&quot;&gt;Installation&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation&quot; aria-label=&quot;Anchor link for: installation&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Il est possible de le compiler soi-même depuis la &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction&quot;&gt;source&lt;/a&gt;, ou de le télécharger depuis les &lt;a rel=&quot;external&quot; href=&quot;https://static.ppom.me/reaction/releases&quot;&gt;releases&lt;/a&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# curl -o /usr/local/bin/reaction https://static.ppom.me/reaction/releases/$VERSION/reaction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# chmod 755 /usr/local/bin/reaction&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Pour le lancer via une unit systemd:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/etc/systemd/system/reaction.service&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;systemd&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Install]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;WantedBy&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;multi-user.target&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;[Service]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ExecStart&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;/usr/local/bin/reaction start -c /etc/reaction.yml&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;StateDirectory&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;reaction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;RuntimeDirectory&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;reaction&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;WorkingDirectory&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;=&lt;/span&gt;&lt;span&gt;/var/lib/reaction&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Écrire son fichier de configuration &lt;code&gt;/etc/reaction.yml&lt;/code&gt; ou &lt;code&gt;/etc/reaction.jsonnet&lt;/code&gt; (adapter le fichier systemd en fonction du format retenu).&lt;/p&gt;
&lt;p&gt;Puis recharger systemd pour qu&#39;il découvre ce nouveau fichier, l&#39;activer au démarrage et le lancer maintenant :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# systemctl daemon-reload&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# systemctl enable reaction.service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# systemctl start reaction.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&quot;utilisation&quot;&gt;Utilisation&lt;a class=&quot;zola-anchor&quot; href=&quot;#utilisation&quot; aria-label=&quot;Anchor link for: utilisation&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Étudier les logs avec &lt;code&gt;journalctl -f -u reaction.service&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Connaitre l&#39;état actuel des bans avec &lt;code&gt;reaction show&lt;/code&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; reaction show&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;sh&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  l&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ogin&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    4.3.2.1&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ctions&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nban&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;2023-11-01 22:00:00&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    112.113.114.115&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;      a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ctions&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;        u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nban&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;2023-10-29 00:16:16&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Enlever un ban avec &lt;code&gt;reaction flush&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Tester ses regex avec &lt;code&gt;reaction test-regex&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Consulter l&#39;aide pour toutes ces commandes avec &lt;code&gt;reaction --help&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Voir d&#39;autres exemples de configuration sur &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction&quot;&gt;son repo&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Parcourir le &lt;a rel=&quot;external&quot; href=&quot;https://reaction.ppom.me&quot;&gt;wiki&lt;/a&gt; qui s&#39;étoffe petit à petit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/details&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Après 6 mois de travail (à temps très partiel), reaction est assez mature pour être en v1.
Il remplace &lt;code&gt;fail2ban&lt;/code&gt; sur mon infrastructure depuis 4 mois.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;La v2 est déjà prévue, et elle permettra à des reaction sur des serveurs différents de fonctionner en grappe,
en s&#39;échangeant les IPs à bannir en pair-à-pair !&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Si&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;vous avez des questions,&lt;/li&gt;
&lt;li&gt;des idées,&lt;/li&gt;
&lt;li&gt;que vous constatez des bugs,&lt;/li&gt;
&lt;li&gt;que vous voulez des conseils pour la mise en place,&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;n&#39;hésitez pas&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;à écrire une issue sur le &lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/reaction&quot;&gt;repo&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;ou à m&#39;envoyer un mail à {reaction &lt;em&gt;arobase&lt;/em&gt; ppom &lt;em&gt;dot&lt;/em&gt; me} 🙂&lt;/li&gt;
&lt;/ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Manuellement exporter/importer des données d&#39;un Nextcloud à l&#39;autre</title>
        <published>2023-04-22T00:00:00+00:00</published>
        <updated>2023-04-22T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/export-import-nextcloud/"/>
        <id>https://blog.ppom.me/export-import-nextcloud/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/export-import-nextcloud/">&lt;p&gt;Suite à une &lt;a rel=&quot;external&quot; href=&quot;https://forum.chatons.org/t/experiences-migration-utilisateur-nextcloud-et-tableau-nextcloud-deck/4721&quot;&gt;question sur le forum CHATONS&lt;/a&gt;, j&#39;ai écrit cette petite description de mon expérience.&lt;/p&gt;
&lt;p&gt;Use case : On a deux instances de Nextcloud qui tournent :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;old&lt;/code&gt;, dont on veut se débarasser&lt;/li&gt;
&lt;li&gt;&lt;code&gt;new&lt;/code&gt;, qui va accueillir les utilisateurices d&#39;old. Dans mon cas, &lt;code&gt;new&lt;/code&gt; était vide.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;J&#39;avais plusieurs types de données à migrer :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Les fichiers des utilisateurices. Facile, Nextcloud propose des outils faits pour manipuler directement les fichiers.&lt;/li&gt;
&lt;li&gt;Les données de leurs apps. Les apps en question, sur mon instance, étaient Calendar, Cospend et Deck.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ce &quot;tuto&quot; n&#39;est pas forcément la meilleure marche à suivre, mais elle a fonctionné pour moi. Restez prudent·es si vous le suivez, faites des backups et vérifiez tout bien !&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Avant toute opération casse-gueule, on fait des backups !&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;1-recreer-les-users&quot;&gt;1. Récréer les users&lt;a class=&quot;zola-anchor&quot; href=&quot;#1-recreer-les-users&quot; aria-label=&quot;Anchor link for: 1-recreer-les-users&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Dans l&#39;interface admin de &lt;code&gt;new&lt;/code&gt;, j&#39;ai recréé les utilisateurices à la main. Deux personnes en ont profité pour changer de login, ce qui a son importance dans la suite.&lt;/p&gt;
&lt;h2 id=&quot;2-transferer-les-fichiers&quot;&gt;2. Transférer les fichiers&lt;a class=&quot;zola-anchor&quot; href=&quot;#2-transferer-les-fichiers&quot; aria-label=&quot;Anchor link for: 2-transferer-les-fichiers&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;copie&quot;&gt;Copie&lt;a class=&quot;zola-anchor&quot; href=&quot;#copie&quot; aria-label=&quot;Anchor link for: copie&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Le dossier &lt;code&gt;data&lt;/code&gt; de Nextcloud a cette arborescence :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;root_dir&amp;gt;/data/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;root_dir&amp;gt;/data/&amp;lt;user1&amp;gt;/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;root_dir&amp;gt;/data/&amp;lt;user1&amp;gt;/cache/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;root_dir&amp;gt;/data/&amp;lt;user1&amp;gt;/files/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;root_dir&amp;gt;/data/&amp;lt;user1&amp;gt;/files_trashbin/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;root_dir&amp;gt;/data/&amp;lt;user1&amp;gt;/files/_versions/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;root_dir&amp;gt;/data/&amp;lt;user2&amp;gt;/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;root_dir&amp;gt;/data/&amp;lt;user2&amp;gt;/...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Dans mon cas, je ne voulais garder que les fichiers actuels, pas les vieilles versions ni la pouvelle. Je n&#39;ai donc copié que les &lt;code&gt;files/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Mes deux instances de Nextcloud étaient sur la même machine, j&#39;ai donc fait une série de :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; rsync&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;old_di&lt;/span&gt;&lt;span&gt;r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/data/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;old_usernam&lt;/span&gt;&lt;span&gt;e&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/files/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;new_di&lt;/span&gt;&lt;span&gt;r&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/data/&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;new_usernam&lt;/span&gt;&lt;span&gt;e&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/files/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;…copiant ainsi le contenu du premier dossier dans le deuxième (&lt;code&gt;rsync&lt;/code&gt; a ce comportement si on laisse le &lt;code&gt;/&lt;/code&gt; à la fin du premier dossier, ce qui est déroutant mais pratique).&lt;/p&gt;
&lt;p&gt;Pensez à bien donner les fichiers au user php de &lt;code&gt;new&lt;/code&gt;, par exemple :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; chown&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;R&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; nextcloud&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ne&lt;/span&gt;&lt;span&gt;w&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/data&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&quot;mise-a-jour-dans-new&quot;&gt;Mise à jour dans &lt;code&gt;new&lt;/code&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mise-a-jour-dans-new&quot; aria-label=&quot;Anchor link for: mise-a-jour-dans-new&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Pour demander à Nextcloud de rescanner les dossiers à la recherche de nouveaux fichiers, il faut utiliser son utilitaire &lt;code&gt;occ&lt;/code&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Générique, avec le user utilisé par nextcloud&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; occ&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; files:scan&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-all&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Docker&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; docker&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; exec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;image_nam&lt;/span&gt;&lt;span&gt;e&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; occ&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; files:scan&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-all&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; NixOS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; nextcloud-occ&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; files:scan&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-all&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On peut déjà vérifier à cette étape dans l&#39;interface web que les fichiers ont bien été reconnus.&lt;/p&gt;
&lt;h2 id=&quot;3-inclure-les-donnees-des-applications&quot;&gt;3. Inclure les données des applications&lt;a class=&quot;zola-anchor&quot; href=&quot;#3-inclure-les-donnees-des-applications&quot; aria-label=&quot;Anchor link for: 3-inclure-les-donnees-des-applications&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Il arrive que des applications stockent des fichiers dans les dossiers des users, auquel cas tout est normalement pris en charge, car on vient de les copier, et qu&#39;en base de données, c&#39;est leur chemin relatif qui est stocké. Il n&#39;a pas changé normalement.&lt;/p&gt;
&lt;h3 id=&quot;export-sql&quot;&gt;Export SQL&lt;a class=&quot;zola-anchor&quot; href=&quot;#export-sql&quot; aria-label=&quot;Anchor link for: export-sql&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;On va d&#39;abord exporter les données d&#39;&lt;code&gt;old&lt;/code&gt;. Dans mon cas, l&#39;ancienne instance était une instance Docker, avec PostgreSQL, j&#39;ai donc utilisé cette commande :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; docker&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; exec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;it&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;nextcloud_d&lt;/span&gt;&lt;span&gt;b&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; pgdumpall&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;U&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; nextcloud&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ~/dump.nextcloud.sql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&quot;laius-copy-vs-insert&quot;&gt;Laïus &lt;code&gt;COPY&lt;/code&gt; vs &lt;code&gt;INSERT&lt;/code&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#laius-copy-vs-insert&quot; aria-label=&quot;Anchor link for: laius-copy-vs-insert&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Par défaut, PostgreSQL utilise la commande &lt;code&gt;COPY&lt;/code&gt; pour ses exports, spécifique à cette base de données.
Elle est plus rapide, mais ne met pas à jour les &lt;code&gt;SEQUENCE&lt;/code&gt;S, ces compteurs qui &quot;retiennent&quot; à quel id on en est pour chaque &lt;code&gt;PRIMARY KEY AUTOINCREMENT&lt;/code&gt;, ce qui demande de les mettre ensuite à jour automatiquement
C&#39;est sûrement une bien meilleure idée que d&#39;utiliser l&#39;option &lt;code&gt;--inserts&lt;/code&gt;, qui exporte les données avec des commandes &lt;code&gt;INSERT&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Je n&#39;ai pas testé, mais je recommande fortement de commencer par essayer avec cette option.
Sinon, il faut se préparer à faire des &lt;code&gt;ALTER SEQUENCE &amp;lt;seq_name&amp;gt; RESTART with &amp;lt;new_start&amp;gt;&lt;/code&gt;, où &lt;code&gt;&amp;lt;seq_name&amp;gt;&lt;/code&gt; est le nom de la table associée avec le suffixe &lt;code&gt;_seq&lt;/code&gt;, et où &lt;code&gt;&amp;lt;new_start&amp;gt;&lt;/code&gt; est l&#39;id maximal de la table + 1.&lt;/p&gt;
&lt;p&gt;Galère les &lt;code&gt;COPY&lt;/code&gt;, quoi.&lt;/p&gt;
&lt;p&gt;On préfèrera donc&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; docker&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; exec&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;it&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;nextcloud_d&lt;/span&gt;&lt;span&gt;b&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; pgdumpall&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;-inserts&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;U&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; nextcloud&lt;/span&gt;&lt;span style=&quot;color: light-dark(#D73A49, #F97583);&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; ~/dump.nextcloud.sql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&quot;sous-laius&quot;&gt;Sous laïus&lt;a class=&quot;zola-anchor&quot; href=&quot;#sous-laius&quot; aria-label=&quot;Anchor link for: sous-laius&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Attention par contre, &lt;code&gt;INSERT&lt;/code&gt; pourrait vous poser d&#39;autres problèmes :
je pense qu&#39;il va refuser l&#39;insertion d&#39;une ligne qui fait référence à une ligne d&#39;une autre table qui n&#39;existe pas encore. Pour chaque app, il faudra commencer par insérer les données de tables qui ne référencent pas les autres tables.&lt;/p&gt;
&lt;p&gt;Exemple : &lt;code&gt;oc_calendarobjects_props&lt;/code&gt; contient une colonne &lt;code&gt;objectid&lt;/code&gt; et une colonne &lt;code&gt;calendarid&lt;/code&gt;, elle doit donc être remplie après les tables &lt;code&gt;oc_calendarobjects&lt;/code&gt; et &lt;code&gt;oc_calendars&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Normalement, l&#39;export SQL doit insérer les données dans le bon ordre.
Je pense que si vous préservez l&#39;ordre des insertions, tout ira pour le mieux 😇&lt;/p&gt;
&lt;h3 id=&quot;selection-des-donnees-de-l-export&quot;&gt;Sélection des données de l&#39;export&lt;a class=&quot;zola-anchor&quot; href=&quot;#selection-des-donnees-de-l-export&quot; aria-label=&quot;Anchor link for: selection-des-donnees-de-l-export&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Les tables SQL relatives à un module sont préfixées du nom du module :&lt;/p&gt;
&lt;p&gt;Calendar :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendar_appt_bookings   → vide chez moi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendar_appt_configs    → vide chez moi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendar_invitations     &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendar_reminders       &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendar_resources       &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendar_resources_md    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendar_rooms           → vide chez moi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendar_rooms_md        → vide chez moi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendarchanges          &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendarobjects          &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendarobjects_props    &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendars                &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_calendarsubscriptions    → vide chez moi&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cospend :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_cospend_bill_owers       &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_cospend_bills            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_cospend_categories       &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_cospend_currencies       &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_cospend_members          &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_cospend_paymentmodes     &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_cospend_projects         &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_cospend_shares           &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Deck :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_deck_assigned_labels     &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_deck_assigned_users      &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_deck_attachment          &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_deck_board_acl           &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_deck_boards              &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_deck_cards               &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_deck_labels              &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;oc_deck_stacks              &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ce n&#39;est que ces tables que j&#39;ai gérées.
Selon les applications que vous voulez transférer, à vous de chercher les tables associées.&lt;/p&gt;
&lt;p&gt;De l&#39;export SQL, on ne gardera que les &lt;code&gt;INSERT&lt;/code&gt; des tables sélectionnées, tout le reste
(&lt;code&gt;CREATE&lt;/code&gt;, &lt;code&gt;ALTER&lt;/code&gt;, etc) est à mettre à la poubelle.
Votre &lt;code&gt;new&lt;/code&gt; s&#39;est déjà occupé de tout ça.&lt;/p&gt;
&lt;h3 id=&quot;optionnel-renommage-des-users-dans-l-export&quot;&gt;&lt;em&gt;(optionnel)&lt;/em&gt; Renommage des users dans l&#39;export&lt;a class=&quot;zola-anchor&quot; href=&quot;#optionnel-renommage-des-users-dans-l-export&quot; aria-label=&quot;Anchor link for: optionnel-renommage-des-users-dans-l-export&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Dans mon cas, des personnes en avaient profité pour changer leur username.
Dans Nextcloud, c&#39;est le username qui sert d&#39;id aux users.
C&#39;est donc ce username qui est présent dans toutes les clés étrangères.&lt;/p&gt;
&lt;p&gt;Dans ce cas, il faut donc chercher toutes les clés étrangères qui référencent la table &lt;code&gt;oc_users&lt;/code&gt; et renommer toute instance de &lt;code&gt;&amp;lt;old_username&amp;gt;&lt;/code&gt; par &lt;code&gt;&amp;lt;new_username&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;preparation-tables-de-destination&quot;&gt;Préparation tables de destination&lt;a class=&quot;zola-anchor&quot; href=&quot;#preparation-tables-de-destination&quot; aria-label=&quot;Anchor link for: preparation-tables-de-destination&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Je vous ne le souhaite vraiment pas, mais peut-être que votre &lt;code&gt;new&lt;/code&gt; a déjà des données à ne pas supprimer dans toutes ces tables.&lt;/p&gt;
&lt;p&gt;Si ce n&#39;est pas le cas, pensez à bien vider les tables de destination.&lt;/p&gt;
&lt;h4 id=&quot;optionnel-changement-des-ids&quot;&gt;&lt;em&gt;(optionnel)&lt;/em&gt; Changement des ids&lt;a class=&quot;zola-anchor&quot; href=&quot;#optionnel-changement-des-ids&quot; aria-label=&quot;Anchor link for: optionnel-changement-des-ids&quot;&gt;🔗&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Avant toute opération casse-gueule, on fait des backups !&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Si c&#39;est le cas, vous allez très sûrement avoir des conflits d&#39;ids (qui doivent être uniques) entre les vieilles et les nouvelles données.
Dans ce cas, une solution (très casse-gueule, mais je ne crois pas qu&#39;il y ait le choix) est d&#39;incrémenter manuellement tous les ids dans l&#39;export.
C&#39;est casse-gueule car il faudra aussi incrémenter ces mêmes ids dans toutes les tables qui y font référence.&lt;/p&gt;
&lt;p&gt;Exemple :&lt;/p&gt;
&lt;p&gt;Si les ids d&#39;&lt;code&gt;oc_calendarobjects&lt;/code&gt; ont été incrémentés de 300, il va falloir incrémenter toutes les références à ces ids dans la colonne &lt;code&gt;objectid&lt;/code&gt; des tables associées (&lt;code&gt;oc_calendarobjects_props&lt;/code&gt;, &lt;code&gt;oc_calendar_reminders&lt;/code&gt;, et j&#39;en oublie peut-être)&lt;/p&gt;
&lt;h3 id=&quot;import-du-sql-dans-new&quot;&gt;Import du SQL dans &lt;code&gt;new&lt;/code&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#import-du-sql-dans-new&quot; aria-label=&quot;Anchor link for: import-du-sql-dans-new&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Dans la base de données PostgreSQL de &lt;code&gt;new&lt;/code&gt;, on va importer les données de notre export SQL modifié comme décrit précédemment.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6A737D, #6A737D);&quot;&gt; Générique&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;u&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; nextcloud&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; psql&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; nextcloud&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; file.sql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;verifier-que-tout-va-bien&quot;&gt;Vérifier que tout va bien&lt;a class=&quot;zola-anchor&quot; href=&quot;#verifier-que-tout-va-bien&quot; aria-label=&quot;Anchor link for: verifier-que-tout-va-bien&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Vérifiez que vous pouvez visualiser les données, en créer de nouvelles (créez une liste Deck, un agenda, un évènement, une carte dans une liste Deck, une entrée dans Cospend, etc.)&lt;/p&gt;
&lt;p&gt;Et ça devrait être bon (j&#39;espère !)&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Perte de données avec Nextcloud / OnlyOffice ⚠️</title>
        <published>2022-11-07T00:00:00+00:00</published>
        <updated>2022-11-07T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/postmortem/"/>
        <id>https://blog.ppom.me/postmortem/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/postmortem/">&lt;!-- vim: set tw=80: --&gt;
&lt;p&gt;Dans le cadre d&#39;une prestation avec Librezo, Tobias et moi avons fait face à un
gros incident sur un OnlyOffice connecté à un Nextcloud : on a perdu une semaine
d&#39;éditions de documents.&lt;/p&gt;
&lt;h2 id=&quot;mise-en-situation&quot;&gt;Mise en situation&lt;a class=&quot;zola-anchor&quot; href=&quot;#mise-en-situation&quot; aria-label=&quot;Anchor link for: mise-en-situation&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Utilisatrice : Bonjour, des documents que j&#39;ai édités ont disparu… Le
fichier existe sur Nextcloud mais il est vide, et sa dernière modification
correspond à sa création… Je l&#39;ai pourtant édité depuis.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;🧠 : Merde merde merde merde&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;🧠 : Ils sont où ces documents pourquoi ils sont nulle part dans les backups ?
J&#39;ai l&#39;impression qu&#39;ils ont jamais été sauvegardés 😱&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;constat&quot;&gt;Constat&lt;a class=&quot;zola-anchor&quot; href=&quot;#constat&quot; aria-label=&quot;Anchor link for: constat&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ces documents n&#39;ont jamais été sauvegardés sur Nextcloud.&lt;/p&gt;
&lt;h2 id=&quot;explication&quot;&gt;Explication&lt;a class=&quot;zola-anchor&quot; href=&quot;#explication&quot; aria-label=&quot;Anchor link for: explication&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Par défaut&lt;/strong&gt;&lt;/em&gt;, quand un document est édité avec OnlyOffice, il n&#39;est enregistré
dans Nextcloud &lt;strong&gt;qu&#39;une fois que son édition est terminée&lt;/strong&gt;, c&#39;est à dire que tous
les clients se sont déconnectés d&#39;OnlyOffice.&lt;/p&gt;
&lt;p&gt;Pour une raison inconnue, OnlyOffice ne &lt;strong&gt;détectait plus&lt;/strong&gt; la déconnexion des
clients. Donc les documents restaient gentiment dans le cache d&#39;OnlyOffice.
Quand un document précédemment édité était à nouveau ouvert dans OnlyOffice, il
était correctement chargé, puisque stocké dans son cache.&lt;/p&gt;
&lt;p&gt;On n&#39;a jamais cherché à faire des &lt;strong&gt;sauvegardes d&#39;un cache&lt;/strong&gt;, parce que&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;vas-y c&#39;est un cache&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Un cache n&#39;est pas censé conserver des données persistentes.&lt;/p&gt;
&lt;p&gt;Un beau jour, on a fait une mise à jour des services, un joli &lt;code&gt;docker compose down&lt;/code&gt;, qui a pour effet de supprimer les conteneurs, et avec tous les fichiers
qui ne sont &lt;strong&gt;pas persistés&lt;/strong&gt; dans des volumes Docker.&lt;/p&gt;
&lt;p&gt;Donc le &lt;del&gt;cash&lt;/del&gt; cache a disparu. &lt;del&gt;💸&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;Et les fichiers de nos utilisateurs et utilisatrices avec.&lt;/p&gt;
&lt;h2 id=&quot;issues-reportees&quot;&gt;Issues reportées&lt;a class=&quot;zola-anchor&quot; href=&quot;#issues-reportees&quot; aria-label=&quot;Anchor link for: issues-reportees&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sur la version d&#39;OnlyOffice incluse dans une app Nextcloud, on trouve de
nombreuses complaintes d&#39;erreurs similaires :
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/nextcloud/documentserver_community/issues/12&quot;&gt;#12&lt;/a&gt;,
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/nextcloud/documentserver_community/issues/77&quot;&gt;#77&lt;/a&gt;,
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/nextcloud/documentserver_community/issues/78&quot;&gt;#78&lt;/a&gt;,
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/nextcloud/documentserver_community/issues/87&quot;&gt;#87&lt;/a&gt;,
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/nextcloud/documentserver_community/issues/100&quot;&gt;#100&lt;/a&gt;...&lt;/p&gt;
&lt;h2 id=&quot;solutions&quot;&gt;Solutions&lt;a class=&quot;zola-anchor&quot; href=&quot;#solutions&quot; aria-label=&quot;Anchor link for: solutions&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;La première solution est de toute évidence suffisante, mais &lt;em&gt;traumatisme est père
de frilosité&lt;/em&gt;. Nous on a mis en place les deux 🌨&lt;/p&gt;
&lt;h3 id=&quot;garde-fou-1-parametrage-d-onlyoffice&quot;&gt;Garde-fou #1 : Paramétrage d&#39;OnlyOffice&lt;a class=&quot;zola-anchor&quot; href=&quot;#garde-fou-1-parametrage-d-onlyoffice&quot; aria-label=&quot;Anchor link for: garde-fou-1-parametrage-d-onlyoffice&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;details&gt;
&lt;summary&gt;*Interlude* : Vous savez ce qu&#39;on dit sur les paramètres par défaut ?&lt;/summary&gt;
&lt;p&gt;&lt;em&gt;Divulgâchage&lt;/em&gt; : il ne sont jamais changés par la plupart des &lt;del&gt;utilisateurices&lt;/del&gt;
admin sys. Surtout quand la doc est aussi monstrueuse que celle d&#39;OnlyOffice.&lt;/p&gt;
&lt;/details&gt;
&lt;p&gt;Il existe &lt;a rel=&quot;external&quot; href=&quot;https://api.onlyoffice.com/editors/save#forcesave&quot;&gt;une option
&lt;code&gt;forcesave&lt;/code&gt;&lt;/a&gt;, désactivée &lt;em&gt;par
défaut&lt;/em&gt;, qui permet de définir un intervalle de temps au bout duquel les
éditions seront sauvegardées vers Nextcloud, que la session d&#39;édition soit
terminée ou pas.&lt;/p&gt;
&lt;p&gt;Pour activer cette option, il faut ajouter ceci dans le fichier&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/etc/onlyoffice/documentreader/local.json&lt;/code&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;    &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;services&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;        &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;CoAuthoring&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;            &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;autoAssembly&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;                &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;enable&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt; true&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;                &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;interval&lt;/span&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;5m&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mais ce fichier est édité par
l&#39;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/run-document-server.sh&quot;&gt;entrypoint&lt;/a&gt;
(le script de démarrage) du conteneur officiel.&lt;/p&gt;
&lt;p&gt;On a essayé de monter le fichier tel que présenté au-dessus ↑ avec cette entrée
dans notre &lt;code&gt;docker-compose.yml&lt;/code&gt; :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ervices&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  o&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nlyoffice&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    v&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;olumes&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; .&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/local.json:/etc/onlyoffice/documentserver/local.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mais le fichier est modifié par l&#39;entrypoint, ce qui rend difficile son versionnage.
Si on ajoute &lt;code&gt;:ro&lt;/code&gt; à la fin de la ligne, pour le monter en &lt;em&gt;read-only&lt;/em&gt;,
le conteneur crash.&lt;/p&gt;
&lt;p&gt;On a donc pris le parti d&#39;améliorer l&#39;entrypoint pour que ces valeurs puissent
être commandées par des variables d&#39;environnement.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Voilà le patch à appliquer&lt;/summary&gt;
&lt;p&gt;&lt;code&gt;git apply &amp;lt;&lt;/code&gt; &lt;a rel=&quot;external&quot; href=&quot;https://u.ppom.me/entrypoint.patch&quot;&gt;&lt;code&gt;entrypoint.patch&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;diff&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#005CC5, #79B8FF);&quot;&gt;diff --git a/run-document-server.sh b/run-document-server.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;index fd183a3..400e9e2 100755&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#B31D28, #FDAEB7);background-color: light-dark(#FFEEF0, #86181D);&quot;&gt;---&lt;/span&gt;&lt;span style=&quot;color: light-dark(#B31D28, #FDAEB7);background-color: light-dark(#FFEEF0, #86181D);&quot;&gt; a/run-document-server.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+++&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt; b/run-document-server.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);font-weight: bold;&quot;&gt;@@&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);font-weight: bold;&quot;&gt; -75,6 +75,10&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);font-weight: bold;&quot;&gt; @@&lt;/span&gt;&lt;span&gt; NGINX_CONFIG_PATH=&amp;quot;/etc/nginx/nginx.conf&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$(ulimit -n)}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;FORCESAVE_ENABLE=${FORCESAVE_ENABLE:-false}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;FORCESAVE_INTERVAL=${FORCESAVE_INTERVAL:-5m}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;FORCESAVE_STEP=${FORCESAVE_STEP:-1m}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; JWT_ENABLED=${JWT_ENABLED:-true}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; # validate user&amp;#39;s vars before usinig in json&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);font-weight: bold;&quot;&gt;@@&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);font-weight: bold;&quot;&gt; -328,6 +332,11&lt;/span&gt;&lt;span style=&quot;color: light-dark(#6F42C1, #B392F0);font-weight: bold;&quot;&gt; @@&lt;/span&gt;&lt;span&gt; update_ds_settings(){&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   ${JSON} -I -e &amp;quot;this.services.CoAuthoring.token.inbox.inBody = ${JWT_IN_BODY}&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   ${JSON} -I -e &amp;quot;this.services.CoAuthoring.token.outbox.inBody = ${JWT_IN_BODY}&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;  ${JSON} -I -e &amp;quot;if(this.services.CoAuthoring.autoAssembly===undefined)this.services.CoAuthoring.autoAssembly={};&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;  ${JSON} -I -e &amp;quot;this.services.CoAuthoring.autoAssembly.enable = ${FORCESAVE_ENABLE}&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;  ${JSON} -I -e &amp;quot;this.services.CoAuthoring.autoAssembly.interval = &amp;#39;${FORCESAVE_INTERVAL}&amp;#39;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;  ${JSON} -I -e &amp;quot;this.services.CoAuthoring.autoAssembly.step = &amp;#39;${FORCESAVE_STEP}&amp;#39;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);background-color: light-dark(#F0FFF4, #144620);&quot;&gt;+&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   if [ -f &amp;quot;${ONLYOFFICE_EXAMPLE_CONFIG}&amp;quot; ]; then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     ${JSON_EXAMPLE} -I -e &amp;quot;this.server.token.enable = ${JWT_ENABLED}&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     ${JSON_EXAMPLE} -I -e &amp;quot;this.server.token.secret = &amp;#39;${JWT_SECRET}&amp;#39;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/details&gt;
&lt;p&gt;Ce patch doit être appliqué au &lt;a rel=&quot;external&quot; href=&quot;https://github.com/ONLYOFFICE/Docker-DocumentServer&quot;&gt;repo du conteneur Docker
d&#39;OnlyOffice&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Alternativement, le fichier d&#39;entrypoint patché peut très sûrement être monté
dans le conteneur, permettant de s&#39;éviter de reconstruire l&#39;image manuellement.&lt;/p&gt;
&lt;p&gt;Testé :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ervices&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  o&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nlyoffice&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    b&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;uild&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; /&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;chemin/vers/le/repo/git/patché&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Non testé :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ervices&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  o&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nlyoffice&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    v&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;olumes&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; .&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;/run-document-server.patché.sh:/app/ds/run-document-server.sh:ro&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Une fois que vous avez reconstruit le conteneur avec ces valeurs ou monté la
version patchée de l&#39;entrypoint, voilà un exemple de configuration utilisant ces variables :&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ervices&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  o&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nlyoffice&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    e&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nvironment&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; F&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ORCESAVE_ENABLE=true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; F&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ORCESAVE_INTERVAL=2m&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; F&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;ORCESAVE_STEP=5m&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;L&#39;entrypoint fonctionne bizarrement, il n&#39;édite &lt;code&gt;local.json&lt;/code&gt; que s&#39;il n&#39;existe
pas (… ou quelque chose comme ça. Si vous avez compris un comportement plus
précis, n&#39;hésitez pas à me le dire). Donc il est possible que vous ayez besoin
de supprimer le conteneur d&#39;OnlyOffice pour que l&#39;entrypoint édite &lt;code&gt;local.json&lt;/code&gt;.
Vérifiez que vos documents ont bien été sauvegardés dans Nextcloud, pour ne pas
perdre de données !&lt;/p&gt;
&lt;p&gt;Une &lt;a rel=&quot;external&quot; href=&quot;https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/545&quot;&gt;pull request&lt;/a&gt;
est ouverte pour appliquer ce patch upstream.&lt;/p&gt;
&lt;h3 id=&quot;garde-fou-2-sauvegarde-du-cache-d-onlyoffice&quot;&gt;Garde-fou #2 : Sauvegarde du cache d&#39;OnlyOffice&lt;a class=&quot;zola-anchor&quot; href=&quot;#garde-fou-2-sauvegarde-du-cache-d-onlyoffice&quot; aria-label=&quot;Anchor link for: garde-fou-2-sauvegarde-du-cache-d-onlyoffice&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Afin de garder le cache d&#39;OnlyOffice, même si on supprime son conteneur, on peut
monter sauvegarder son cache et sa base de données.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Quoi, il y a une base de données dans le conteneur ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Et oui, le conteneur OnlyOffice est un &lt;em&gt;immense bordel&lt;/em&gt; dans lequel tournent&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;le serveur applicatif d&#39;OnlyOffice&lt;/li&gt;
&lt;li&gt;nginx&lt;/li&gt;
&lt;li&gt;postgresql&lt;/li&gt;
&lt;li&gt;rabbitmq&lt;/li&gt;
&lt;li&gt;encore d&#39;autres trucs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Bref, pour sauvegarder vite fait le cache, on sauvegarde le cache du serveur
applicatif et la base de données PostgreSQL. On a pas non plus fait un export
SQL de la base de données comme on fait pour faire une vraie sauvegarde de base
de données, mais &lt;em&gt;vas-y c&#39;est du cache&lt;/em&gt;, comme on dit.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#24292E, #E1E4E8); background-color: light-dark(#FFFFFF, #24292E);&quot; &gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;ervices&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;  o&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;nlyoffice&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;    v&lt;/span&gt;&lt;span style=&quot;color: light-dark(#22863A, #85E89D);&quot;&gt;olumes&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; o&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;nlyoffice-cache:/var/lib/onlyoffice/documentserver/App_Data&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      -&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt; o&lt;/span&gt;&lt;span style=&quot;color: light-dark(#032F62, #9ECBFF);&quot;&gt;nlyoffice-db:/var/lib/postgresql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;too-long-already-read&quot;&gt;Too Long; Already Read?&lt;a class=&quot;zola-anchor&quot; href=&quot;#too-long-already-read&quot; aria-label=&quot;Anchor link for: too-long-already-read&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Si vous utilisez Nextcloud et OnlyOffice, je vous encourage à demander activer
l&#39;option &lt;code&gt;forcesave&lt;/code&gt;, et vos documoutons seront bien gardés.&lt;/p&gt;
&lt;p&gt;🐑🐑🐑🐑🐑🐑🐑🐑🐑🐑&lt;a rel=&quot;external&quot; href=&quot;https://framagit.org/ppom/soweli&quot;&gt;🐑&lt;/a&gt;🐑🐑🐑🐑🐑🐑🐑🐑🐑🐑&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>MP02</title>
        <published>2022-10-04T00:00:00+00:00</published>
        <updated>2022-10-04T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/mp02/"/>
        <id>https://blog.ppom.me/mp02/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/mp02/">&lt;p&gt;J&#39;ai testé &lt;del&gt;pour vous&lt;/del&gt; le &lt;a rel=&quot;external&quot; href=&quot;https://www.punkt.ch/en/products/mp02-4g-mobile-phone/&quot;&gt;téléphone MP02&lt;/a&gt;.&lt;/p&gt;
&lt;!-- ![Qu&#39;il est élégant !](https://www.punkt.ch/repoimg/banner/focus/x3577-prod_zoom-MP02_teaser.jpg.pagespeed.ic.720LjbfyA6.webp) --&gt;
&lt;h1 id=&quot;ce-qui-m-a-hype-de-ouf&quot;&gt;Ce qui m&#39;a hypé de ouf&lt;a class=&quot;zola-anchor&quot; href=&quot;#ce-qui-m-a-hype-de-ouf&quot; aria-label=&quot;Anchor link for: ce-qui-m-a-hype-de-ouf&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;C&#39;est un téléphone (appels, SMS)&lt;/li&gt;
&lt;li&gt;C&#39;est un &lt;em&gt;12 touches&lt;/em&gt; (il comporte 21 boutons en tout)&lt;/li&gt;
&lt;li&gt;Il peut faire un &lt;strong&gt;partage de connexion&lt;/strong&gt; 4G&lt;/li&gt;
&lt;li&gt;Et surtout, il supporte nativement &lt;strong&gt;Signal&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;C&#39;est presque exactement le cahier des charges du téléphone de mes rêves™️.&lt;/p&gt;
&lt;h2 id=&quot;mon-besoin-mon-histoire&quot;&gt;Mon besoin, mon histoire&lt;a class=&quot;zola-anchor&quot; href=&quot;#mon-besoin-mon-histoire&quot; aria-label=&quot;Anchor link for: mon-besoin-mon-histoire&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;J&#39;ai un Fairphone 2 (FP2) depuis juin 2020, mais avant j&#39;avais un bon vieux Nokia avec un clavier AZERTY, une box 4G et un PC, et ça m&#39;allait très bien.
Ce qui m&#39;a fait acheter un smartphone dégooglisé à la place d&#39;un dumbphone, c&#39;était bien le besoin d&#39;utiliser une &lt;strong&gt;messagerie chiffrée&lt;/strong&gt; de bout en bout au quotidien.
Après deux ans de &lt;a href=&quot;https://grisebouille.net/fin-de-partie-pour-mon-fairphone&quot; target=&quot;_blank&quot;&gt;mauvais et loyaux services&lt;/a&gt;, ma patience pour le FP2 est moins solide.
En découvrant que mon téléphone &lt;button id=&quot;daydream-button&quot;&gt;rêvé&lt;/button&gt; de 2020 existait, je n&#39;ai pas hésité une seule semaine.&lt;/p&gt;
&lt;h1 id=&quot;fonctionnalites-supplementaires&quot;&gt;Fonctionnalités supplémentaires&lt;a class=&quot;zola-anchor&quot; href=&quot;#fonctionnalites-supplementaires&quot; aria-label=&quot;Anchor link for: fonctionnalites-supplementaires&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Voici l&#39;exhaustive liste de ses fonctionnalités supplémentaires :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Alarmes (sans texte)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes avec rappel optionnel (à une certaine date et heure)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Calculatrice&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Téléphone verrouillé et chiffré par un mot de passe&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bluetooth pour un casque sans fil&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Adaptateur pour un casque avec fil&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support du Wifi&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;En me trompant plusieurs fois de code PIN Signal, j&#39;ai réussi à me bannir temporairement de l&#39;enregistrement d&#39;un nouveau téléphone.
Je l&#39;ai donc utilisé pour les appels et SMS pendant 48h.&lt;/p&gt;
&lt;h1 id=&quot;ce-que-j-ai-aime-pendant-mes-deux-jours-d-utilisation&quot;&gt;Ce que j&#39;ai aimé pendant mes deux jours d&#39;utilisation&lt;a class=&quot;zola-anchor&quot; href=&quot;#ce-que-j-ai-aime-pendant-mes-deux-jours-d-utilisation&quot; aria-label=&quot;Anchor link for: ce-que-j-ai-aime-pendant-mes-deux-jours-d-utilisation&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Une interface efficace. J&#39;ai un peu pratiqué les &lt;em&gt;dumbphones&lt;/em&gt;, et celui-ci permet d&#39;arriver vite à ses fins. Les &lt;strong&gt;raccourcis&lt;/strong&gt; (bouton raccrocher pour quitter, bouton appel pour valider…) sont &lt;strong&gt;consistants&lt;/strong&gt; d&#39;un menu à l&#39;autre. Tous les boutons et raccourcis natifs sont très bien pensés.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Une interface uniquement en texte blanc sur fond noir. &lt;strong&gt;&amp;gt;_&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Un design et des sons élégants. 🕊️&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Seulement des fonctionnalités pratico-pratiques. Il n&#39;est pas possible de &quot;trainer&quot; sur le MP02.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;ce-que-je-n-ai-pas-aime&quot;&gt;Ce que je n&#39;ai pas aimé&lt;a class=&quot;zola-anchor&quot; href=&quot;#ce-que-je-n-ai-pas-aime&quot; aria-label=&quot;Anchor link for: ce-que-je-n-ai-pas-aime&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ce n&#39;est pas possible de désactiver les sons de l&#39;appareil :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;message envoyé,&lt;/li&gt;
&lt;li&gt;dé·verrouillage de l&#39;écran,&lt;/li&gt;
&lt;li&gt;mise sous·hors tension…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Il est uniquement possible de synchroniser les contacts en les important par la carte SIM, et l&#39;OS Fairphone Open du FP2 ne permet pas d&#39;y exporter ses contacts…
J&#39;ai dû recopier mes 80 contacts usuels à la main.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;La batterie semble pouvoir tenir 4-5 jours avec une &lt;strong&gt;utilisation modérée&lt;/strong&gt; en se connectant en 2G (totalement acceptable pour le volume de données de Signal),
mais le partage de connexion en 4G fait fondre 🕯️ la batterie en 4-5 heures.
Ma box 4G tient plus longtemps, mais de peu : j&#39;aurais pu me douter que la batterie n&#39;allait pas tenir plus. 🔌&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;J&#39;aurais aimé pouvoir faire une synchronisation CalDAV / CardDAV pour mon calendrier et mes contacts. 🔄&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;ce-qui-m-a-empeche-de-l-utiliser&quot;&gt;Ce qui m&#39;a empêché de l&#39;utiliser&lt;a class=&quot;zola-anchor&quot; href=&quot;#ce-qui-m-a-empeche-de-l-utiliser&quot; aria-label=&quot;Anchor link for: ce-qui-m-a-empeche-de-l-utiliser&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Je me suis d&#39;abord rendu compte que je n&#39;allais pas pouvoir garder l&#39;appli Signal active sur mon FP2, comme je pensais le faire. Je comptais garder le FP2 comme un iPod. J&#39;étais chagrin, mais je me suis rapidement fait à l&#39;idée.&lt;/p&gt;
&lt;p&gt;Puis je me suis rendu compte en enregistrant le MP02 comme appareil Signal que Signal-Desktop perdait l&#39;accès au compte, et que ce n&#39;était pas possible de le lier à nouveau au téléphone. &lt;em&gt;Fin de partie pour le MP02.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Dans un monde où je n&#39;utiliserais pas déjà Signal pour échanger des liens, des images, des documents, j&#39;aurais pu me contenter de l&#39;avoir &lt;em&gt;uniquement&lt;/em&gt; sur le MP02.&lt;/p&gt;
&lt;p&gt;Mais j&#39;ai réussi en 2 ans à faire passer (et à rencontrer) 80% de mon entourage sur cette messagerie, et l&#39;utilise abondamment. J&#39;ai environ soixante-dix contacts dessus et une quinzaine de groupes.
J&#39;ai quelques conversations régulières. Et je n&#39;ai pas envie de me priver de mon ordinateur pour y écrire.&lt;/p&gt;
&lt;p&gt;C&#39;est donc avec regret que je me résous à revenir au FP2.&lt;/p&gt;
&lt;p&gt;Si vous cherchez plus de détails, ça me botte d&#39;en discuter !&lt;/p&gt;
&lt;p&gt;&lt;audio id=&quot;daydream-player&quot; display=&quot;none&quot; loop src=&quot;https://u.ppom.me/daydream.mp3&quot;&gt;&lt;/audio&gt;&lt;/p&gt;
&lt;script&gt;
document.getElementById(&quot;daydream-button&quot;).onclick = function () {
  const player = document.getElementById(&quot;daydream-player&quot;);
  if (player.paused) {
    player.play();
  } else {
    player.pause();
  }
};
&lt;/script&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Firefox</title>
        <published>2021-03-12T00:00:00+00:00</published>
        <updated>2021-03-12T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.ppom.me/firefox/"/>
        <id>https://blog.ppom.me/firefox/</id>
        
        <content type="html" xml:base="https://blog.ppom.me/firefox/">&lt;!-- TODO importer profil depuis chrome --&gt;
&lt;!-- TODO but : politique, privacy, confort d&#39;utilisation --&gt;
&lt;!-- TODO pourquoi c&#39;est important de se protéger des trackers. pourquoi google c&#39;est mieux --&gt;
&lt;!-- TODO pour aller plus loin en conclusion --&gt;
&lt;!-- TODO https://paris-luttes.info/quelques-trucs-indispensables-pour-3282?lang=fr --&gt;
&lt;p&gt;Firefox est un navigateur Web, semblable à Chrome.&lt;/p&gt;
&lt;p&gt;Je le conseille parce que toute personne qui sait programmer peut étudier et modifier son code source. Ça permet à la &quot;communauté&quot; d&#39;être critique sur son fonctionnement, et de l&#39;améliorer. C&#39;est un logiciel &lt;a rel=&quot;external&quot; href=&quot;https://framasoft.org/fr/full/#topPglogiciel&quot;&gt;libre et open-source&lt;/a&gt;.
Ainsi, au contraire de Chrome, il ne contient pas de traqueurs de ton activité en ligne.
De plus, il est développé par Mozilla, une organisation à but non lucratif engagée 🚀.&lt;/p&gt;
&lt;p&gt;Dans cet article, je détaille mes conseils pour configurer Firefox, afin d&#39;en faire un outil de ninja de la nuit cool à utiliser !&lt;/p&gt;
&lt;h1 id=&quot;preferences&quot;&gt;Préférences&lt;a class=&quot;zola-anchor&quot; href=&quot;#preferences&quot; aria-label=&quot;Anchor link for: preferences&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Comment modifier les paramètres de Firefox ?&lt;/p&gt;
&lt;p&gt;Taper &lt;code&gt;about:preferences&lt;/code&gt; dans la barre d&#39;URL ou aller dans les &lt;em&gt;Préférences&lt;/em&gt; depuis le bouton (☰) en haut à droite.&lt;/p&gt;
&lt;h2 id=&quot;page-general-des-preferences&quot;&gt;Page &lt;em&gt;Général&lt;/em&gt; des Préférences&lt;a class=&quot;zola-anchor&quot; href=&quot;#page-general-des-preferences&quot; aria-label=&quot;Anchor link for: page-general-des-preferences&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;!-- - Décocher &quot;*Ctrl+Tab fait défiler vos onglets en les classant selon leur dernière utilisation*&quot; → Ctrl+Tab fait défiler les onglets dans l&#39;ordre. --&gt;
&lt;ul&gt;
&lt;li&gt;Coche &quot;&lt;em&gt;Lire le contenu protégé par des DRM&lt;/em&gt;&quot; si tu comptes utiliser des services privateurs comme Netflix. Sinon, la lecture de vidéos &quot;&lt;em&gt;protégées par DRM&lt;/em&gt;&quot; ne fonctionnera pas.
Cet &lt;a rel=&quot;external&quot; href=&quot;https://framablog.org/2020/12/04/pour-un-monde-avec-un-million-de-netflix/&quot;&gt;article de Framasoft&lt;/a&gt; parle très bien du problème que pose Netflix, si le sujet pique ta curiosité.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;page-recherche-des-preferences&quot;&gt;Page &lt;em&gt;Recherche&lt;/em&gt; des Préférences&lt;a class=&quot;zola-anchor&quot; href=&quot;#page-recherche-des-preferences&quot; aria-label=&quot;Anchor link for: page-recherche-des-preferences&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Je conseille de mettre &lt;a rel=&quot;external&quot; href=&quot;https://duckduckgo.com/&quot;&gt;DuckDuckGo&lt;/a&gt; comme moteur de recherche par défaut.&lt;/p&gt;
&lt;p&gt;Les rageux·ses diront que les résultats sont moins bien. C&#39;est notamment dû au fait :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;que DuckDuckGo ne personnalise pas le contenu en fonction de ce qu&#39;il sait de toi (ce que Google fait).&lt;/li&gt;
&lt;li&gt;qu&#39;il ne sous-paie pas des Africaines précaires pour entrainer son moteur de recherche (&lt;a rel=&quot;external&quot; href=&quot;https://peertube.datagueule.tv/videos/watch/7224328c-efd5-425d-8734-fb27021c5615&quot;&gt;ce que Google fait&lt;/a&gt;). Je dis pas ça pour te culpabiliser, tu n&#39;y peux rien, c&#39;est juste Google qui n&#39;a aucune éthique, et qui se trouve être une des entreprises avec la plus grosse cotation en bourse du monde.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mais la plupart du temps (&lt;em&gt;&lt;strong&gt;selon moi hein&lt;/strong&gt;&lt;/em&gt;), les résultats sont bien.&lt;/p&gt;
&lt;p&gt;Astuce !
Dans le cas où tu trouves pas ce que tu veux et que tu veux rediriger ta recherche DuckDuckGo sur Google, ajoute &quot;&lt;code&gt;!g&lt;/code&gt;&quot; à ta recherche.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Exemple :&lt;/em&gt; &quot;&lt;code&gt;chat mignon !g&lt;/code&gt;&quot;&lt;/p&gt;
&lt;p&gt;Il existe pleins d&#39;autres !bangs :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;&lt;code&gt;!wf&lt;/code&gt;&quot; pour Wikipédia en Français,&lt;/li&gt;
&lt;li&gt;&quot;&lt;code&gt;!yt&lt;/code&gt;&quot; pour YouTube,&lt;/li&gt;
&lt;li&gt;&quot;&lt;code&gt;!i&lt;/code&gt;&quot; pour les images DuckDuckGo,&lt;/li&gt;
&lt;li&gt;&quot;&lt;code&gt;!gi&lt;/code&gt;&quot; pour les images Google,&lt;/li&gt;
&lt;li&gt;&quot;&lt;code&gt;!wref&lt;/code&gt;&quot; pour traduire un mot de l&#39;anglais vers le français,&lt;/li&gt;
&lt;li&gt;&quot;&lt;code&gt;!wrfe&lt;/code&gt;&quot; pour traduire un mot de l&#39;anglais vers le français,&lt;/li&gt;
&lt;li&gt;et j&#39;en passe &lt;a rel=&quot;external&quot; href=&quot;https://duckduckgo.com/bang&quot;&gt;des centaines&lt;/a&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- Je connais des personnes qui utilisent [Start Page](https://www.startpage.com/) et qui en sont très satisfaites. C&#39;est aussi un moteur de recherche respectueux de la vie privée. --&gt;
&lt;h2 id=&quot;page-vie-privee-et-securite-des-preferences&quot;&gt;Page &lt;em&gt;Vie Privée et Sécurité&lt;/em&gt; des Préférences&lt;a class=&quot;zola-anchor&quot; href=&quot;#page-vie-privee-et-securite-des-preferences&quot; aria-label=&quot;Anchor link for: page-vie-privee-et-securite-des-preferences&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Laisse sur &quot;&lt;em&gt;Standard&lt;/em&gt;&quot;. Les extensions &lt;strong&gt;Privacy&lt;/strong&gt; renforcent encore la protection.&lt;/li&gt;
&lt;li&gt;Cocher &quot;&lt;em&gt;Supprimer les cookies et les données des sites à la fermeture de Firefox&lt;/em&gt;&quot; permet de se faire oublier des sites d&#39;une utilisation de Firefox à une autre. Je le conseille pour éviter la personnalisation des contenus et le traquage.
&lt;ul&gt;
&lt;li&gt;La suppression systématique des cookies a aussi comme effet de te déconnecter des sites sur lesquels une identification est nécessaire (exemple : ta boîte mail, la CAF, Uber Eats 🤮). Tu peux donc ajouter des exceptions à cette suppression de cookies pour ne pas à avoir besoin de t’authentifier à chaque fois que tu consultes tes mails ou que tu commandes une pizza - en participant à l’Uberisation de la société et en &lt;a rel=&quot;external&quot; href=&quot;https://peertube.datagueule.tv/videos/watch/ddf3e2a5-04cb-4398-a5c5-95a1fb47c35f&quot;&gt;exploitant des livreurs précaires&lt;/a&gt; (sans papiers). &lt;em&gt;Zut, j&#39;avais dit pas de culpabilisation...&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;barre-des-favoris&quot;&gt;Barre des favoris&lt;a class=&quot;zola-anchor&quot; href=&quot;#barre-des-favoris&quot; aria-label=&quot;Anchor link for: barre-des-favoris&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Si tu veux afficher la barre des favoris, utilise le raccourci clavier &lt;code&gt;Ctrl+Maj+B&lt;/code&gt;.&lt;/p&gt;
&lt;h1 id=&quot;extensions-firefox&quot;&gt;Extensions Firefox&lt;a class=&quot;zola-anchor&quot; href=&quot;#extensions-firefox&quot; aria-label=&quot;Anchor link for: extensions-firefox&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Comment on ajoute des extensions sur Firefox ?&lt;/p&gt;
&lt;p&gt;Tape &lt;code&gt;Ctrl+Maj+A&lt;/code&gt; ou va dans les &quot;&lt;em&gt;Modules complémentaires&lt;/em&gt;&quot; depuis le bouton en haut à droite.&lt;/p&gt;
&lt;p&gt;Voici les extensions que je te conseille, classés par catégorie :&lt;/p&gt;
&lt;h2 id=&quot;categorie-privacy&quot;&gt;Catégorie Privacy&lt;a class=&quot;zola-anchor&quot; href=&quot;#categorie-privacy&quot; aria-label=&quot;Anchor link for: categorie-privacy&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;ublock-origin&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/ublock-origin/&quot;&gt;&lt;strong&gt;uBlock Origin&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ublock-origin&quot; aria-label=&quot;Anchor link for: ublock-origin&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Anti trackers et Anti pubs.&lt;/p&gt;
&lt;p&gt;Je ne conseille pas Adblock, Adblock Plus, ou Ghostery : leur modèle économique craint.
En plus de ça, leur code n&#39;est pas libre ni open-source. C&#39;est donc impossible de vérifier ce que ces extensions font, comme s&#39;assurer qu&#39;elles n&#39;enregistrent pas ton historique de navigation.&lt;/p&gt;
&lt;p&gt;Si uBlock Origin a une interface plus sobre que Ghostery, il est à la fois très efficace, peu consommateur de ressources, et digne de confiance, parce que c&#39;est un logiciel libre.&lt;/p&gt;
&lt;h3 id=&quot;clearurls&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/clearurls/&quot;&gt;&lt;strong&gt;ClearURLs&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#clearurls&quot; aria-label=&quot;Anchor link for: clearurls&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Supprime dans l&#39;URL des sites les bouts de code destinés à la surveillance, qui ne sont pas nécessaires (pour toi).
Par exemple, &lt;code&gt;https://example.com?utm_source=newsletter1&amp;amp;utm_medium=email&amp;amp;utm_campaign=sale&lt;/code&gt; va être raccourci en &lt;code&gt;https://example.com&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;decentraleyes&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/decentraleyes/&quot;&gt;&lt;strong&gt;Decentraleyes&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#decentraleyes&quot; aria-label=&quot;Anchor link for: decentraleyes&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Accélère certaines pages en gardant en cache des gros fichiers. C&#39;est aussi un plus question &lt;em&gt;privacy&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id=&quot;terms-of-service-didn-t-read&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/terms-of-service-didnt-read/&quot;&gt;&lt;strong&gt;Terms of Service; Didn’t Read&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#terms-of-service-didn-t-read&quot; aria-label=&quot;Anchor link for: terms-of-service-didn-t-read&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Donne à droite de l&#39;URL une &quot;note&quot; des Conditions d&#39;utilisation du site (pour les gros sites).&lt;/p&gt;
&lt;h3 id=&quot;snowflake&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/torproject-snowflake/&quot;&gt;&lt;strong&gt;Snowflake&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#snowflake&quot; aria-label=&quot;Anchor link for: snowflake&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Permet à des personnes dans des régions du monde où Internet est surveillé (enfin, plus qu&#39;en France) de se connecter à Tor en leur partageant un peu de connexion.&lt;/p&gt;
&lt;h2 id=&quot;categorie-confort&quot;&gt;Catégorie Confort&lt;a class=&quot;zola-anchor&quot; href=&quot;#categorie-confort&quot; aria-label=&quot;Anchor link for: categorie-confort&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;i-don-t-care-about-cookies&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/i-dont-care-about-cookies/&quot;&gt;&lt;strong&gt;I don&#39;t care about cookies&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#i-don-t-care-about-cookies&quot; aria-label=&quot;Anchor link for: i-don-t-care-about-cookies&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Supprime les bannières de cookies de presque tous les sites. Ce truc fait littéralement gagner 5 min par jour ^^&lt;/p&gt;
&lt;h3 id=&quot;dark-reader&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/darkreader/&quot;&gt;&lt;strong&gt;Dark Reader&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#dark-reader&quot; aria-label=&quot;Anchor link for: dark-reader&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Met en &quot;mode sombre&quot; les pages. Ca fatigue moins les yeux ! Peut se désactiver au cas par cas pour les pages sur lesquelles ça rend mal.&lt;/p&gt;
&lt;h3 id=&quot;languagetool&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/languagetool/&quot;&gt;&lt;strong&gt;LanguageTool&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#languagetool&quot; aria-label=&quot;Anchor link for: languagetool&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Correcteur ortographique. C&#39;est open-source.&lt;/p&gt;
&lt;p&gt;Par défaut, l&#39;extension se connecte au serveur de l&#39;entreprise LanguageTool pour demander les corrections de ses textes. Leurs conditions d&#39;utilisation semblent très respectueuses de la vie privée. Toutefois, j&#39;ai mis en place leur programme sur mon serveur aussi.&lt;/p&gt;
&lt;p&gt;Pour se connecter à mon serveur à la place du leur, aller dans les paramètres, puis dans les paramètres avancés, cocher &quot;&lt;em&gt;Autre serveur&lt;/em&gt;&quot; et rentrer &lt;code&gt;https://lang.ppom.me/v2/&lt;/code&gt; puis cliquer sur &quot;&lt;em&gt;Sauvegarder&lt;/em&gt;&quot;. De cette manière, l&#39;extension demandera les corrections à mon serveur.&lt;/p&gt;
&lt;h2 id=&quot;categorie-lol&quot;&gt;Catégorie LOL&lt;a class=&quot;zola-anchor&quot; href=&quot;#categorie-lol&quot; aria-label=&quot;Anchor link for: categorie-lol&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;proutify&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/proutify/&quot;&gt;&lt;strong&gt;Proutify&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#proutify&quot; aria-label=&quot;Anchor link for: proutify&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Remplace pleins de mots &lt;em&gt;de droite&lt;/em&gt; par leur version proutisée. Très drole ! (une initiaprout de Framasoft)&lt;/p&gt;
&lt;h3 id=&quot;niccage&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/niccage/&quot;&gt;&lt;strong&gt;NicCage&lt;/strong&gt;&lt;/a&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#niccage&quot; aria-label=&quot;Anchor link for: niccage&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Remplace toutes les images par des photos de Nick Cage. C&#39;est rigolo environ 10min ^^&lt;/p&gt;
&lt;h2 id=&quot;categorie-gestionnaires-de-mot-de-passe&quot;&gt;Catégorie Gestionnaires de mot de passe&lt;a class=&quot;zola-anchor&quot; href=&quot;#categorie-gestionnaires-de-mot-de-passe&quot; aria-label=&quot;Anchor link for: categorie-gestionnaires-de-mot-de-passe&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Je conseille fortement à toute personne qui surfe sur le Web (oui oui, j&#39;ai 21 ans et je dis ça 🏄) d&#39;utiliser un gestionnaire de mots de passe. Comme ça tu ne retiens plus qu&#39;un mot de passe, qui te donne accès à tous les autres.
Ça permet d&#39;avoir des mots de passes sécurisés (compliqués) et différents pour chaque site / application.&lt;/p&gt;
&lt;p&gt;C&#39;est à la fois un vrai bonus en terme de sécurité (se faire voler un mot de passe n&#39;implique pas de se faire voler tous les autres comptes avec le même mot de passe) et en terme de praticité : il n&#39;y a plus à retenir quelle variante de quel (faible) mot de passe on a mis sur tel site.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://bitwarden.com/&quot;&gt;&lt;strong&gt;Bitwarden&lt;/strong&gt;&lt;/a&gt; est une solution open-source qui semble très bien. Très sécurisée et facile à utiliser.&lt;/p&gt;
&lt;p&gt;Elle possède une &lt;a rel=&quot;external&quot; href=&quot;https://addons.mozilla.org/fr/firefox/addon/bitwarden-password-manager/&quot;&gt;extension Firefox&lt;/a&gt;, aussi pour Firefox Android, Chrome, une application Android...&lt;/p&gt;
&lt;p&gt;Je ne l&#39;utilise pas parce que mon gestionnaire de mots de passe est un programme qui nécessite des compétences en informatique : &lt;a rel=&quot;external&quot; href=&quot;https://www.passwordstore.org/&quot;&gt;&lt;code&gt;pass&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&quot;fin&quot;&gt;&lt;em&gt;Fin&lt;/em&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#fin&quot; aria-label=&quot;Anchor link for: fin&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;J&#39;espère que ce tuto condensé te sera utile pour trouver ton bonheur sur Firefox.&lt;/p&gt;
&lt;p&gt;Les avis exprimés ici n&#39;engagent que moi.&lt;/p&gt;
&lt;p&gt;Si tu as des questions, des suggestions, que quelque chose n&#39;est pas clair ou mérite précision, n&#39;hésite pas à me contacter !&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ppom&lt;/strong&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;!--script src=&quot;https://sense3.org/s/sense3.js&quot; data-sense3=&quot;728x90;adblock,browser,chrome,facebook,firefox,gafam,google,linux,microsoft,mozilla,opera,wikipedia,windows&quot;&gt;&lt;/script--&gt;
&lt;h1 id=&quot;liens-pour-aller-plus-loin&quot;&gt;Liens pour aller plus loin&lt;a class=&quot;zola-anchor&quot; href=&quot;#liens-pour-aller-plus-loin&quot; aria-label=&quot;Anchor link for: liens-pour-aller-plus-loin&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Pour plus d&#39;infos et conseils pour choisir un gestionnaire de mots de passe, allez voir par &lt;a rel=&quot;external&quot; href=&quot;https://von.zone/change-ton-porte-cle/&quot;&gt;ici&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Si tu veux optimiser ton utilisation de Firefox sur PC, un récapitulatif (&lt;em&gt;cheatsheet&lt;/em&gt;) des raccourcis clavier est &lt;a rel=&quot;external&quot; href=&quot;https://duckduckgo.com/?t=ffab&amp;amp;q=firefox+cheatsheet&amp;amp;ia=cheatsheet&amp;amp;iax=1&quot;&gt;intégré à DuckDuckGo&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Si tu veux plus d&#39;infos sur ces fameux &lt;em&gt;trackers&lt;/em&gt;, je te conseille ces &lt;a rel=&quot;external&quot; href=&quot;https://pixellibre.net/2017/10/publicite-ligne-episode-1-cest-quoi-publicite/&quot;&gt;quatre articles qui expliquent comment fonctionne la publicité sur Internet&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Si tu veux plus d&#39;infos sur le &lt;em&gt;capitalisme de surveillance&lt;/em&gt; et le &lt;em&gt;business model&lt;/em&gt; de Facebook et Google, je te conseille cet &lt;a rel=&quot;external&quot; href=&quot;https://framablog.org/2017/11/09/la-nouvelle-dystopie-maintenant/&quot;&gt;article de Framablog&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;uBlock Origin plus efficace qu&#39;Adblock Plus, sur le &lt;a rel=&quot;external&quot; href=&quot;https://github.com/gorhill/uBlock/wiki/About-%22This-other-extension-reports-more-stuff-blocked!%22&quot;&gt;wiki de uBlock Origin&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Un article de Framasoft sur la &quot;fausse pub&quot; que tu viens de voir, &lt;a rel=&quot;external&quot; href=&quot;https://framablog.org/2018/04/01/framadsense-la-publicite-qui-a-du-sens/&quot;&gt;ici&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;liens-dans-l-article&quot;&gt;Liens dans l&#39;article&lt;a class=&quot;zola-anchor&quot; href=&quot;#liens-dans-l-article&quot; aria-label=&quot;Anchor link for: liens-dans-l-article&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://framablog.org/2020/12/04/pour-un-monde-avec-un-million-de-netflix/&quot;&gt;L&#39;article de Framasoft contre les DRM et Netflix&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://peertube.datagueule.tv/videos/watch/7224328c-efd5-425d-8734-fb27021c5615&quot;&gt;La vidéo sur les travailleuses du clic de Google&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://peertube.datagueule.tv/videos/watch/ddf3e2a5-04cb-4398-a5c5-95a1fb47c35f&quot;&gt;La vidéo sur les travailleurs précaires de Uber Eats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://duckduckgo.com/bang&quot;&gt;La liste de tous les raccourcis de DuckDuckGo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
        
    </entry>
</feed>
