https://github.com/ryzhovau/autoblock
Inspects web server logs and blocks IPs by hits or traffic
https://github.com/ryzhovau/autoblock
firewall goaccess nginx
Last synced: 11 months ago
JSON representation
Inspects web server logs and blocks IPs by hits or traffic
- Host: GitHub
- URL: https://github.com/ryzhovau/autoblock
- Owner: ryzhovau
- Created: 2016-08-24T06:49:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T07:08:22.000Z (about 8 years ago)
- Last Synced: 2025-04-12T19:09:58.688Z (about 1 year ago)
- Topics: firewall, goaccess, nginx
- Language: Shell
- Size: 1.95 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Autoblock
This is a bash script to filter web server logs and ban some IPs which is consumed too much traffic or done too much hits. By default, IPs are banned for one day.
## Requirements
* [goaccess](https://github.com/allinurl/goaccess) to parse logs,
* [ferm](https://github.com/MaxKellermann/ferm) or other firewall to apply changes,
* cron. To do it periodically.
## Installation
* Install dependencies,
* Download script to `/usr/local/bin` and make it executable,
* Edit script for your needs,
* Make cron job to run it once per hour.