DEV Community

Lulu
Lulu

Posted on

A Free and Powerful WAF Solution for Web Security-SafeLine

Whether you’re running a blog, a company website, or an internal application, web applications are often targets for malicious scans, SQL injections, and XSS attacks. Enterprise-grade WAFs (Web Application Firewalls) can be expensive, making them out of reach for individuals and small businesses. But now, there’s a free solution: SafeLine Community Edition. SafeLine offers robust web security protection without the hefty price tag—easy to use and visually appealing!

1. Overview
SafeLine is a free community version of a web application firewall (WAF) designed by Chaitin Technology, with a claim to provide protection even against 0-day attacks. It’s a great option for those who prefer not to spend on expensive security solutions. Here are some key features:

  • Smart Semantic Analysis Algorithm: SafeLine is powered by an industry-leading smart semantic analysis algorithm that ensures accurate detection with low false positives, making it tough to bypass. Unlike traditional rule-based methods, SafeLine’s algorithm can handle unknown 0-day attacks efficiently.
  • Nginx-Based Traffic Interception: It utilizes Nginx reverse proxy technology to intercept traffic, ensuring minimal performance impact and low business intrusion.
  • User-Friendly Deployment: Deployment is a breeze with Docker—one command, and you’re good to go. This makes it extremely friendly for beginners and non-ops professionals.
  • Intuitive Management Interface: Manage SafeLine through a web interface, where you can monitor the WAF’s status in real-time, review attack logs, and track site traffic metrics like PV and UV.
  • Community Support: Engage with Chaitin’s technical team through Discord or submit issue on GitHub. Stay updated on the latest features and bug fixes, and enjoy a product designed with the user in mind.

2. Feature Highlights

  • Data Statistics: View site request statistics, protection data, IP geolocation, and UV/PV information, along with access statistics from the past 30 days.

Image description

  • Attack Events: Review all attack events, including the attacker’s IP (with geolocation), block counts, attack times, and durations.

Image description

  • Protection Sites: Add web sites for protection.

    • Supports HTTP and HTTPS: Image description
  • Protection modes like "Defense," "Audit," and "Offline."

    • Defense Mode: Activates protection rules to block attacks automatically.
    • Audit Mode: Issues attack alerts without blocking; manual blocking is available.
    • Offline Mode: Temporarily disables site access, displaying a maintenance message.

Image description

  • Black and White Lists: Set up blacklists and whitelists for protected sites, covering source IPs, paths, hosts, headers, and bodies.

Image description

  • Bot Protection (Human-Machine Verification): Prevents bot-based scanning and attacks by presenting a verification page.

Image description

  • Frequency Limitation: Limits high-frequency site access and attacks.

Image description

  • IP Groups: Group malicious IPs for sharing with the Chaitin community.

Image description

3. Installation and Deployment

System Requirements:

  • Operating System: Linux
  • Instruction Architecture: x86_64
  • Software Dependencies: Docker version 20.10.6 or higher, Docker Compose version 2.0.0 or higher
  • Minimum Environment: 1 CPU core, 1 GB of RAM, 5 GB of disk space

Commands to Check System Specifications:

  • uname -m — Check the instruction architecture
  • docker version — Verify Docker version
  • docker compose version — Verify Docker Compose version
  • cat /proc/cpuinfo | grep "processor" — View CPU info
  • free -h — Check memory info
  • df -h — Check disk space
  • lscpu | grep ssse3 — Verify CPU supports the ssse3 instruction set

Automatic Deployment

Use the following command to start the automated installation of SafeLine. (This process requires root privileges):

bash -c "$(curl -fsSLk https://waf.chaitin.com/release/latest/setup.sh)"
Enter fullscreen mode Exit fullscreen mode

Once the command is executed, your installation is complete!

Top comments (0)