Replies: 7 comments 12 replies
-
|
Even if I had strange ipv6 + docker behaviour (where docker is assigning local ipv6 to containers even though I asked it to disable ipv6 in daemon.json), this is not the reason why I saw wrong IP in the logs. I followed your recommendations but then found out it does not work - my problem wasn't IPv6 but nginx reverse proxy (even though I'm using the default recommended config from this repo). Cheers |
Beta Was this translation helpful? Give feedback.
-
|
I had to add the docker network gateway IP as a trusted proxy as shown in the OP with Lines 40 to 50 in 5cbbe1b |
Beta Was this translation helpful? Give feedback.
-
|
For those who are using docker rootless: the default rootless port driver doesn't forward remote IPs, so none of the above tipps will work. You need to switch to e.g. using |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
|
TrueNAS app. |
Beta Was this translation helpful? Give feedback.
-
|
I run Nextcloud behind multiple reverse proxies. One is on a VPS and another is in a separate container on the same machine as Nextcloud AIO but in the same Tailnet. I use split-dns to connect to the one on the same machine when I am connected to the Tailnet. Both the VPS reverse proxy and the container reverse proxy may change their IP address. Can host names be used in the trusted_proxies list? E.g. my external reverse proxy is at "foo.example.com" and internal at "bar.example.com"? |
Beta Was this translation helpful? Give feedback.
-
|
I have the same issue. Running AIO within docker, on a machine with a dynamic IP and using dyndns, so I cannot put the public IP anywhere in the config. I can see that the nextcloud instance receives packets with the correct HTTP_X_FORWARDED_FOR, and the originating IP is from the docker container running apache+caddy, and I can see that the IP of the apache container is within the range Failed logins are logged as if coming from the public IP matching the hostname of the instance. I tried explicitly setting |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
On some instances, there might be the wrong ip-address shown in
https://yourdomain.com/settings/admin/loggingwhen a login failed. This is either caused by a missing trusted_proxy in Nextcloud or caused by ipv6 not being disabled correctly or caused by the docker network not being configured correctly for ipv6. Follow these steps to resolve it:https://yourdomain.com/settings/admin/overviewif there is an ip-address shown as brute-force throttled, that should be added to the trusted_proxies list. If so, you can add it withsudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set trusted_proxies 2 --value="ip.address.that.is.shown"- of course you need to adjustip.address.that.is.shownto the one that is shown in the admin overview. After a reboot of the Nextcloud container, there should not be any further throttling and the correct ip-address should be logged in the Nextcloud logs when login fails. If that should not be the case, see below:If the above is not successul, you can now try to correctly configure the docker network for ipv6:
sudo docker network disconnect nextcloud-aio nextcloud-aio-mastercontainerto disconnect the mastercontainer from the nextcloud-aio network.sudo docker network rm nextcloud-aiosudo docker network create nextcloud-aioin order to recreate the nextcloud-aio networksudo docker network connect nextcloud-aio nextcloud-aio-mastercontainerto connect the mastercontainer to the network again.Beta Was this translation helpful? Give feedback.
All reactions