1. Download
You can download the RPM source or RPM from rpmfind.net.
wget ftp://fr2.rpmfind.net/linux/fedora/
extras/3/SRPMS/tripwire-2.3.1-21.src.rpm
wget ftp://fr2.rpmfind.net/linux/fedora/
extras/3/i386/tripwire-2.3.1-21.i386.rpm
These RPMs above have a small problem. It doesn't include the twinstall.sh, which is convenient for tripwire installation.
You can find the twinstall.sh from previous version. For example
wget http://download.fedora.us/fedora/fedora/
1/i386/SRPMS.testing/tripwire-2.3.1-18.fdr.3.1.src.rpm
2. Compilation (if you download the source RPM)
rpmbuild --rebuild tripwire-2.3.1-21.src.rpm
rpmbuild --rebuild tripwire-2.3.1-18.fdr.3.1.src.rpm
3. Installation
3.1 Install old RPM to get twinstall.sh
If you just compiled the source RPM, run
rpm -Uvh /usr/src/redhat/RPMS/i386/tripwire-2.3.1-18.fdr.3.1.i386.rpm
Or
rpm -Uvh tripwire-2.3.1-18.fdr.3.1.i386.rpm
Now you need copy /etc/tripwire/twinstall.sh to somewhere.
cp /etc/tripwire/twinstall.sh ~
3.2 Install RPM for Fedora Core 3
The above installation is just used to save a copy of twinstall.sh.
Now we install tripwire RPM for Fedora Core 3. If you just compiled the source RPM, run
rpm -Uvh /usr/src/redhat/RPMS/i386/tripwire-2.3.1-21.i386.rpm
Or
rpm -Uvh tripwire-2.3.1-21.i386.rpm
cp ~/twinstall.sh /etc/tripwire
4. Configuration
4.1 Pre-Configuation
The configuration files are located at /etc/tripwire. Before Fedora Core 3, you need modify /etc/tripwire/twcfg.txt HOSTNAME line to reflect the machine's hostname. The RPM on Fedora Core 3 configures this line automatically.
Keep twcfg.txt and twpol.txt secure.
Now run ./twinstall.sh and follow the prompt.
4.2 Database Initialization
Tripwire will generate a database of current system snapshot as a base. The database is saved at /var/lib.
/usr/sbin/tripwire --init.
4.3 Check and Reports
To check
/usr/sbin/tripwire --check
To review reports
/usr/sbin/twprint -m r --twrfile /var/lib/tripwire/report/youmachinehostname-date-time.twr
To update reports
/usr/sbin/tripwire --update --twrfile /var/lib/tripwire/report/youmachinehostname-date-time.twr
To update database
/usr/sbin/tripwire --update-policy /etc/tripwire/twpol.txt
4.4 Cron Job
RPM installs cron job for tripwire at /etc/cron.daily
# cat tripwire-check
#!/bin/sh
HOST_NAME=`uname -n`
if [ ! -e /var/lib/tripwire/${HOST_NAME}.twd ] ; then
echo "**** Error: Tripwire database for ${HOST_NAME} not found. ****"
echo "**** Run "/etc/tripwire/twinstall.sh" and/or "tripwire --init". ****"
else
test -f /etc/tripwire/tw.cfg && /usr/sbin/tripwire --check
fi
Comments
Post a Comment