Nextcloud: cannot get real client ip address in nextcloud container logs (app)
In the logs of the ap container of nextcloud, we can only find the IP address of the NGINX container. It means that any module of Nextcloud against brut force is useless or will apply to all users.
I tried the following solution, but none is working fine:
- https://nginx.org/en/docs/http/ngx_http_realip_module.html => is putting the real IP addres in the Web log
without : web_1 | 172.18.0.2 - - [06/May/2019:19:07:33 +0000] "GET / HTTP/1.1" 302 5 "-" "Wget/1.19.4 (linux-gnu)" "143.79.21.xxx"
with: web_1 | 143.79.21.xxx - - [06/May/2019:19:07:33 +0000] "GET / HTTP/1.1" 302 5 "-" "Wget/1.19.4 (linux-gnu)" "143.79.21.xxx"
The second test does not seem to change anything.
Any idea on how it could be managed properly ?
A second issue is that when accessing Nextcloud through IP v6, neither NGINX container nor the app container see the IPv6 address. I found this, but not sure this is the same issue: https://github.com/containous/traefik/issues/977#issuecomment-410826256