nextcloud / nextcloud/notify_push

push server is not a trusted proxy, already set trusted proxies

Open
#155 29 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

documentation needs info
Dominant language
Rust
Stars
344
Forks
64
Avg merge
2d 10h
Merged PRs (30d)
5

Description

occ notify_push:setup https://xxxx.com/push
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
✓ push server can connect to the Nextcloud server
🗴 push server is not a trusted proxy, please add '220.194.88.217' 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: "119.188.19.0/24", "120.221.167.0/24", "120.221.168.0/24", "121.51.191.0/24", "121.51.90.0/24", "121.51.93.0/24", "122.97.142.0/24", "122.97.143.0/24", "123.151.144.0/24", "140.249.67.0/24", "182.254.58.0/24", "220.194.88.0/24", "223.166.151.0/24", "27.155.114.0/24", "27.155.115.0/24", "36.152.58.0/24", "36.248.2.0/24", "58.217.244.0/24", "58.217.245.0/24", "58.251.121.0/24", "59.36.117.0/24", "59.36.119.0/24", "59.36.120.0/24", "59.36.95.0/24", "61.151.164.0/24"
  The following x-forwarded-for header was received by Nextcloud: 220.194.88.217
    from the following remote: 220.194.88.217

  If you're having issues getting the trusted proxy setup working, you can try bypassing any existing reverse proxy
  in your setup by setting the `NEXTCLOUD_URL` environment variable to point directly to the internal Nextcloud webserver url
  (You will still need the ip address of the push server added as trusted proxy)

I have followed guide[https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies] to set config.php, and here it is( in CIDR way):

  'trusted_proxies' => 
   array (
    0 => '119.188.19.0/24',
    1 => '120.221.167.0/24',
    2 => '120.221.168.0/24',
    3 => '121.51.191.0/24',
    4 => '121.51.90.0/24',
    5 => '121.51.93.0/24',
    6 => '122.97.142.0/24',
    7 => '122.97.143.0/24',
    8 => '123.151.144.0/24',
    9 => '140.249.67.0/24',
    10 => '182.254.58.0/24',
    11 => '220.194.88.0/24',
    12 => '223.166.151.0/24',
    13 => '27.155.114.0/24',
    14 => '27.155.115.0/24',
    15 => '36.152.58.0/24',
    16 => '36.248.2.0/24',
    17 => '58.217.244.0/24',
    18 => '58.217.245.0/24',
    19 => '58.251.121.0/24',
    20 => '59.36.117.0/24',
    21 => '59.36.119.0/24',
    22 => '59.36.120.0/24',
    23 => '59.36.95.0/24',
    24 => '61.151.164.0/24',
 ),


My Nextcloud is 23.0.0(php8,redis) notify_push version is 0.3.0.
However push_notify notice me that the proxy ip is not in those keys, what should I do ? Is there something wrong I didn't realize?
Looking forward to your reply.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the occ notify_push:setup entry point and the Nextcloud config.php trusted_proxies setting, then compare the received x-forwarded-for value with the configured CIDR entries. Review the linked reverse-proxy documentation and reproduce the setup check; done means the check recognizes the configured proxy or clearly identifies the configuration mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, redis, rust
Domain
backend, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.