[CentOS] Binding rsyslogd to specific ip address

Tue Dec 14 15:23:43 UTC 2010
carlopmart <carlopmart at gmail.com>

On 12/14/2010 04:01 PM, Bob Beers wrote:
> On Tue, Dec 14, 2010 at 9:16 AM, carlopmart<carlopmart at gmail.com>  wrote:
>> Oops sorry. I prefer to bind via tcp port, if it is possible... is it?
>
> I guess so ... you couldn't reach the links I provided?  Try in rsyslog.conf:
>
> $ModLoad imtcp
> $TCPServerAddress 192.0.2.1
> $InputTCPServerRun 514
>

Yes, I have tried, and doesn't works:

#### MODULES ####

#$ModLoad imuxsock.so	# provides support for local system logging (e.g. via logger 
command)
#$ModLoad imklog.so	# provides kernel logging support (previously done by rklogd)
#$ModLoad immark.so	# provides --MARK-- message capability

# Provides UDP syslog reception
#$ModLoad imudp.so
#$UDPServerAddress 172.25.50.26
#$UDPServerRun 514

# Provides TCP syslog reception
$ModLoad imtcp.so
$TCPServerAddress 172.25.50.26
$InputTCPServerRun 514


and netstat output:

[root at loghost librelp-0.1.1]# netstat -anp |grep rsyslog
tcp        0      0 0.0.0.0:514                 0.0.0.0:*                   LISTEN 
     4446/rsyslogd
unix  3      [ ]         DGRAM                    543447 1001/rsyslogd       /dev/log

-- 
CL Martinez
carlopmart {at} gmail {d0t} com