NIPAP is an open source and powerful IP address management system built to efficiently handle large amounts of IP addresses in small to large organizations. NIPAP comes with a sleek and intuitive web based management dashboard for Network engineers and SysAdmins to use. The web interface also features a powerful Google-style search, but a CLI client is also provided for terminal centric users. This short tutorial will show you how to install Neat IP Address Planner(NIPAP) on Ubuntu 20.04/18.04 & Debian 10.

Features of Neat IP Address Planner

Some of the cool features of Neat IP Address Planner include:

  • Very fast and scalable to hundreds of thousands of prefixes
  • A stylish and intuitive web interface
  • Native support for IPv6 (full feature parity with IPv4)
  • CLI for the hardcore user
  • Native VRF support, allowing overlapping prefixes in different VRFs
  • Support for documenting individual hosts
  • Very powerful search function (featuring regexp)
  • Statistics over used and free addresses
  • Integrated audit log
  • IP address request system for automatically assigning suitable prefixes
  • XML-RPC middleware, allowing easy integration with other applications or writing
  • Flexible authentication using SQLite and/or LDAP

Client libraries for Python, Java and Oracle are available for those that want to integrate with other systems programmatically.

Install Neat IP Address Planner on Ubuntu / Debian

The NIPAP pre-built packages are officially provided for Debian and Debian derivatives. Here are the how to steps you need to follow.

Step 1: Add NIPAP repo

Start by adding the NIPAP repository to your Ubuntu/Debian package sources:

sudo apt update
sudo apt -y install gnupg2
echo "deb stable main extra" | sudo tee /etc/apt/sources.list.d/nipap.list

Add the NIPAP public key for proper authentication of the packages provided:

wget -O - | sudo apt-key add -

Once the repository is added, update your package lists.

sudo apt -y update

Step 2: Install PostgreSQL and ip4r extension

Let’s now install the PostgreSQL, the contrib package and the ip4r extension:

Ubuntu 20.04:

sudo apt update
sudo apt install postgresql-contrib postgresql-12-ip4r

Ubuntu 18.04:

sudo apt update
sudo apt install postgresql-contrib postgresql-10-ip4r

Debian 10:

sudo apt update
sudo apt install postgresql-contrib postgresql-11-ip4r

Step 3: Install Neat IP Address Planner (NIPAP) packages on Ubuntu / Debian

The NIPAP packages installable are:

  • nipapd – Neat IP Address Planner XML-RPC daemon
  • nipap-common – A library with common stuff needed by all the other components
  • nipap-cli – A CLI client for NIPAP
  • nipap-www – A web frontend for NIPAP
  • python-pynipap – Python module for accessing NIPAP
  • python3-pynipap – Python 3 module for accessing NIPAP

Install the standard packages with the command:

sudo apt install nipapd nipap-cli nipap-www python-pynipap

Select to:

  • Database server is localhost
  • Automatically set up the database for nipapd
  • Automatically start the services

Also agree to create a user for accessing the web interface.

Automatically create user for web interface? [yes/no] yes

Step 4: Configure NIPAP Web UI

The web interface needs its own user account to authenticate towards the backend and it should be a trusted account. Create it with the following:

sudo nipap-passwd add --username $user --password $password --name "My User Account"

Command output is like this:

Added user nipap-www to database /etc/nipap/local_auth.db

Configure the web UI to use this account by configuring the xmlrpc_uri variable:

$ sudo vim /etc/nipap/nipap.conf
xmlrpc_uri = http://nipap-www@local:StrongPassw3rd@

The configuration syntax is:

xmlrpc_uri = http://{{NIPAPD_USERNAME}}@local:{{NIPAPD_PASSWORD}}@{{NIPAPD_HOST}}:{{NIPAPD_PORT}}

Restart nipapd service.

 sudo systemctl restart nipapd.service

Other user accounts can be added using same method:

nipap-passwd add --username myuser --password mypassword --name "my user"

Serving the web UI with Apache httpd with mod_wsgi

Begin by installing Apache httpd with mod_wsgi:

sudo apt install apache2 libapache2-mod-wsgi

Then, add a new virtual host:

$ sudo vim /etc/apache2/sites-enabled/nipap.conf

Modify / paste below data:

<VirtualHost *:80>
      DocumentRoot /var/cache/nipap-www/
      ServerAdmin [email protected]
      WSGIScriptAlias / /etc/nipap/www/nipap-www.wsgi

<Directory /etc/nipap/www/>
    Require all granted

<Directory /var/cache/nipap-www/>
    Require all granted

ErrorLog ${APACHE_LOG_DIR}/nipap_error.log
CustomLog ${APACHE_LOG_DIR}/nipap_access.log combined

Enable wsgi mod in Apache

sudo a2enmod wsgi

Validate your Apache configurations:

$ sudo apachectl configtest
Syntax OK

The web server needs to be able to write to its cache, alter the permissions :

sudo chown -R www-data:www-data /var/cache/nipap-www
sudo chmod -R u=rwX /var/cache/nipap-www

Now, restart Apache httpd server:

sudo systemctl restart apache2

The NIPAP web UI should be up and running and accessible on configured domain

install nipap ubuntu debian 01

Login with the credentials provided earlier.

install nipap ubuntu debian 02

Network prefixes can be added from CLI or web dashboard.

Configuring CLI

Add CLI user:

sudo nipap-passwd add --username nipap-cli --password StrongPassword --name "My CLI user"

Then create your .nipaprc with username and password created above.

$ vim ~/.nipaprc
hostname = localhost
port     = 1337
username = *nipap-cli*
password = *StrongPassword*
default_vrf_rt = none
default_list_vrf_rt = all

Set file permissions:

chmod 0600 ~/.nipaprc

Try adding test prefix to confirm it works.

$ sudo nipap address add prefix type assignment description "Test prefix"
Network added to VRF 'default' [RT: -]: Test prefix

Confirm on UI Dashboard.

install nipap ubuntu debian 03

Check the NIPAP Documentation page for more details.

Similar guides:

Install and Configure phpIPAM on Ubuntu / Debian Linux

How to Install NetBox on Ubuntu 18.04 LTS

How to install RackTables on Ubuntu

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here