# # -watcher.conf - # # Model the Watcher world ... and 'draw' a map # Only allowed for the startup process 'watcher' # All other components have to source watchermap.conf # # Watcher revsion # PRODUCT=WatcherV1 #REVISION=1.4beta #REVISION=1.4RC1 #REVISION=1.4RC2 #REVISION=1.4Pre REVISION=1.4Prod # Ports that modules are related to # Mainly used in 'Watcher-Report' WATCHER_PORTS="22 25 80 110 143 443 465 587 993 995" WATCHER_CHAIN="WATCHCNT" # Specify the modules TO BE STARTED # # Note: If 'WatchMX' is used its companion process 'WatchMB' # is automatically started by WatchMX # No need to include 'WatchMB' here # # Example: # MODULES="WatchLG WatchMX" #----------------------------------------- MODULES="WatchLG WatchMX WatchWB GeoTrack" ############################################## # RAMdisk ############################################## # Set 'USE_RAMDISK' to a _NON-EMPTY_STRING_ # to use it. # Leave it blank to disable it. # USE_RAMDISK=UhhYeah # RAMdisk device name RDNAME=Watcher-ramdisk # Configure RAM disk size in bytes; e.g. '20m' for 20 mega-bytes # size can have multipliers for: # - {k,K} (kilobytes), # - {m,M} (megabytes), # - {g,G} (gigabytes) RDSIZE=25m # Copy some frequently used tools to the RAM disk at $POOL/bin for speed-up USE_RDCOPIES=UhhYeah # List of RAMDisk copies to be used in PATH RDCOPIES='awk grep date ipset sqlite3 logger dig' ################################################################# # Watcher tools .. ################################################################# # Path where common tools are linked by the master and modules # Should be included in the PATH variable for 'root' TOOLS_LINK=/usr/local/sbin TOOLS=' Attackrate Blacklist Check Dynload Freeme Huntip Jump Looprate Masterpath Module MyFritzBox MyRouter Procrate Refresh Restart Rules SetDebug Sqlrate SqlTrace TidyDB Totalnodes Trace Untreated Watcher-Report Whitelist ' # Base directory for the FIFOs (named pipes) # # -------------------------------------------------------------- # # NOTE: System loggers (rsyslog & syslog-ng as well) are # # _not_ permitted to write outside the standard log # # directory '/var/log' by SElinux rules. # # There is no other choice here to place them in # # /var/log/... # # -------------------------------------------------------------- FIFO_BASE="/var/log/.pipes" #################################################### ### Do not change anything below! ################## #################################################### # Export some important stuff # Be careful when changing this! export PRODUCT REVISION TOOLS_LINK FIFO_BASE pathmunge() { # $1 path to munge # $2 where to add the PATH entry default: 'beginning' local haveit=0 # No redundant PATH entries [[ ":$PATH:" =~ ":$1:" ]] && (( ++haveit )) if [ $haveit -gt 0 ] then echo "Redundant PATH entry: $1 ... skipping" return 1 else case ":${PATH}:" in *:"$1":*) ;; *) if [ "${2:-}" = "after" ] then PATH=$PATH:$1 else PATH=$1:$PATH fi ;; esac fi } # # Only allowed for starters ... 'startup' and 'restart' # Also needed for 'Prep' prior to startup # if [[ "$WATCHER_MODE" == 'startup' || "$WATCHER_MODE" == 'prep' ]] then # # Link APIs into PATH ... # if [ -z "$AWKPATH" ] then AWKPATH=$MASTER_PATH/api/awk else AWKPATH=$MASTER_PATH/api/awk:$AWKPATH fi export AWKPATH watchermap[awkpath]=$AWKPATH if [ -z "$BASHLIB" ] then BASHLIB=$MASTER_PATH/api/bash else BASHLIB=$MASTER_PATH/api/bash:$BASHLIB fi export BASHLIB watchermap[bashlib]=$BASHLIB # # Provide extended Watcher path ... # pathmunge $MASTER_PATH/bin pathmunge $AWKPATH pathmunge $BASHLIB if [ -n "$POOLBIN" ] then pathmunge $POOLBIN export POOLBIN fi export PATH else echo "Not allowed to source watcher.conf .." fi # vim: set filetype=sh noexpandtab tabstop=8 shiftwidth=8 autoindent smartindent :