Automation Ninja's Dojo

IP address management with PHPipam and docker

Recently I have came across need of having IP address management tool. So I have looked at several options and decided that the best one was phpIPAM for 2 main reasons:

  • API
  • Overlapping subnets

Also the look and feel gives me positive feeling about the product and the fact there is a lot of development being done on github.

phpipam_mainconsole

Using docker to run the application

So I have decided to prepare fully operational docker solution to support this application. Learned on previous mistakes github repository to which I will be referring you to have been accordingly tagged so if any changes occur – you will always be able to follow this post directions.

 

RafPe_docker-phpipam__phpIPam_-_IP_address_management_in_Docker_container_?

 

I would like to avoid duplication of information. Therefore I will just highlight one of possible installation options as rest is mentioned on docker hub and on github.

 

We start of with cloning our repository

 

Once thats done  we can checkout specific tag ( tag associated with content of this post )

 

and then we have all components needed to run the last command

which in return gives the following output

phpipam_compose_running

 

And off you go ahead with testing. Here couple of points are worth of mentioning:

  • For production run use database backend which has persistent storage – as in this form DB has no persistent storage
  • Consider using SSL

 

Application has a lot of PROs and in my opinion is really worth of looking into if your management tools needs some automation!

 

3 thoughts on “IP address management with PHPipam and docker

  1. Hi, for “Hosts check” and for “Discover new hosts” we need cron installed in the docker? Something like this?

    apt-get install cron
    vi /etc/crontab
    # update host statuses exery 15 minutes
    */15 * * * * /usr/local/bin/php /var/www/html/functions/scripts/pingCheck.php
    */15 * * * * /usr/local/bin/php /var/www/html/functions/scripts/discoveryCheck.php

    Link
    https://phpipam.net/news/automatic-host-availability-check/

    Is there any other form to check hosts in the docker? Thanks!!

    1. Mark,

      Thats a good question which can be directed to author of phpIPAM 🙂 Let me know how did it go with cron in docker.

      Regards
      Rafal

  2. Thanks for writing this awesome article. I’m a long time reader
    but I’ve never been compelled to leave a comment.
    I saved your blog in my rss feed and shared it on my Twitter.
    I will come back for sure to check your future posts!

Leave a Reply to rafpe Cancel reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: