Skip to main content

IP authentication restrictions

This configuration is for securing an app by defining which IP's can access it.

Content

Configuration

Configuration of IP address restrictions is in config/auth.php. Array of this configuration is ip_address_restrictions

Any Authenticable class can be restricted by IP address.

IP Ranges

IP ranges configuration is in each defined class in ip_address_restrictions under ips array.

Ranges must be in format:

    'ips' => [
'ranges' => [
['from' => '192.168.0.1', 'to' => '192.168.0.255']
]
]

In this example, all addresses between 192.168.0.1 and 192.168.0.255 are allowed.

Specific IPs

Specific IPs configuration is in each defined class in ip_address_restrictions under ips array.

Specific ips must be in format:

    'ips' => [
'specific' => [
'192.168.0.17',
'192.168.0.19',
]
]

In this example, only these IP addresses are allowed for specific class.