Monday, May 13, 2013

Syslog server between router and Linux server

Syslog Server Configuration
1. In the router
Config#service timestamps log datetime msec localtime  
Config#logging on                                              
Config#logging trap informational                          
Config#logging 192.168.3.1                                   // logging server
Config#logging facility local6                                //facility value
Config#logging source-interface serial 0                  //interface to send message to log server



2. In the Linux server
# vi /etc/sysconf.conf

# save all log messages to /var/log/router.log
local6.*                                   /var/log/router.log

# cat /etc/sysconfig/syslog

SYSLOGD_OPTIONS="-m 0 -r"

# service syslog restart
# netstat -nau | grep :514                      //remote port
# tail –f /var/log/router.log

No comments:

Post a Comment