Difference between revisions of "Netband Project - Ubuntu server"

From Teknologisk videncenter
Jump to: navigation, search
m (MRTG)
(Make apache run perl script)
Line 62: Line 62:
 
</pre>
 
</pre>
 
===Make apache run perl script===
 
===Make apache run perl script===
 +
This will install perl module in apache
 
<pre>
 
<pre>
$aptitude install libapache2-mod-perl2
+
$ aptitude install libapache2-mod-perl2
 +
</pre>
 +
 
 +
This addition in /etc/apache2/apache2.conf configuration file will allow cgi and perl script to be run in every directory, not just cgi-bin/.
 +
<pre>
 +
AddHandler cgi-script .cgi .pl
 +
 
 +
<Files ~ "\.pl$">
 +
Options +ExecCGI
 +
</Files>
 +
<Files ~ "\.cgi$">
 +
Options +ExecCGI
 +
</Files>
 
</pre>
 
</pre>
  

Revision as of 14:12, 20 April 2009

<accesscontrol>NetBand</accesscontrol> This page is part of the Netband Project

OS version:

Applications:

FreeNac

  • Dynamic Virtual LAN management and assignment per end-device
  • LAN Access control (authentication, authorization)

MRTG

  • Network monitoring

1. Install the MRTG package

$ sudo aptitude install mrtg

2. Create the initial config file and poll a device

sudo cfgmaker  --output /home/mrtg/mrtg.cfg ciscodisco@10.0.0.21
# Created by 
# /usr/bin/cfgmaker --output /home/mrtg/10.0.0.21.cfg ciscodisco@10.0.0.21


### Global Config Options

#  for UNIX
# WorkDir: /home/http/mrtg

#  for Debian
WorkDir: /var/www/mrtg

#  or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

#  to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits

EnableIPv6: no

Include: /home/mrtg/10.0.0.21

For more information see cfgmaker

3. Either create additional cfg files for other devices, and copy/paste the relevant parts to the mrtg.cfg file or add them manually

4. Start MRTG

$ sudo env LANG=C /usr/bin/mrtg /home/mrtg/mrtg.cfg

5. Make MRTG run every 5 minutes

$sudo crontab  -e

#        m      h       dom     mon     dow     command
         */5      *       *       *       *       env LANG=C /usr/bin/mrtg /home/mrtg/mrtg.cfg  --logging /var/log/mrtg/mrtg.log

Make apache run perl script

This will install perl module in apache

$ aptitude install libapache2-mod-perl2

This addition in /etc/apache2/apache2.conf configuration file will allow cgi and perl script to be run in every directory, not just cgi-bin/.

AddHandler cgi-script .cgi .pl

<Files ~ "\.pl$">
Options +ExecCGI
</Files>
<Files ~ "\.cgi$">
Options +ExecCGI
</Files>

External links

FreeNac
MRTG
RDDTool