2020-06-04 03:08:05 +00:00
---
stage: Monitor
2021-03-18 15:09:04 +00:00
group: Monitor
2020-11-26 06:09:20 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-06-04 03:08:05 +00:00
---
2021-01-28 06:08:59 +00:00
# IP whitelist **(FREE SELF)**
2017-07-11 14:53:28 +00:00
> Introduced in GitLab 9.4.
2020-12-04 21:09:29 +00:00
NOTE:
2020-03-25 06:07:58 +00:00
We intend to [rename IP whitelist as `IP allowlist` ](https://gitlab.com/gitlab-org/gitlab/-/issues/7554 ).
2020-03-31 03:07:51 +00:00
GitLab provides some [monitoring endpoints ](../../user/admin_area/monitoring/health_check.md )
that provide health check information when probed.
2017-07-11 14:53:28 +00:00
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:
2019-07-10 18:23:55 +00:00
```ruby
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1']
```
2017-07-11 14:53:28 +00:00
2020-03-31 03:07:51 +00:00
1. Save the file and [reconfigure ](../restart_gitlab.md#omnibus-gitlab-reconfigure ) GitLab for the changes to take effect.
2017-07-11 14:53:28 +00:00
---
**For installations from source**
1. Edit `config/gitlab.yml` :
2019-07-10 18:23:55 +00:00
```yaml
monitoring:
# by default only local IPs are allowed to access monitoring resources
ip_whitelist:
- 127.0.0.0/8
- 192.168.0.1
```
2017-07-11 14:53:28 +00:00
2020-03-31 03:07:51 +00:00
1. Save the file and [restart ](../restart_gitlab.md#installations-from-source ) GitLab for the changes to take effect.