0
votes

How can the localhost name be suppressed (instead log the IP address) from the log entries in a syslog server message?

Suppose I want the syslog server's IP address to be written to the log messages rather than localhost.

For example, my syslog server sample syslog.conf file might have this catch all line for the localhost user event logging:

authpriv.* /var/log/messages

The log entry might look like below for an su session start

Jun 21 15:48:56 localhost su: pam_unix(su:session): session opened for user root by root(uid=0)

I strongly prefer that all messages from the localhost write their IP addresses to the messages log file not just the 'localhost' string. How can I get the localhost, syslog server to write it's IP address?

Please advise, Bryan

1

1 Answers

0
votes

If the connection to syslog is over the localhost address and a hostname is not set, I think this is the expected behavior. What syslog are you using and is your hostname set?