So, one of my Nextcloud instances is running on a raspberrypi in my living room and is connected to the internet.
I have set up the notify_push service, because it seems to decrease load on this rather low-end device.
What is weird is that when I run occ notify_push:setup, it complains that the IP address where the proxy requests are coming from is not in the trusted_proxies array, even though both 127.0.0.1 and the private IP address of the device are in the trusted proxies array:
🗴 push server is not a trusted proxy, please add '192.162.10.1' to the list of trusted proxies or configure any existing reverse proxy to forward the 'x-forwarded-for' send by the push server.
See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies for how to set trusted proxies.
The following trusted proxies are currently configured: "127.0.0.1", "::1", "192.168.10.2"
The following x-forwarded-for header was received by Nextcloud: 1.2.3.4
from the following remote: 192.168.10.1
Why is that? The address it wants me to add is the address of the gateway of my local lan to the internet. Why does it say that requests are coming from there, when instead they are coming from the very same machine where nextcloud is running? And why does it say “Nextloud: 1.2.3.4”? That’s not an IP address I am using
If the alternative is setting the environment variable “NEXTCLOUD_URL”, where can I set it? Actually, it is already being set in the service file for the notify_push systemd service.
I am asking because, while adding the gateway address as a trusted proxy makes the notify_push service work, it yields an error message in the security check:
The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.
Is notify_push incompatible with NAT or what could be the problem?