Traefik Crowdsek

ΠŸΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ‚ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ crowdsek вмСстС с Traefik. НСобходимо ΡΠΎΠ·Π΄Π°Ρ‚ΡŒ ΠΎΡ‚Π΄Π΅Π»ΡŒΠ½Ρ‹ΠΉ Ρ„Π°ΠΉΠ» Π² ΠΏΠ°ΠΏΠΊΠ΅ traefik/dynamic

http:
    middlewares:
        crowdsec:
            plugin:
                crowdsec-bouncer-traefik-plugin:
                    enabled: true
                    logLevel: INFO
                    updateIntervalSeconds: 15
                    updateMaxFailure: 0
                    defaultDecisionSeconds: 15
                    httpTimeoutSeconds: 10
                    crowdsecMode: stream
                    crowdsecAppsecEnabled: true
                    crowdsecAppsecHost: crowdsec:7422
                    crowdsecAppsecFailureBlock: true
                    crowdsecAppsecUnreachableBlock: true
                    crowdsecLapiKey: <LAPI_KEY>     
                    crowdsecLapiHost: crowdsec:8080
                    crowdsecLapiScheme: http
                    forwardedHeadersTrustedIPs:
                      - 172.21.0.0/16                                                            # Reverse Proxy IP address 
                    clientTrustedIPs:
                      - 192.168.0.0/24

А Ρ‚Π°ΠΊ ΠΆΠ΅ Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ ΠΎΠ±Ρ€Π°Ρ‰Π΅Π½ΠΈΠ΅ ΠΊ middlewares Π² ΡΡ‚Π°Ρ‚ΠΈΡ‡Π΅ΡΠΊΡƒΡŽ ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΡŽ

...
entryPoints:
  http:
    address: ":80"
    http:
      middlewares:
        - crowdsec@file
      redirections:
        entryPoint:
          to: https
          scheme: https
  https:
    address: ":443"
    http:
      middlewares:
        - crowdsec@file
...