I am running my media stack as a Docker stack via Portainer which runs as an App on TrueNAS Scale EE since it came out yesterday.
Before that the stack was running in an Ubuntu 24.04 VM on the same TrueNAS machine. It’s NIC was bridged to my home network.
I am using port forwarding on my router to expose HTTP(s) ports to the internet.
I am using Traefik as an Ingress-Controller/Reverse proxy and I exposed ports 80 and 443 in host mode for it.
On Ubuntu Traefik forwarded the actual IP of Clients through the X-Forwarded-For and X-Real-Ip headers.
I used this in Jellyfin for bandwidth limitations based on whether the client was coming from outside my LAN.
I did not change anything in my docker compose file migrating from the VM to TrueNAS except for volume paths.
Now the headers mentioned above always show my routers WAN IP-Address, no matter whether the request comes from inside or outside the network.
I changed the port forwarding from the Ubuntu VM to TrueNAS itself and it works otherwise perfectly fine.
I also set up a whoami container and accessed it with a browser from within my LAN, it gave the following output:
Hostname: 123831009e4d
IP: 127.0.0.1
IP: ::1
IP: 172.18.0.6
RemoteAddr: 172.18.0.2:51416
GET / HTTP/1.1
Host: whoami.mydomain.tld
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/vif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Dnt: 1
Priority: u=0, i
Sec-Ch-Ua: "Chomium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Upgrade-Insecure-Requests: 1
X-Forwarded-For: my.real.wan.ip
X-Forwarded-Host: whoami.mydomain.tld
X-Forwarded-Port: 443
X-Forwarded-Proto: https
X-Forwarded-Server: 642f647339e5
X-Real-Ip: my.real.wan.ip
172.18.0.2 is my Traefik’s IP.
Does anyone here have an idea, why I cannot see actual client IPs anymore and how I can get them again?