Recently I have a problem with Gitlab: My colleague had mistakenly typed wrong password multiple times on Gitlab login and all of us cannot access Gitlab because of IP ban.
It take a while for me to find out how to remove the banned IP on Gitlab. So I write it here for anyone can save their time:
Firstly, open redis client:
sudo /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket
List the item with key contains “rack”:
redis /var/opt/gitlab/redis/redis.socket> KEYS *rack*
The result may like this:
1) cache:gitlab:rack::attack:allow2ban:ban:1.2.3.4
You can remove the ban using DEL command:
redis /var/opt/gitlab/redis/redis.socket> DEL “cache:gitlab:rack::attack:allow2ban:ban:1.2.3.4”