Installation
Requirements
NDMon is written in C, which is why you need a C compiler. During the implementation, we used GCC version 4.1. Besides the classic system libraries, other additional libraries are required:
- libxml2
- libpcap
- libcrypto for countermeasures plugin
- perl and its module libwww if you want to use the Mac Address Resolution plugin.
Make sure you have these libraries and the assiciated headers installed.
With the Source Code
Build and Install
First of all, if you are experiencing troubles with the configure script, do not hesitate to regenerate it with the command:
# autoconf |
To compile and install NDPMon, simply use the command:
# ./configure && make && make install |
To enable the plugins, you have to specify it when executing the configure script with the option --enable-PLUGIN. By default, they are not activated. The plugins available are:
- mac-resolv: MAC Manufacturer Resolution
- countermeasures: countermeasrues NDP messages to neutralize attacks, known working under Linux only at the moment
- debug: enable the -g flag during the building for debugging issues
The configure script automatically check the environment variable OSTYPE to determine the OS on which you are building NDPMon and generates the according Makefile.
All installation paths are derived from the --prefix from the configure script. By default, it uses the path /usr/local, but feel free to modify it as you wish. Please note that paths to the configuration and cache XML and DTD files are automatically derived from the prefix variable in the files ndpmon_defs.h, config_ndpmon.xml and neighbor_list.xml. If you modify manually the variables sysconfdir, datadir..., remember to modify these files before compiling NDPMon to avoid troubles at execution (File not found errors...).
The configure script is also responsible of modifying the paths to the configuration file and the neighbor cache:
- --sysconfdir to modify the directory where to put the configuration file. Note that modifying the --prefix also modifies this path, as the sysconfdir stands for $(prefix)/etc. If you change the prefix, it is recommended to ajust the sysconfdir.
- --with-var-datadir to modify the directory containing the neighbor cache. By default, it is derived from prefix: if the prefix is /usr/local, this directory is /var/local, if prefix is /usr, it is /var, otherwise it is recommended to define its value.
Uninstallation
To uninstall it, use:
# make uninstall |
Note that the install and uninstall targets require root privileges.
FreeBSD Ports
NDPMon is available under FreeBSD via the ports system. The package is maintained by Janos Mohacsi. To install it, we recommend you to use the portsnap system. The procedure to follow is simple:
# portsnap fetch Download a snapshot of the available ports # portsnap extract Extracts this copy into /usr/ports # portsnap fetch update Update the list # cd /usr/ports/net-mgmt/ndpmon/ Go to the subdirectory of ndpmon # make && make install Build and install the port |
Running NDPMon
Make sure you edited the configuration file before running the tool.
To run NDPMon under Linux, use as root:
# /etc/init.d/ndpmon start |
To stop NDPMon, use as root:
# /etc/init.d/ndpmon stop |
Under other OS, the tool must be run manually with root priviledges:
# ndpmon |
Do not hesitate to take a look at the help:
# ndpmon -h |
