[GH-ISSUE #463] Crowdsec block access (403), can't whitelist IP #1468

Closed
opened 2026-04-16 08:07:11 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @aszurnasirpal on GitHub (Apr 5, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/463

Hi,

I tried many ways to bypass that, but I failed miserably.

in docker compose I mounted volume under crowdsec section

      - ./config/whitelists.yaml:/etc/crowdsec/parsers/s02-enrich/whitelists.yaml

then I edited ./config/whitelists.yaml, where I put my IP address

  ip:
    - "::1"
    - "95.88.xxx.xxx"

but still, while in crowdsec logs I see that IP is banned

time="2025-04-05T08:05:47Z" level=info msg="172.18.0.4 - [Sat, 05 Apr 2025 08:05:47 UTC] \"GET /v1/decisions?ip=95.88.xxx.xxx&banned=true HTTP/1.1 403 828.986µs \"Crowdsec-Bouncer-Traefik-Plugin/1.X.X\" \""

Additional info:

/ # cscli decisions list
No active decisions
/ # cscli alerts list
No active alerts

Does anyone else have any idea how to bypass that?

Update:
Tried to add exclusions via pangolin docker bot

----------------------------------------------
 Allowlist: white                             
----------------------------------------------
 Name                white                    
 Description         whitelists_pangolin      
 Created at          2025-04-05T08:21:04.621Z 
 Updated at          2025-04-05T08:21:31.137Z 
 Managed by Console  no                       
----------------------------------------------

-------------------------------------------------------------
 Value         Comment  Expiration  Created at               
-------------------------------------------------------------
 95.88.xx.xxx           never       2025-04-05T08:21:04.621Z 
-------------------------------------------------------------

Still effect is the same

Originally created by @aszurnasirpal on GitHub (Apr 5, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/463 Hi, I tried many ways to bypass that, but I failed miserably. in docker compose I mounted volume under crowdsec section ``` - ./config/whitelists.yaml:/etc/crowdsec/parsers/s02-enrich/whitelists.yaml ``` then I edited ./config/whitelists.yaml, where I put my IP address ``` ip: - "::1" - "95.88.xxx.xxx" ``` but still, while in crowdsec logs I see that IP is banned ``` time="2025-04-05T08:05:47Z" level=info msg="172.18.0.4 - [Sat, 05 Apr 2025 08:05:47 UTC] \"GET /v1/decisions?ip=95.88.xxx.xxx&banned=true HTTP/1.1 403 828.986µs \"Crowdsec-Bouncer-Traefik-Plugin/1.X.X\" \"" ``` Additional info: ``` / # cscli decisions list No active decisions ``` ``` / # cscli alerts list No active alerts ``` Does anyone else have any idea how to bypass that? Update: Tried to add exclusions via pangolin docker bot ``` ---------------------------------------------- Allowlist: white ---------------------------------------------- Name white Description whitelists_pangolin Created at 2025-04-05T08:21:04.621Z Updated at 2025-04-05T08:21:31.137Z Managed by Console no ---------------------------------------------- ------------------------------------------------------------- Value Comment Expiration Created at ------------------------------------------------------------- 95.88.xx.xxx never 2025-04-05T08:21:04.621Z ------------------------------------------------------------- ``` Still effect is the same
Author
Owner

@hhftechnology commented on GitHub (Apr 5, 2025):

did you check your bouncer? is it registered properly ?

<!-- gh-comment-id:2780681467 --> @hhftechnology commented on GitHub (Apr 5, 2025): did you check your bouncer? is it registered properly ?
Author
Owner

@aszurnasirpal commented on GitHub (Apr 5, 2025):

Seems that is empty
output of
/crowdsecbouncers list

------------------------------------------------------------------
 Name  IP Address  Valid  Last API pull  Type  Version  Auth Type 
------------------------------------------------------------------
------------------------------------------------------------------

Do you know how can I fix it?

<!-- gh-comment-id:2780683611 --> @aszurnasirpal commented on GitHub (Apr 5, 2025): Seems that is empty output of /crowdsecbouncers list ``` ------------------------------------------------------------------ Name IP Address Valid Last API pull Type Version Auth Type ------------------------------------------------------------------ ------------------------------------------------------------------ ``` Do you know how can I fix it?
Author
Owner

@hhftechnology commented on GitHub (Apr 5, 2025):

Seems that is empty output of /crowdsecbouncers list

------------------------------------------------------------------
 Name  IP Address  Valid  Last API pull  Type  Version  Auth Type 
------------------------------------------------------------------
------------------------------------------------------------------

Do you know how can I fix it?

https://hhf.technology/snippets/pangolin-commands#bouncer-management

Most of 403 error we see here is due to bouncer not properly registered.

<!-- gh-comment-id:2780861203 --> @hhftechnology commented on GitHub (Apr 5, 2025): > Seems that is empty output of /crowdsecbouncers list > > ``` > ------------------------------------------------------------------ > Name IP Address Valid Last API pull Type Version Auth Type > ------------------------------------------------------------------ > ------------------------------------------------------------------ > ``` > > Do you know how can I fix it? https://hhf.technology/snippets/pangolin-commands#bouncer-management Most of 403 error we see here is due to bouncer not properly registered.
Author
Owner

@aszurnasirpal commented on GitHub (Apr 5, 2025):

Thanks for the hint! I added the bouncer as you suggested

/ # cscli bouncers list
─────────────────────────────────────────────────────────────────────────────
 Name             IP Address  Valid  Last API pull  Type  Version  Auth Type 
─────────────────────────────────────────────────────────────────────────────
 traefik-bouncer              ✔️                                   api-key   
─────────────────────────────────────────────────────────────────────────────

I added the given API key in docker-compose.yml with

environment:
  - CROWDSEC_BOUNCER_API_KEY=MY_BOUNCER_API

and restarted the docker. But still I'm blocked (actually all requests are blocked also from other IPs)

Should I modify something else as well?

<!-- gh-comment-id:2780874319 --> @aszurnasirpal commented on GitHub (Apr 5, 2025): Thanks for the hint! I added the bouncer as you suggested ``` / # cscli bouncers list ───────────────────────────────────────────────────────────────────────────── Name IP Address Valid Last API pull Type Version Auth Type ───────────────────────────────────────────────────────────────────────────── traefik-bouncer ✔️ api-key ───────────────────────────────────────────────────────────────────────────── ``` I added the given API key in docker-compose.yml with ``` environment: - CROWDSEC_BOUNCER_API_KEY=MY_BOUNCER_API ``` and restarted the docker. But still I'm blocked (actually all requests are blocked also from other IPs) Should I modify something else as well?
Author
Owner

@hhftechnology commented on GitHub (Apr 5, 2025):

you should put it in the dynamic_config.yml

http:
  middlewares:
    # CrowdSec configuration with proper IP forwarding
    crowdsec:
      plugin:
        crowdsec:
          enabled: true
          logLevel: INFO
          updateIntervalSeconds: 15
          updateMaxFailure: 0
          defaultDecisionSeconds: 15
          httpTimeoutSeconds: 10
          crowdsecMode: live
          crowdsecAppsecEnabled: true
          crowdsecAppsecHost: crowdsec:7422
          crowdsecAppsecFailureBlock: true
          crowdsecAppsecUnreachableBlock: true
          crowdsecLapiKey: "csdcdssffdsfdsfdsf+xXWwpif8j0WeBpeo" #key will go here
          crowdsecLapiHost: crowdsec:8080
<!-- gh-comment-id:2780915612 --> @hhftechnology commented on GitHub (Apr 5, 2025): you should put it in the dynamic_config.yml ``` http: middlewares: # CrowdSec configuration with proper IP forwarding crowdsec: plugin: crowdsec: enabled: true logLevel: INFO updateIntervalSeconds: 15 updateMaxFailure: 0 defaultDecisionSeconds: 15 httpTimeoutSeconds: 10 crowdsecMode: live crowdsecAppsecEnabled: true crowdsecAppsecHost: crowdsec:7422 crowdsecAppsecFailureBlock: true crowdsecAppsecUnreachableBlock: true crowdsecLapiKey: "csdcdssffdsfdsfdsf+xXWwpif8j0WeBpeo" #key will go here crowdsecLapiHost: crowdsec:8080 ```
Author
Owner

@aszurnasirpal commented on GitHub (Apr 5, 2025):

@hhftechnology, many thanks for the help. It works! I also appreciate other scripts that you provide on your forum. The Docker bot is fantastic!

<!-- gh-comment-id:2781030534 --> @aszurnasirpal commented on GitHub (Apr 5, 2025): @hhftechnology, many thanks for the help. It works! I also appreciate other scripts that you provide on your forum. The Docker bot is fantastic!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#1468