Friday, January 6, 2012

Installing Monit to monitor ntop

For some reason when I started using Network Security Toolkit v2.13.0 (NST) [Fedora 13] for its NTop 4.0.3 installation the service would crash due to apparent "kernel: device eth0 entered promiscuous mode". I am guessing this is due to my virtualization environment an the host hardware/configuration more than NTop application. However, I have heard others on the Ntop mailing list speak of the same error.
So a light bulb went off and I decided to look into service monitoring tools or scripts that would restart a service if it crashed. I found Monit (GNU General Public License v3).

I have had it installed for only a day so far but ntop has stayed alive for me. So far so good. below are the steps I did to install it. Some might find the ntop config for the Services section useful. I am not an expert in Monit so I am sure there may better configurations for ntop then the one I have below. Feel free to share yours so we can see.




1) Install Monit
fedora: # yum monit
debian: # sudo apt-get install monit

2) Next, edit the config file
/etc/monit/monitrc
on Fedora
/etc/monit.conf

--------------------------------
### Monit control file /etc/monit.conf
set daemon 120                                   # Poll in 2-minute intervals
set logfile syslog facility LOG_daemon  # Default facility is LOG_USER
set mailserver mail.foo.bar                    # Default smtp server is localhost
set alert sysadm@foo.bar                    # Alert system admin on any event
set httpd port 2812 address localhost
    allow localhost
    allow admin:monit

## Services
### NTOP on NST 2.13.0 ###
check process ntop with pidfile /var/run/ntop.pid
    start program = "/etc/init.d/ntop start" with timeout 60 seconds
    stop program  = "/etc/init.d/ntop stop"
    if failed port 3000
       with timeout 15 seconds
       then restart
    if 3 restarts within 5 cycles then timeout
    group server
--------------------------------
3) Save the monit.conf file

4) Now check the syntax with:
moint -t
(fix the syntax if you need to)
http://mmonit.com/monit/documentation/monit.html

5) Make sure Ntop is running (ports 3000 and 3001 for my installation); I use
# nmap localhost

6) Start Monit
# /etc/init.d/monit start

7) Login into the web admin http://localhost:2812
with u:admin p:monit as configured in the monit.conf

8) Enable monitoring of ntp by clicking on 'ntop' or navigate to
http://localhost:2812/ntop
on the bottom of the page click the "Enable monitoring" button.
It will take some time but the "Monitoring status" go into "monitored" mode.

Sunday, January 1, 2012

Windows 7 Must Have Free Applications; Essentials

I created something that I needed for making new Windows 7 installs.
Maybe you are new to Windows 7? Just performed a fresh Windows 7 installation and want the apps to secure your PC and make things easier? Here is a list I have come up with that I use on new Windows 7 installs (for personal use). All of these programs are free and I tried to bundle the apps that allowed in their Terms of Use policy.
http://win7e.googlecode.com

Download http://code.google.com/p/win7e/source/browse/trunk/Output/Win7Esetupv1.zip
Video http://youtu.be/7UbGSEOtrp4


If installing QuickLaunch, unlock your
Windows taskbar (right-click uncheck 'Lock the taskbar')
before running the Win7Esetup.exe

SECURITY
-Panda Antivirus [http://download.cloudantivirus.com/]
-McAfee Siteadvisor [https://sadownload.mcafee.com/products/SA/Website/saSetup.exe]

WEBBROWSERS
-Chrome [https://www.google.com/chrome/]
-FireFox 9.0.1 [http://www.mozilla.com/firefox/]
-Opera [http://www.opera.com/browser/]

MISC
-Notepad2 4.2.25 [http://www.flos-freeware.ch/notepad2.html]
-Microsoft Agent 2.0 Add-in: SAPI 4 control panel applet SpchCpl.exe [http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21167]
-Balabolka 2.3.0.515 [http://www.cross-plus-a.com/balabolka.htm]
-Quicklaunch [http://support.microsoft.com/kb/975784]
-KeePass 2.17 [http://keepass.info/download.html]
-7Zip 9.20 [www.7-zip.org/download.html]

MANUAL DOWNLOADS (per license)
-MalwareBytes [http://www.malwarebytes.org/]
-CCleaner [http://www.piriform.com/ccleaner/download/standard]

TECHNICAL
-KiTTY 0.61.1.2 [http://www.9bis.net/kitty/?page=Download]
-Logmein [https://secure.logmein.com/products/free/]
-whoami [http://kewlit.com/whoami/index.html]
-AutoIt [http://www.autoitscript.com/site/autoit/downloads/]

NOTES:
The below programs do not have installers.
So you manually run them from where you
installed Win7 Essentials (Win7E).
The default is C:\Program Files\Win7 Essentials (Win7E)
-KiTTY
-WhoAmI