A few days ago I discovered a nifty little web app called phpIPAM (short for PHP IP Address Management). The name pretty much gives it away, but from the developers’ own words:

Its goal is to provide light, modern and useful IP address management.

And honestly, it manages to do that extremely well. It has a bunch of different features, but one of my favourite ones is the visual representation of a subnet:

phpipam_visual_subnet_display

 

I was about to create the typical Excel spreadsheet with all the IP information since the number of servers in my home network has now reached a point where I tend to forget some of the IP addresses I am using, but then I found this web app and I decided to give it a try, but I think I will keep using it for a while.

Also, installing it is super quick and easy. I will go ahead and assume that you already have the following:

  • Apache (2.2 or 2.4)
  • PHP5
  • MySQL

Basically, a full LAMP stack on your machine.

Install phpIPAM

  1. Install the necessary PHP extensions:
    sudo apt-get install php5-gmp php-pear
  2. Enable mod_rewrite in Apache:
    sudo a2enmod rewrite
  3. Restart Apache to enable this change:
    sudo service apache2 restart
  4. Change to your web server’s root directory (by default, /var/www):
    cd /var/www
  5. Create a directory for phpIPAM:
    sudo mkdir phpipam
  6. Download phpIPAM to this directory:
    sudo wget http://sourceforge.net/projects/phpipam/files/phpipam-1.1.tar
  7. Unpack it:
    tar -xvf phpipam-1.1.tar
  8. Edit config.php:
    1. Enter your DB details
      $db['host'] = "localhost";
      $db['user'] = "your_db_user";
      $db['pass'] = "your_db_user_password";
      $db['name'] = "phpipam";
    2. Set the base folder to phpipam:
      define('BASE', "/phpipam/");
  9. Edit .htaccess to set the base folder here as well:
    RewriteBase /phpipam/
  10. Remove the tar file:
    rm phpipam-1.1.tar
  11. Access webserver_ip/phpipam and complete the installation procedure (essentially just creating the database). You can let the installer itself take care of the creation of the database though, if you just enter the DB username and password.