Skip to content

tempesta-tech/webshield

Repository files navigation

Tempesta WebShield

Automatic detection and blocking bad bots (DDoS, shopping bots, scrappers, booking bots and others) by TLS and HTTP fingerprints or IP based on Tempesta FW access logs stored in the Clickhouse database.

The current version 0.1 is experimental and should not be used in production.

Wiki

Requirements

  • Python 3.12 <=
  • Tempesta FW 0.8.0 <=
  • Clickhouse 25.6.0 <=

Install

git clone https://github.com/tempesta-tech/webshield.git
cd webshield
sudo setup.sh

Prepare

Before running the application, you need to prepare Tempesta FW:

  1. Configure Tempesta Logger.
  2. Modify your Tempesta FW configuration and add the tfh and tft include directories
  3. Start Tempesta FW with Tempesta Logger enabled
  4. Start ClickHouse DB and ensure the access_log table exists.

Run

systemctl start tempesta-webshield.service

See logs

journalctl -f -u tempesta-webshield

Run tests

To run the tests you need to copy GeoLite2-City.mmdb to tests/ directory.

# run all tests with a logging level INFO
pytest

Format project

black .
isort .

Releases

No releases published

Packages

 
 
 

Contributors