X-Forwarded-For not shown in Logs
Summary
In my gitlab-rails/production.log I only see 172.16.* IPs, as we've a load balancer in front of our servers. Gitlab-installation has been done out of the YUM Repo.
Steps to reproduce
Open /var/log/gitlab/gitlab-rails/production.log
What is the current bug behavior?
Seeing private 172.16.* IPs in the logs
What is the expected correct behavior?
I should see public IP addresses of users.
Relevant logs and/or screenshots
Started POST "/ci/api/v1/builds/register.json" for 172.16.xx.yy at 2017-05-02 11:43:16 +0200
Started GET "/example/infrastructure/merge_requests/35/ci_environments_status" for 172.16.xx.yy at 2017-05-02 11:43:17 +0200
Processing by Projects::MergeRequestsController#ci_environments_status as JSON
Parameters: {"namespace_id"=>"example", "project_id"=>"infrastructure", "id"=>"35"}
Results of GitLab environment info
gitlab-rake gitlab:env:info
System information System: Proxy: http_proxy: http://proxy:3128 https_proxy: http://proxy:3128 Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.6.6 Bundler Version:1.13.7 Rake Version: 10.5.0 Redis Version: 3.2.5 Git Version: 2.10.2 Sidekiq Version:4.2.7
GitLab information Version: 9.0.5-ee Revision: 71d72c9 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: mysql2 DB Version: 5.5.54-38.6-log URL: https://git.example.com HTTP Clone URL: https://git.example.com/some-group/some-project.git SSH Clone URL: git@ssh.git.example.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.0.0 Repository storage paths:
- default: /opt/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/ Git: /opt/gitlab/embedded/bin/git
Possible fixes
Maybe just check the implementation how to read x-forwarded-for in the code, if the correct part is used if there're multiple elements?