# Gitlab chart client ip

**URL:** <https://forum.gitlab.com/t/gitlab-chart-client-ip/62693>\
**Category:** Self-managed\
**Tags:** helm, workhorse, kubernetes\
**Created:** [December 9, 2021, 6:52pm UTC](https://forum.gitlab.com/t/gitlab-chart-client-ip/62693 "2021-12-09T18:52:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZleFox](https://sea2.discourse-cdn.com/gitlab/user_avatar/forum.gitlab.com/zlefox/32/22384_2.png) [@ZleFox](https://forum.gitlab.com/u/ZleFox)\
**Post date:** [December 9, 2021, 6:52pm UTC](https://forum.gitlab.com/t/gitlab-chart-client-ip/62693/1 "2021-12-09T18:52:47Z")

</div>

Hello,  
I have a private gitlab-ce instance installed in a private on premise kubernetes cluster. Everything is running great, but the gitlab workhorse (webservice) is not logging the real client ips (private IPs). Instead it logs the ingress-controller’s IP.  
I have looked at the source and it seems that the [xff module used](https://github.com/sebest/xff), does not accept private IPs in the X-Forward-For header.  
Anyone else running gitlab in private network, without internet access? Is it that way “by design” or I am missing some settings?

---

<div class="post-metadata">

**Author:** ![dren.dk](https://sea2.discourse-cdn.com/gitlab/user_avatar/forum.gitlab.com/dren.dk/32/12471_2.png) [@dren.dk](https://forum.gitlab.com/u/dren.dk)\
**Post date:** [March 31, 2023, 5:46am UTC](https://forum.gitlab.com/t/gitlab-chart-client-ip/62693/2 "2023-03-31T05:46:24Z")

</div>

Did you ever find a solution for this?

---

<div class="post-metadata">

**Author:** ![ZleFox](https://sea2.discourse-cdn.com/gitlab/user_avatar/forum.gitlab.com/zlefox/32/22384_2.png) [@ZleFox](https://forum.gitlab.com/u/ZleFox)\
**Post date:** [March 31, 2023, 6:10am UTC](https://forum.gitlab.com/t/gitlab-chart-client-ip/62693/3 "2023-03-31T06:10:27Z")

</div>

Not really. I gave up. At least it is a private instance, not exposed on the internet.

---

<div class="post-metadata">

**Author:** ![dren.dk](https://sea2.discourse-cdn.com/gitlab/user_avatar/forum.gitlab.com/dren.dk/32/12471_2.png) [@dren.dk](https://forum.gitlab.com/u/dren.dk)\
**Post date:** [March 31, 2023, 6:24am UTC](https://forum.gitlab.com/t/gitlab-chart-client-ip/62693/4 "2023-03-31T06:24:23Z")

</div>

I just fixed it on my on-prem k8s cluster by setting the trusted\_proxies option for the webservice chart to include the pod subnet of my cluster, with this option in the gitlab values.yaml:

```auto
gitlab:
  gitlab:
    webservice:
      trusted_proxies: ["192.168.64.0/18"]

```

It’s a bit primitive to have to do this, a much nicer solution would be for the trusted proxy to add a secret token to a header and then trust the proxy when it passes the correct header.

---

<div class="post-metadata">

**Author:** ![ZleFox](https://sea2.discourse-cdn.com/gitlab/user_avatar/forum.gitlab.com/zlefox/32/22384_2.png) [@ZleFox](https://forum.gitlab.com/u/ZleFox)\
**Post date:** [March 31, 2023, 7:11am UTC](https://forum.gitlab.com/t/gitlab-chart-client-ip/62693/5 "2023-03-31T07:11:27Z")

</div>

Thanks, that fixed it for the gitlab interface. But the gitlab-workhorse still does not see the real remote\_ip. I don’t see similar option for that container
