IPAudit Guide
- This is a relatively simple installation guide to install IPAudit onto an Ubuntu 5.10 server.
- This guide is tested on IPAudit-web-1.0beta9 source code and Ubuntu 5.10 server.
- This guide utilizes IPAudit to monitor a network bridge using eth1 & eth2.
- NOTE - optional packages include: cron-apt, ntp-simple, iftop. These may be left out of the installation, but I recommend them.
- The "system time" versus "packet time" is important for IPAudit to function properly...please use some sort of NTP package.
- Commands shown in a black box must be executed in the Putty terminal window.
- Text shown in the dashed boxes must be entered into the file mentioned in the instructions.
- "Copy" is accomplished by a left-click on the mouse and dragging to highlight text.
- "Paste" is accomplished by a right-click on the mouse. Pasted items appear below the cursor postion.
Install Ubuntu 5.10 using "server" mode and chose appropriate settings to reflect your network requirements during the installation.
This guide uses eth0 as the primary interface with a LAN IP address, while eth1 & eth2 are used for the bridge.
Leave the installation CD in the drive until all packages are installed.
Once the installation of Ubuntu is finished, login as the user created during the install.
Allow remote access via SSH:
sudo apt-get install openssh-server
From a remote workstation use Putty to open an SSH connection to the Ubuntu server. Use a full-screen shell to aviod any line-wrap problems. Login as the user created during the install and issue the following commands to update the sources.list file:
- Remove the comment mark # in the following lines to read as shown below:
- Save the file
Install the necessary packages:
Create a network bridge using eth1 & eth2:
Write an init script to bring up the network bridge during bootup:
- Save the script
Make the script executable and update rc.d:
Now enable suexec for Apache2:
Edit the Apache2 configuration file :
- Add the following lines:
- Save the file
Restart Apache to ensure no errors exist:
Add the ipaudit user and supply a password:
sudo adduser ipaudit
Change user and directory and begin the download (use the appropriate filename as it's updated by the developers):
Untar the newly downloaded package and change into the extracted "compile" directory:
Execute the configure script & run make. Change users and run make install then exit that user:
Edit the ipaudit-web.conf file to read as follows:
- Edit these two lines and use an IP range suitable for your network and the appropriate bridge name:
- Save the file
Create the ipaudit.conf configuration file:
- Add only this line to disable promiscuous mode:
- Save the file
Limit access to the web reports:
- Add these lines to the newly create .htaccess file:
- Save the file
Set the passwords for the above mentioned user:
Exit and restart Apache:
Open a browser to: http://ip-address/~ipaudit
sudo nano /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu breezy universe deb-src http://us.archive.ubuntu.com/ubuntu breezy universe deb http://security.ubuntu.com/ubuntu breezy-security universe deb-src http://security.ubuntu.com/ubuntu breezy-security universe
sudo apt-get update sudo apt-get install build-essential gnuplot apache2 libtime-modules-perl cron-apt sudo apt-get install libapache2-mod-perl2 ntp-simple iftop bridge-utils libpcap0.8-dev
sudo ifconfig eth1 0.0.0.0 sudo ifconfig eth2 0.0.0.0 sudo brctl addbr bridge sudo brctl addif bridge eth1 sudo brctl addif bridge eth2 sudo ifconfig bridge up sudo brctl show
sudo nano /etc/init.d/bridge
#! /bin/sh
# /etc/init.d/bridge
#
# On startup configure a network bridge using eth1 & eth2
case "$1" in
start)
echo " * Configuring network bridge..."
ifconfig eth1 0.0.0.0
ifconfig eth2 0.0.0.0
brctl addbr bridge
brctl addif bridge eth1
brctl addif bridge eth2
ifconfig bridge up
;;
stop)
echo " * Removing network bridge..."
ifconfig bridge down
brctl delif bridge eth1
brctl delif bridge eth2
brctl delbr bridge
;;
*)
echo "Usage: /etc/init.d/bridge {start|stop}"
exit 1
;;
esac
exit 0
sudo chmod 755 /etc/init.d/bridge sudo update-rc.d bridge defaults
cd /etc/apache2/mods-enabled sudo ln -s /etc/apache2/mods-available/suexec.load suexec.load
sudo nano /etc/apache2/apache2.conf
<Directory /home/*/public_html> AllowOverride All Options MultiViews Indexes Includes FollowSymLinks Order allow,deny Allow from all </Directory> <Directory /home/*/public_html/cgi-bin> Options +ExecCGI -Includes -Indexes SetHandler cgi-script </Directory>
sudo apache2ctl restart
su ipaudit cd /home/ipaudit wget http://voxel.dl.sourceforge.net/sourceforge/ipaudit/ipaudit-web-1.0BETA9.tar.gz
tar zxvf ipaudit-web-*.tgz cd ipaudit-web-*/compile
./configure make su (to user created at install) sudo make install sudo make install-cron exit (back to ipaudit user)
$ nano ipaudit-web.conf
LOCALRANGE="192.168.1" INTERFACE=bridge
cd /home/ipaudit nano ipaudit.conf
promisc off
cd /home/ipaudit/public_html/cgi-bin nano .htaccess
AuthType Basic AuthName IPAUDIT AuthUserFile /home/ipaudit/public_html/cgi-bin/passwd require user (user created at install - or other users)
htpasswd -c passwd (user created at install) htpasswd passwd (- or other users)
su (to user created at install) sudo apache2ctl restart exit
At this point, you might want to restart the machine to ensure everything is working correctly. Links:
Public forum for help