I'm trying to concentrate logs from multiple equipments from multiple clients on my RSYSLOG server.
My server runs on Debian 11 with RSYSLOG v8.2102
The configuration is quite simple at the moment: I've simply allowed UDP and TCP connections in /etc/rsyslog.conf and opened port 514 in UFW.
In /etc/rsyslog.d/ I add for each equipement a rule. For example, to match a Fortinet I add this rule in /etc/rsyslog.d/10-Fortinet-SiteName-ClientName.conf :
if $msg contains 'devid="FGT_SerialNumber"' then /ClientsLogs/ClientName/SiteName/Fortinet.log
& stop
It works as expected.
I would like to send all the remaining network traffic in another file that /var/log/syslog to help me identify problems such as a missing equipment configuration and prevent /var/log/syslog from growing (firewall logs are quite verbose!)
I've tried to filter using $fromhost-ip without luck:
if not $fromhost-ip == '127.0.0.1' then /ClientsLogs/Undefined.log
& stop
I'm sure it must be quite simple but I can't get it working!