Skip to content

Commit

Permalink
crowdsec: append @docker to router whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Oct 6, 2024
1 parent 461406f commit dbd2284
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions roles/crowdsec/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ crowdsec_prometheus_listen_addr: "127.0.0.1"
crowdsec_prometheus_listen_port: "6060"

# Takes a list of exact router names to ignore when parsing Traefik access logs.
# Include @file or @docker depending on the source of said router.
crowdsec_whitelisted_routers: []
# Takes list of specific IPs
crowdsec_whitelisted_ips: []
Expand Down
16 changes: 8 additions & 8 deletions roles/crowdsec/templates/saltbox.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ whitelist:
reason: "Traefik Router Allowlist"
expression:
{% for item in plex_instances %}
- evt.Meta.traefik_router_name == '{{ item }}'
- evt.Meta.traefik_router_name == '{{ item }}-http'
- evt.Meta.traefik_router_name == '{{ item }}@docker'
- evt.Meta.traefik_router_name == '{{ item }}-http@docker'
{% endfor %}
{% for item in jellyfin_instances %}
- evt.Meta.traefik_router_name == '{{ item }}'
- evt.Meta.traefik_router_name == '{{ item }}-http'
- evt.Meta.traefik_router_name == '{{ item }}@docker'
- evt.Meta.traefik_router_name == '{{ item }}-http@docker'
{% endfor %}
{% for item in emby_instances %}
- evt.Meta.traefik_router_name == '{{ item }}'
- evt.Meta.traefik_router_name == '{{ item }}-http'
- evt.Meta.traefik_router_name == '{{ item }}@docker'
- evt.Meta.traefik_router_name == '{{ item }}-http@docker'
{% endfor %}
{% for item in crowdsec_whitelisted_routers %}
- evt.Meta.traefik_router_name == '{{ item }}'
- evt.Meta.traefik_router_name == '{{ item }}-http'
- evt.Meta.traefik_router_name == '{{ item }}@docker'
- evt.Meta.traefik_router_name == '{{ item }}-http@docker'
{% endfor %}

0 comments on commit dbd2284

Please sign in to comment.