I have several log agents with iptables logging rules and default rsyslog config. Rsyslog sends the logs to the central server.
Iptables rule:
iptables -A INPUT -j LOG --log-prefix "INPUT:DROP:" --log-level 6
Now log message looks like this:
Aug 6 14:38:08 localhost kernel: INPUT:DROP:IN=eth0 OUT= MAC=52:54:00:26:10:60: SRC=10.0.2.2 DST=10.0.2.15 LEN=76 TOS=0x00 PREC=0x00 TTL=64 ID=22131 PROTO=TCP SPT=53998 DPT=22 WINDOW=65535 RES=0x00 ACK PSH URGP=0
How can I append log agent ip address and log agent mac addres to every log message? On agents comes traffic where dst != log agent ip.