Tripwire on FreeBSD 6.2

Prerequisites:

FreeBSD (Base + Autoconf, Automake, Bash and GCC)

Tripwire on FreeBSD

# Tripwire v2.4.0.1 http://sourceforge.net/projects/tripwire

# Install Tripwire
cd /usr/ports/security/tripwire
make install
# Answer questions and set various passwords (remember these passwords) when prompted.


# Setup email addresses for notification as described here:
# http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-tripwire-update-policy.html#S2-TRIPWIRE-EMAIL
mv /usr/local/etc/tripwire/twpol.txt /usr/local/etc/tripwire/twpol.txt.original
vi /usr/local/etc/tripwire/twpol.txt
# Be sure to replace every instance of YourEmail@YourDomain.com with your actual email address!
# Make sure you edit the "HOSTNAME=" variable! (Find out your hostname from a prompt by typing: hostname )

# Update your site policy
/usr/local/sbin/twadmin --create-polfile -S /usr/local/etc/tripwire/site.key /usr/local/etc/tripwire/twpol.txt

# Create a new database
/usr/local/sbin/tripwire --init

# Make sure tripwire runs daily
cp /usr/ports/security/tripwire/work/tripwire-2.4.0.1/contrib/tripwire-check /etc/periodic/daily/998.tripwire-check
chmod +x /etc/periodic/daily/998.tripwire-check
# Edit the default script and fix two lines!
vi /etc/periodic/daily/998.tripwire-check

# Run tripwire manually as desired (try it at least once now)
/usr/local/sbin/tripwire --check

# Tripwire Reports (*.twr) are kept here: /var/db/tripwire/report/
# Get a list of your reports
ls /var/db/tripwire/report
# View a report
/usr/local/sbin/twprint -m r --twrfile /var/db/tripwire/report/<name>.twr

# NOTE: After you see your first report, you will want to cleanup tripwire's configuration
#        to stop checking for things that don't exist, this means deleting lines in twpol.txt

vi /usr/local/etc/tripwire/twpol.txt
# You will then need to update your policy file and create a new database again
/usr/local/sbin/twadmin --create-polfile -S /usr/local/etc/tripwire/site.key /usr/local/etc/tripwire/twpol.txt
/usr/local/sbin/tripwire --init
# Run tripwire manually again and view the new report to verify your policy is error free
/usr/local/sbin/tripwire --check

# Clean up the install directory
cd /usr/ports/security/tripwire
make clean

 

# Guide: http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/ch-tripwire.html