Help us learn about your current experience with the documentation. Take the survey.
IP 允许列表
- Tier: Free, Premium, Ultimate
- Offering: GitLab Self-Managed
GitLab 提供了一些 监控端点,在被探测时会提供健康检查信息。
要通过 IP allowlist 来控制对这些端点的访问,你可以添加单个主机或使用 IP 范围:
-
打开
/etc/gitlab/gitlab.rb并添加或取消注释以下内容:gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1'] -
保存文件并 重新配置 GitLab 以使更改生效。
你可以在 gitlab.webservice.monitoring.ipWhitelist 键下设置所需的 IP。例如:
gitlab:
webservice:
monitoring:
# Monitoring IP allowlist
ipWhitelist:
# Defaults
- 0.0.0.0/0
- ::/0-
编辑
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 -
保存文件并 重启 GitLab 以使更改生效。