Using Ubuntu 7.10 for Intrusion Detection has an excellent article on how to setup your own Intrusion Detection System.

How to install and configure Snort (an intrusion detection system (IDS)) from source, BASE (Basic Analysis and Security Engine), MySQL, and Apache2 on Ubuntu 7.10 (Gutsy Gibbon).

Snort will assist you in monitoring your network and alert you about possible threats.
Snort will output its log files to a MySQL database which BASE will use to display a graphical interface in a web browser.

Read the Guide Here: Intrusion Detection: Snort, Base, MySQL, And Apache2 On Ubuntu 7.10