You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see all the configuration options in the [bouncer documentation](https://plugins.traefik.io/plugins/6335346ca4caa9ddeffda116/crowdsec-bouncer-traefik-plugin).
53
124
You can also refer to a [full traefik and CrowdSec stack on kubernetes](https://raw.githubusercontent.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/main/examples/kubernetes/README.md)
54
125
@@ -57,3 +128,29 @@ Now, you can install the remediation component:
57
128
```bash
58
129
kubectl apply -f bouncer-middleware.yaml
59
130
```
131
+
132
+
### Treafik Behind an Upstream Proxy or Load Balancer
133
+
134
+
When Traefik operates behind another proxy (such as a load balancer, CDN, etc ...), the source IP seen by Traefik may be the wrong one instead of the real client.
135
+
To ensure Crowdsec applies decisions correctly based on the real client IP, it's crucial to properly forward and trust headers.
136
+
137
+
First you configure Treafik to trust the upstream forwarded headers. Traefik has [`forwardedHeaders.trustedIPs`](https://doc.traefik.io/traefik/routing/entrypoints/#forwarded-headers) and [`proxyProtocol.trustedIPs`](https://doc.traefik.io/traefik/routing/entrypoints/#forwarded-headers) directives.
138
+
139
+
140
+
Then, you need to configure the middleware to trust as well the IP:
141
+
142
+
```yaml
143
+
spec:
144
+
plugin:
145
+
bouncer:
146
+
forwardedheaderstrustedips: <trusted-cidr>
147
+
```
148
+
149
+
When using `proxyProtocol.trustedIPs` Traefik replaces `X-Real-Ip`, you can also add :
0 commit comments