-
I setup a planka behind a Caddy2 , with docker. All things run well until I began to setup fail2ban. Because fail2ban uses the file /app/logs/planka.log, so I took a look at the file planka.log and found something like this:
The IP address here is obviously belongs to Caddy. It's not the real ip from client side. Here's the settings in my Caddyfile:
Can anybody show me how to setup caddy2 or planka correctly so that the real ip of client side can be displayed in planka.log? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! I'm not very familiar with this, but you could try setting the environment variable
|
Beta Was this translation helpful? Give feedback.
Hi! I'm not very familiar with this, but you could try setting the environment variable
TRUST_PROXY=1
. I've checked in the code that when it's set, it should use the IP address fromX-Forwarded-For
: