webtoppings / ipwhitelisting
Restrict access to website by whitelisting ip addresses
Installs: 1 255
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:laravel-package
Requires
- laravel/framework: >=5.5
- laravelcollective/html: >=5.1
This package is auto-updated.
Last update: 2025-04-20 23:18:02 UTC
README
Simple Laravel Package to increase the security of the website by permitting access for users having whitelisted IP Addresses.
In this package, you can add IP Addresses into whitelist which you want to allow access to your site. All other users coming from IPs which are not in whitelist will automatically blocked and won't access site.
Installation
via composer
composer require webtoppings/ipwhitelisting
Supports
Laravel 5.5 or higher
Configure
Run below commands to publish views and migrate tables
php artisan vendor:publish php artisan migrate
Usage
Manage Whitelist
Add below route to your administrator route group to manage whitelist IP Addresses
Route::resource('/ipwhitelisting', '\WebToppings\IPWhitelisting\IPWhitelistingController');
Restrict Access
Use middleware to restrict IP Addresses
'IPBlocking' => \WebToppings\IPWhitelisting\Middlewares\IPBlocking::class,
Add IPBlocking
middleware to route group for which you want to restrict access.
Users will be redirect to "403 | Forbidden" page if their IP won't exist on whitelist.