cscli collections install crowdsecurity/whmA collection to defend WHM on the various common services installed
To help you locate the logs specific to WHM or CPanel configuration refer to https://docs.cpanel.net/knowledge-base/cpanel-product/the-cpanel-log-files/
Example acquisition for this collection :
1# You can leave the default apache2 path in acquis.yaml as it will deal with your server logs2# this extra acquisition is for apache2 errors for your various users domains3## put in /etc/crowdsec/acquis.d/apache2whm.yaml4filenames:5 - /var/log/apache2/domlogs/*6exclude_regexps:7 - .*ftpxferlog.*8 # you can excluse other regexp that are not apache2 log files9labels:10 type: apache2
1# ftpxfer typical WHM override :2## put in /etc/crowdsec/acquis.d/ftpxfer.yaml3filenames:4 - /usr/local/apache2/domlogs/ftpxferlog5labels:6 type: syslog7 # depending on your ftp service the type can also be proftpd or vsftpd
1# cpanel typical WHM override :2## put in /etc/crowdsec/acquis.d/cpanel.yaml3## and comment out cpanel acquis default config in /etc/crowdsec/acquis.yaml if necessary4filenames:5 - /usr/local/cpanel/logs/login_log6 - /usr/local/cpanel/logs/error_log7 - /usr/local/cpanel/logs/access_log8labels:9 type: cpanel
1# ConfigServer LFD path :2## put in /etc/crowdsec/acquis.d/configserver-lfd.yaml3filenames:4 - /var/log/lfd.log5labels:6 type: syslog
1# In case your Dovecot logs into syslog2# syslog will likely route mail logs to maillog3## put in /etc/crowdsec/acquis.d/dovecot.yaml4## and comment out cpanel aqcuis default config in /etc/crowdsec/acquis.yaml if necessary5## depending on your OS the file might be /var/log/maillog or /var/log/mail.log6filenames:7 - /var/log/maillog8labels:9 type: syslog
notes :
syslog, set type to syslog instead