Shell scripts to block IP ranges which try to brute force the login page in Gitlab CE.
Install ipcalc. This program is used to foid out the
IP network so the entire IP range for a given IP address
can be blocked in iptables.
The scripts expect to live in ~/gitlab-iptables-blocker.
Add the following lines to crontab:
@reboot cd ~/gitlab-iptables-blocker/add_iptables_block.sh
@hourly cd ~/gitlab-iptables-blocker/add_iptables_block.sh
@hourly cd ~/gitlab-iptables-blocker/update_blocked_ips.sh
Blocked IPs are stored in ~/gitlab-iptables-blocker/blocked_ips