BSD-based fw/router: ZFS on SSD RAID10 efficiency

Code:
tripwire -m c
Parsing policy file: /usr/local/etc/tripwire/tw.pol
*** Processing Unix File System ***
Performing integrity check...
Wrote report file: /var/db/tripwire/report/x9srl-20230511-062749.twr


Open Source Tripwire(R) 2.4.3.7 Integrity Check Report

Report generated by:          root
Report created on:            Thu May 11 06:27:49 2023
Database last updated on:     Never

===============================================================================
Report Summary:
===============================================================================

Host name:                    x9srl
Host IP address:              192.168.1.1
Host ID:                      None
Policy file used:             /usr/local/etc/tripwire/tw.pol
Configuration file used:      /usr/local/etc/tripwire/tw.cfg
Database file used:           /var/db/tripwire/x9srl.twd
Command line used:            tripwire -m c

===============================================================================
Rule Summary:
===============================================================================

-------------------------------------------------------------------------------
  Section: Unix File System
-------------------------------------------------------------------------------

  Rule Name                       Severity Level    Added    Removed  Modified
  ---------                       --------------    -----    -------  --------
  Tripwire config                 100               0        0        0       
* megarouter config               100               0        0        6       
* Root config files               100               0        0        3       

Total objects scanned:  40
Total violations found:  9

===============================================================================
Object Summary:
===============================================================================

[SNIP]
 
These are the files I consider indicators something is wrong.
Notice above I have 3/6 files that were tripped. That was just me updating.

Code:
## twpolicy.txt
[SNIP]
(rulename = "Root config files", severity = 100 )
{
        /root                           -> $(SEC_CRIT);
        /root/.cshrc                    -> $(SEC_CONFIG);
        /root/.login                    -> $(SEC_CONFIG);
        /root/.history                  -> $(SEC_CONFIG);
        /root/.profile                  -> $(SEC_CONFIG);
        /root/.ssh/known_hosts          -> $(SEC_CONFIG);
}
#
(rulename = "megarouter config", severity = 100)
{
        /etc/rc.conf                                    -> $(CheckAll);
        /boot/loader.conf                               -> $(CheckAll);
        /etc/sysctl.conf                                -> $(CheckAll);
        /etc/pf.conf                                    -> $(CheckAll);
        /usr/local/etc/dnsmasq.conf                     -> $(CheckAll);
        /etc/ssh/sshd_config                            -> $(CheckAll);
        /etc/ssh/ssh_config                             -> $(CheckAll);
        /etc/fstab                                      -> $(CheckAll);
        /etc/ttys                                       -> $(CheckAll);
        /etc/resolv.conf                                -> $(CheckAll);
        /usr/local/etc/dnsmasq.d/dnsmasq.blacklist.txt  -> $(CheckAll);
}
[SNIP]
 
These are the files I consider indicators something is wrong.
Notice above I have 3/6 files that were tripped. That was just me updating.

Code:
## twpolicy.txt
[SNIP]
(rulename = "Root config files", severity = 100 )
{
        /root                           -> $(SEC_CRIT);
        /root/.cshrc                    -> $(SEC_CONFIG);
        /root/.login                    -> $(SEC_CONFIG);
        /root/.history                  -> $(SEC_CONFIG);
        /root/.profile                  -> $(SEC_CONFIG);
        /root/.ssh/known_hosts          -> $(SEC_CONFIG);
}
#
(rulename = "megarouter config", severity = 100)
{
        /etc/rc.conf                                    -> $(CheckAll);
        /boot/loader.conf                               -> $(CheckAll);
        /etc/sysctl.conf                                -> $(CheckAll);
        /etc/pf.conf                                    -> $(CheckAll);
        /usr/local/etc/dnsmasq.conf                     -> $(CheckAll);
        /etc/ssh/sshd_config                            -> $(CheckAll);
        /etc/ssh/ssh_config                             -> $(CheckAll);
        /etc/fstab                                      -> $(CheckAll);
        /etc/ttys                                       -> $(CheckAll);
        /etc/resolv.conf                                -> $(CheckAll);
        /usr/local/etc/dnsmasq.d/dnsmasq.blacklist.txt  -> $(CheckAll);
}
[SNIP]
What about replaced binaries? time changes? Modifications to (master.)passwd/groups? Changes to libc? Typically, most of the filesystem should be watched IMO.
 
So you want the file system containing the logs isolated from all other activity. With USF, this means a separate file system. With ZFS this means a separate file system in a separate (not zroot) pool -- because all file systems in a ZFS pool share a common pool of spare available disk space -- and filling one file system fills them all.
Again thank You for detailed explaining.

How to realize this (I mean creating the 2 file systems in case UFS, and separate file system on a separate pool (not zroot)) in automatic mode in /etc/installerconfig script for bsdinstall utility?
(Code example)

Thank You so much!
 
Back
Top