gitlab-org--gitlab-foss/doc/administration/monitoring/ip_whitelist.md
Marcel Amirault 4633604424 Fix whitespace in many administration docs
Many code blocks are 4spaced, and they render in GitLab
without coloring as a result, even though they are
fenced with a language label. If in a list, other items
will render as being in a code block too, even if not
meant to. This fixes all these issues for many admin
docs (part 2)
2019-07-10 18:23:55 +00:00

1,016 B

IP whitelist

Introduced in GitLab 9.4.

GitLab provides some monitoring endpoints that provide health check information when probed.

To control access to those endpoints via IP whitelisting, you can add single hosts or use IP ranges:

For Omnibus installations

  1. Open /etc/gitlab/gitlab.rb and add or uncomment the following:

    gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1']
    
  2. Save the file and reconfigure GitLab for the changes to take effect.


For installations from source

  1. Edit config/gitlab.yml:

    monitoring:
      # by default only local IPs are allowed to access monitoring resources
      ip_whitelist:
        - 127.0.0.0/8
        - 192.168.0.1
    
  2. Save the file and restart GitLab for the changes to take effect.