Phpipam IP address management: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=After clean install things to do=
Change the login timeout (see below)
In Administration -> IP Related management -> Nameservers
Administration -> IP Related management -> Sections -> Create a new section
Administration -> IP Related management -> Filter IP fields
Device Management -> Locations -> Add locations
Administration -> IP Related management -> Subnets -> Add subnet (make sure that scan agent is localhost, hosts check, discover new hosts and resolve dns are On - also see below for discovery)
In the subnet, there is a tiny icon for Scan Subnet for New Hosts under Actions. Click that and wait for ping.
=Bulk deletion op IPs in subnet=
=Bulk deletion op IPs in subnet=
[https://github.com/phpipam/phpipam/issues/1038 from here]
[https://github.com/phpipam/phpipam/issues/1038 from here]

Revision as of 20:33, 4 July 2019

After clean install things to do

Change the login timeout (see below)

In Administration -> IP Related management -> Nameservers

Administration -> IP Related management -> Sections -> Create a new section

Administration -> IP Related management -> Filter IP fields

Device Management -> Locations -> Add locations

Administration -> IP Related management -> Subnets -> Add subnet (make sure that scan agent is localhost, hosts check, discover new hosts and resolve dns are On - also see below for discovery)

In the subnet, there is a tiny icon for Scan Subnet for New Hosts under Actions. Click that and wait for ping.

Bulk deletion op IPs in subnet

from here

Bulk IP Deleting is sort of a hidden function. Just enter the range you would like to delete when you are deleting a single IP address

To change the login timeout (which is set to short!)

in php.ini

session.use_cookies = 1
session.cookie_lifetime = 86400
session.gc_probability = 1
session.gc_divisor     = 1000
session.gc_maxlifetime = 86400

Also set inactivity timeout in phpipam administration to less or equal to what is in session.gc_maxlifetime.

To set automatic host discovery and availability check

from here Firstly, pcntl support for php cli is advised so phpipam can do parallel icmp checks, this greatly reduces time required for checking status. You can check if your installation is ok with following command:

php -m | grep pcntl


1.) Configure the parameters for pinging

Set the time parameters for status under Administration > IPAM settings (Ping status intervals), phpipam will set host as down/up based on this values. Also, set the proper icmp parameters and paths.

2.) Select which networks to check

subnet scan selection Now you have to select which subnets should scan for statuses for configured hosts.

Go to edit subnet and check “Check hosts status”. This will tell the cron script to check the status of hosts inside this subnet. “Discover new hosts” will try to find new hosts for this subnet and will automatically add them to phpipam database.

3.) Add cron script

I suggest checking it per 15 minutes:

# update host statuses exery 15 minutes
*/15 * * * * /usr/local/bin/php /usr/local/www/phpipam/functions/scripts/pingCheck.php
*/15 * * * * /usr/local/bin/php /usr/local/www/phpipam/functions/scripts/discoveryCheck.php

Change the paths according to your installation of course 🙂

That should be it. I would advise to run the script manually for the first time to see if any errors are present.