1

I am trying to configure rsyslog to listen on port 514 and want to make sure that it is only listening on 127.0.0.1.

It is accepting logs on 514 but it is listening on all ip address.

I have tried the following two configuration. with both cases it is listening on all interfaces.

$ModLoad imudp
$UDPServerRun 514
$UDPServerAddress 127.0.0.1

and

module(load="imudp")
input(type="imudp" port="514" Address="127.0.0.1")

rsyslog is not accepting the second configuration.

rsyslogd: the last error occured in /etc/rsyslog.conf, line 86:"input(type="imudp" port="514" Address="127.0.0.1")"
rsyslogd: the last error occured in /etc/rsyslog.conf, line 85:"module(load="imudp") 

Here is the rsyslog version details.

rsyslogd -v rsyslogd 5.8.10, compiled with:

    FEATURE_REGEXP:                         Yes
    FEATURE_LARGEFILE:                      No
    GSSAPI Kerberos 5 support:              Yes
    FEATURE_DEBUG (debug build, slow code): No
    32bit Atomic operations supported:      Yes
    64bit Atomic operations supported:      Yes
    Runtime Instrumentation (slow code):    No
3

I think to bind to a particular address you do this (the difference with your initial config is that the Run HAS to come after the Address.

$ModLoad imudp
$UDPServerAddress 127.0.0.1 # BEFORE UDPSERVERRUN
$UDPServerRun 514

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.