In a client --> relay --> server (not syslog-ng) infrastructure, the server sets the relay's address as source IP.
In this example the,
Add the following line in the destination of the syslog-ng configuration file:
template("SourceIP=${SOURCEIP} ${MSG}\n")
It should look similar to the following example:
destination {
network(
"10.10.10.10"
port(1000)
transport("tcp")
template("SourceIP=${SOURCEIP} ${MSG}\n")
);
};
In this example the,
Create the following rewrite rule and add to the relevant log path:
rewrite r_sourceip{
set('${SOURCEIP} ${MSG}' value(MESSAGE));
};
It should look similar to the following example:
log {
source(s_net);
rewrite(r_sourceip);
destination(d_messages);
};
© ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center