This package intends to protect your Laravel app from different type of attacks such as XSS, SQLi, RFI, LFI, and a lot more. It will also block repeated attacks and send notification via email and/or slack when attack is detected.
Run the following command:
composer require akaunting/firewallRegister the service provider in config/app.php
Akaunting\Firewall\Provider::class,Publish config file
php artisan vendor:publish --tag=firewallCreate db tables
php artisan migrateYou can change the firewall settings of your app from config/firewall.php file
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.
Route::group(['middleware' => 'firewall.all'], function () {
Route::get('/', 'HomeController@index');
});You can apply each middleware per route. For example, you can allow only whitelisted IPs to access admin:
Route::group(['middleware' => 'firewall.whitelist'], function () {
Route::get('/admin', 'AdminController@index');
});Or you can get notified when anyone NOT in whitelist access admin, by adding it to the inspections config:
Route::group(['middleware' => 'firewall.url'], function () {
Route::get('/admin', 'AdminController@index');
});Available middlewares:
firewall.all
firewall.ip
firewall.lfi
firewall.php
firewall.rfi
firewall.session
firewall.sqli
firewall.url
firewall.whitelist
firewall.xssPlease see Releases for more information what has changed recently.
Pull requests are more than welcome.
If you discover any security related issues, please email security@akaunting.com instead of using the issue tracker.
The MIT License (MIT). Please see LICENSE for more information.