Bjorn - 2023-05-21

Thanks for the files. I am not familiar with psad, but I do have some comments:

  • I assume you're willing to post this under the MIT/X-Consortium license. The relevant header can be found in the script files. For example, you can execute head -25 scripts/services/named to obtain a standard version of it. Change the year and copyright holder, and prepend it to the scripts/services/psad script.
  • Is the file location of $psadstatus hard-coded in the psad source? It is preferable to make it a configurable option, and can default to the value you've hard-coded in the script if not re-defined.
  • Better to make use of the $Detail variable. The output all appears to be informational, so maybe the script can exit early if $Detail is less than some value (perhaps 5). The intent is that for $Detail = 0 only actionable output should be generated.
  • I see that there is a system call to whois for each IP address. It appears that psad has some sort of whois functionality. Can that be enabled when starting the psad process, and then Logwatch simply processes the log files with the embedded whois info?