SafeLine WAF is an open-source Web Application Firewall designed to protect your applications from common web threats.
In this guide, weβll walk through configuring SafeLine to protect DVWA (Damn Vulnerable Web Application), enabling HTTPS, and verifying that the firewall rules work as expected.
Configuring SafeLine WAF
Adding DVWA to the Application Tab
- In the SafeLine dashboard, navigate to the Application tab.
- Add a new application with the following settings:
-
Domain:
www.dvwa.local
-
Port:
443
-
Reverse Proxy:
http://10.0.0.147:8080
-
Domain:
- Enable:
- HTTP Flood: Protects against DoS attacks by rate limiting requests.
- Auth: Enforces username/password authentication.
- Use the 7-day PRO license trial to unlock all features.
At this point, all incoming requests to www.dvwa.local
will go through the SafeLine firewall and be forwarded to port 8080
on the DVWA server.
Creating and Importing an SSL Certificate
To secure DVWA over HTTPS, generate a self-signed SSL certificate:
openssl genrsa -out private.key 4096
openssl req -new -key private.key -out private.csr
openssl x509 -req -days 365 -in private.csr -signkey private.key -out private.crt
Once generated, import the certificate into SafeLine via the dashboard.
Testing the Configuration from Kali Browser
- From a browser in Kali Linux, access:
http://dvwa.local
You should be redirected to:
https://dvwa.local
- Confirm that DVWA is accessible over HTTPS and that SafeLine is enforcing the configured rules.
Conclusion
With SafeLine WAF now protecting DVWA:
- All requests are filtered through the firewall before reaching the application.
- DoS protection and authentication are enabled.
- HTTPS is enforced with a self-signed SSL certificate.
This setup is ideal for testing WAF rules, experimenting with penetration testing techniques, or building secure lab environments.
Join the SafeLine Community
If you continue to experience issues, feel free to contact SafeLine support for further assistance.
Top comments (0)