Download the PHP package akaunting/laravel-firewall without Composer
On this page you can find all versions of the php package akaunting/laravel-firewall. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-firewall
Web Application Firewall (WAF) package for Laravel
This package intends to protect your Laravel app from different type of attacks such as XSS, SQLi, RFI, LFI, User Agent, and a lot more. It will also block repeated attacks and send notification via email and/or slack when attack is detected. Furthermore, it will log failed logins and block the IP after a number of attempts.
Note: Some middleware classes (i.e. Xss) are empty as the Middleware
abstract class that they extend does all of the job, dynamically. In short, they all works ;)
Getting Started
1. Install
Run the following command:
2. Publish
Publish configuration, language, and migrations
3. Database
Create db tables
4. Configure
You can change the firewall settings of your app from config/firewall.php
file
Usage
Middlewares are already defined so should just add them to routes. The firewall.all
middleware applies all the middlewares available in the all_middleware
array of config file.
You can apply each middleware per route. For example, you can allow only whitelisted IPs to access admin:
Or you can get notified when anyone NOT in whitelist
access admin, by adding it to the inspections
config:
Available middlewares applicable to routes:
You may also define routes
for each middleware in config/firewall.php
and apply that middleware or firewall.all
at the top of all routes.
Notifications
Firewall will send a notification as soon as an attack has been detected. Emails entered in notifications.email.to
config must be valid Laravel users in order to send notifications. Check out the Notifications documentation of Laravel for further information.
Changelog
Please see Releases for more information on what has changed recently.
Contributing
Pull requests are more than welcome. You must follow the PSR coding standards.
Security
Please review our security policy on how to report security vulnerabilities.
Credits
- Denis Duliçi
- All Contributors
License
The MIT License (MIT). Please see LICENSE for more information.
All versions of laravel-firewall with dependencies
laravel/framework Version ^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^7.8
jenssegers/agent Version 2.6.*