1
2
3
4
5
6
7
8
9
10
11
12
13
| vim /etc/gitlab/gitlab.rb
gitlab_rails['rack_attack_git_basic_auth'] = {
'enabled' => true,
'ip_whitelist' => ["127.0.0.1","101.00.125.00","333.65.12.43"],
'maxretry' => 10,
'findtime' => 60,
'bantime' => 3600
}
gitlab-ctl reconfigure
history
|
进入Redis,删除被墙的IP
1
| /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket keys '*' | grep 'rack::attack' | xargs /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket DEL
|
参考
+Gitlab访问出现 403 forbidden解决方案