PDA

View Full Version : [ubuntu] Router log to Ubuntu syslog



smeerbartje
April 25th, 2009, 10:29 AM
Hi all,

I have a D-link DIR-655 router which enables me to send the logging to a syslog server. Since my Ubuntu 8.04 LTS server runs a syslog daemon, I thought it would be nice to set this up. So what did I do?


In my router, I enables the syslog function, pointing to Ubuntu server: 192.168.1.1
Then I changed /etc/syslog.conf and added the line: System3.* /var/log/router.log
Changed /etc/default/syslogd and made sure the syslog server runs at SYSLOGD="-r" (to enable remote hosts)
Created the file /var/log/router.log

But unfortunately no entries are written to the router.log file. Am I doing something wrong?

[edit]
After checking the /var/log/syslog file, I found out that the router indeed writes logging to Ubuntu, since I found the next line;



Apr 25 11:30:52 192.168.1.100 Fri Apr 24 10:30:07 2009 D-Link Systems DIR-655 System Log: Blocked incoming UDP packet from 76.193.168.74:6346 to xxx.xxx.xxx.xxx:45594


So the only thing I need to do now is to filter messages from the router and write them to router.log. I thought the line "System3.* /var/log/router.log" would do that, but unfortunately it doesn't. How can I determine the 'facility'-name from the router?

JstSurrender
April 28th, 2009, 07:19 PM
I have a similar issue. I got my firewall logging to my ubuntu server, however it's logging to /var/log/syslog and I'd like it to log into its own log file. anyone know how to do that?

~Scott

chipyoung
March 2nd, 2010, 07:59 PM
Try

104.info /var/log/router.log

in your /etc/syslog.conf file. It worked for me with the D-Link DIR-655 router. My only problem now is that the router log information (router.log) is duplicated in the syslog file.

Any one no how I can fix this problem of duplicating log entries?

Chip

peter3
October 31st, 2010, 07:21 PM
It would be nice to include something along this line for the new
rsyslogd
since that seems to be the new default.