How to Secure Your Web Apps: A Free and Powerful WAF

Lulu - Sep 12 - - Dev Community

A Web Application Firewall (WAF) operates at the application layer, providing protection for web requests and responses. WAFs can safeguard your web applications from common threats such as SQL injections, cross-site scripting (XSS), and other vulnerabilities. Additionally, they can monitor and filter traffic that may lead to Denial of Service (DoS) attacks, helping ensure the availability and security of your web services.

SafeLine: A Powerful and Free WAF Tool

Today, we’re introducing SafeLine, a robust and free WAF solution. SafeLine’s traffic processing engine is built on top of Nginx, offering excellent stability and performance for handling high volumes of web traffic.

Installation

You can install SafeLine via the command line with the following steps:

Step 1: Install SafeLine

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

Step 2: Install Docker

curl -sSL "https://get.docker.com/" | bash
Enter fullscreen mode Exit fullscreen mode

When prompted, type y to confirm and wait for the installation to complete.

Access SafeLine

After installation, open port 9443 on your firewall to allow access:

# Open port 9443
firewall-cmd --zone=public --add-port=9443/tcp --permanent   
# Apply the configuration
firewall-cmd --reload  
Enter fullscreen mode Exit fullscreen mode

Now, you can access SafeLine by navigating to the following URL:

https://<your-server-ip>:9443/
Enter fullscreen mode Exit fullscreen mode

Once you log in, you’ll be able to start using SafeLine to protect your applications.

Image description

Uninstallation

If you decide you no longer need SafeLine, follow these steps to uninstall it completely:

1.Navigate to the SafeLine directory:

cd <safeline-directory>
Enter fullscreen mode Exit fullscreen mode

2.Stop the SafeLine service:

docker compose down
Enter fullscreen mode Exit fullscreen mode

3.Remove all SafeLine data:

rm -rf <safeline-directory>
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player