phpIPAM-agent Docker image
Find a file
2022-01-08 20:56:25 -06:00
.gitignore don't sync my docker-compose file 2022-01-05 15:22:55 -06:00
build.sh update docker build repo tag 2022-01-05 15:12:24 -06:00
Dockerfile update all packages during image build 2022-01-08 20:56:25 -06:00
entrypoint.sh default to 15-minute scan interval 2022-01-06 12:44:17 -06:00
example-docker-compose.yml add PHPIPAM_RESET_AUTODISCOVER and PHPIPAM_REMOVE_DHCP parameters 2022-01-06 12:22:50 -06:00
LICENSE Initial commit 2018-09-07 01:43:07 +02:00
php.ini Initial commit 2018-09-07 01:43:07 +02:00
README.md Update README.md 2020-10-30 16:12:17 +01:00

phpipam-agent

phpIPAM is an open-source web IP address management application. Its goal is to provide light and simple IP address management application.

phpIPAM is developed and maintained by Miha Petkovsek, released under the GPL v3 license, project source is here

Learn more on phpIPAM homepage

This container can be used as a discovery scan agent.

How to use this Docker image

Setup PHPIPAM

  • Configure a remote agent (Administration > scan agents), get the key. config_agent

  • For each subnet, enable scan & configure the remote agent by selecting a remote. config_subnet

Scheduled scans

For scheduled scans these commands are added to the cron script.

1/15 * * * * /usr/local/bin/php /opt/phpipam-agent/index.php update
1/15 * * * * /usr/local/bin/php /opt/phpipam-agent/index.php discover

Run this container

version: '2'
services:
    phpipam-agent:
        container_name: phpipam-agent
        restart: unless-stopped
        image: mc303/phpipam-agent:latest
        environment:
          - MYSQL_ENV_MYSQL_HOST=10.10.1.10
          - MYSQL_ENV_MYSQL_DATABASE=phpipam
          - MYSQL_ENV_MYSQL_USER=phpipam
          - MYSQL_ENV_MYSQL_PASSWORD=phpipam
          - MYSQL_ENV_MYSQL_PORT=3307
          - PHPIPAM_AGENT_KEY=abcder1223456xczxcsad
          - CRON_SCHEDULE=1/15 * * * *
          - TZ=Europe/Amsterdam    
        ports:
          - "3306:3306"

Now, the update/discovery scans will be performed every X minute defined by CRON_SCHEDULE environment variable.

The logs are available on stdout/stderr (allowing to use docker logs).

Acknowledgements

Based on pierrecdn/phpipam-agent, published on docker hub.

phpipam-agent