# X-Forwarded-For header / trusted\_proxies setting not working

**URL:** <https://help.nextcloud.com/t/x-forwarded-for-header-trusted-proxies-setting-not-working/195008>\
**Category:** ℹ️ Support\
**Tags:** reverseproxy, occ, bruteforce, real-ip, apache, setup\_warning\
**Created:** [June 12, 2024, 7:52pm UTC](https://help.nextcloud.com/t/x-forwarded-for-header-trusted-proxies-setting-not-working/195008 "2024-06-12T19:52:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [June 12, 2024, 9:10pm UTC](https://help.nextcloud.com/t/x-forwarded-for-header-trusted-proxies-setting-not-working/195008/2 "2024-06-12T21:10:18Z")

</div>

I’m under impression `trusted_proxies` format is little “_limited_”.. I have the feeling it only accepts IP ranges **with CIDR** network mask.. see [Your "trusted\_proxies" setting is not correctly set, it should be an array of IP addresses - optionally with range in CIDR notation](https://help.nextcloud.com/t/your-trusted-proxies-setting-is-not-correctly-set-it-should-be-an-array-of-ip-addresses-optionally-with-range-in-cidr-notation/194689)

for this reason I would start with lazy config

```auto
'trusted_proxies' =>
  array (
    0 => 'fe80::/10',
    1 => 'fc00::/7',
  ),

```

like described here:

> [@Apache Docker behind reverse proxy](https://help.nextcloud.com/t/apache-docker-behind-reverse-proxy/151754):
>
> understanding and configuring reverse proxy for official Nextcloud Apache Docker image I was experimenting with new option to run official Nextcloud Docker image with custom user (long requested and really appreciated feature improving security of the system) which finally find into official image shortly [Allow to run with custom uid by J0WI · Pull Request #1812 · nextcloud/docker · GitHub](https://github.com/nextcloud/docker/pull/1812) when I hit very strange issue: Nextcloud logs and Apache logs didn’t show client IP but internal IP of reve…

and tighten it once it works.

---

_[View the full topic](https://help.nextcloud.com/t/x-forwarded-for-header-trusted-proxies-setting-not-working/195008)._
