ASL / SNORT / MYSQL HOWTO

Ok, here we go:
First get the pluspack from:
http://asl.duncanthrax.net/pluspack-asl-3.x/pluspack-asl-3.x-1.tar.gz
copy the tarball to the ASL machine
Unpack the tarball in /var/chroot-report
execute pluspack/install.pl
re-login to update your environment

Note: remember that if you want to install programs you should add the --prefix=/pluspack and sometime the configure script might not detect your host type so you must add --host i686-pc-linux-gnu or something like this.

Now that we have the pluspack install lets get the snort tgz from:
http://www.snort.org/dl/snort-1.9.0.tar.gz

copy it to the ASL machine, untar it for example in /root

now we must get the client libs and header files form a machine with mysl already installed you must get all the files in /usr/lib/mysql or something like this depending where you installed mysql and copy them to your asl box to the same location

then copy the include files from /usr/include/mysql to the same location in your asl box

Now lets compile snort, go to /root/wherever extracted snort 
and do ./configure --with-mysql
then make
then make install
and that's it, now all you have to do is install the snort rules, edit snort.conf and launch snort
and install the rc.d init script included in the snort package in the dir contrib.
Parents
  • Zaga,

    I followed your instructions to get SNORT runnning, but have hit a problem.  When i run the ./configure command it ends with the following error:

    code:
    checking for working autoheader... found
    checking for working makeinfo... missing
    checking for gcc... gcc
    checking whether the C compiler (gcc  ) works... no
    configure: error: installation or configuration problem: C compiler cannot create executables.

    Any ideas ?  I'm using the beta 3.380.

    Thanks
    Simon
Reply
  • Zaga,

    I followed your instructions to get SNORT runnning, but have hit a problem.  When i run the ./configure command it ends with the following error:

    code:
    checking for working autoheader... found
    checking for working makeinfo... missing
    checking for gcc... gcc
    checking whether the C compiler (gcc  ) works... no
    configure: error: installation or configuration problem: C compiler cannot create executables.

    Any ideas ?  I'm using the beta 3.380.

    Thanks
    Simon
Children
  • I didn't have to do any of this. I used a precompiled snort binary (it has MySQL support compiled in anyway) and built an init script and it runs fine. The binary was sent to me by zaga. Thank you very much. I sent a tar to zaga with my work a week ago but it was crap. I've improved upon it since then. The arrangement starts during boot and now uses a chroot. I didn't have to use the pluspack and compile anything. When I get a packet filter rule ironed out, I plan on tarring up the whole thing with an install script. I'll send it to who ever wants it.
  • Simon,

    you may need to create a link from "cc" to "gcc" (or the other way round ?).

    Then it should work.
  • Making that link doesn't work... I get this too on 3.380
    code:
    checking whether the C compiler (gcc  ) works... no
    configure: error: installation or configuration problem: C compiler cannot create executables.

  • Jim,

    Thanks very much for the info.  Sounds like you are doing something that maybe Astaro should have done thmeselves.  I would be most interested in getting a copy when you have it ready.  If Astaro aren't going to include SNORT in the next release maybe they could at least create a directory on there ftp server for 3rd party/unsupported work.  I find astaro to be a great product and appreciate very much them letting us home users use it for free.
  • I would like to use SNORT on the ASTARO box but it looks like it is much safer to use the SQL database somewhere else (on a dedicated machine). What code/binaries can I use to just install the snort part needed to capture the packets and send teh data to somewhere else?
    (or is there no harm in installing everything?)

    Thanks
  • Here's what I've got so far.
    A chroot-snort arrangement like chroot-dhcps.
    I run only the snort sensor on the ASL box.
    MySQL runs on a another machine that I have running all the time anyway.
    I've got snort to run in a chroot.
    I'm going to try using the -p mode to keep the interface out of promiscuous mode.
    I have reduced the number of rules that snort.conf includes to cover only those services that pass through my firewall to be sure I don't drop packets.
    My hardware is a IBM PII-400,128MB,6.4GB. I've run snort with out -D (daemon) mode and saw 0.0% packets dropped at ~1500KB/Sec when logging all tcp packets.
    During testing it dropped 50% of packets on a 100MBit card when I used a "alert on any TCP" rule.
    I'm hoping to put together a tar file for those who are interested as soon as possible.
  • First of all, i'd like to appologise everyone for being "away" from all this and not replying to any of your questions, I've been with alot of crap in my head, but now I'm back....
       Sorry for anything
  • I'd like to help with the questions regarding snort on 3.380, but the beta still doesn't install in my computer, anyway any questions you might have, u can e-mail me at zaga1@yahoo.com, JiM I'd like to setup a CVS system so that we can work on this together, is that ok?
  • zaga,
    That would be great. But you'll have to instruct me a little. I'm not sure how a CVS works.
    Currently: I've got snort to start using a simple sleep 30 in the /sbin/init.d/snort file but this is sloppy. My plans are to edit /sbin/init.d/beeps to add a line to start snort after the middleware is restarted. This will remove a packet filter problem. Also, I'm doing some reading on shell scripts to see if I can build a cron job that runs every x seconds to see if snortd has a pid and see if MySQL answers a simple query (schema version perhaps). If not it will queue a notification e-mail like beeps does during a restart. Ideally it should restart snort if snort has no pid and MySQL answers. This might take some doing but I'm willing to try.
    Who's with me! (insert cheering crowd sound here);-)
  • zaga,
    I'll send you the most recent tar I've got. Perhaps it'll work. I've made some changes.