Replies: 4 comments 11 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.
-
On some instances, there might be the wrong ip-address shown in
https://yourdomain.com/settings/admin/logging
when 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/overview
if 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.shown
to 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-mastercontainer
to disconnect the mastercontainer from the nextcloud-aio network.sudo docker network rm nextcloud-aio
sudo docker network create nextcloud-aio
in order to recreate the nextcloud-aio networksudo docker network connect nextcloud-aio nextcloud-aio-mastercontainer
to connect the mastercontainer to the network again.Beta Was this translation helpful? Give feedback.
All reactions