Router Setup: D-Link DIR-655 and Rsyslog
From rsyslog wiki
D-links now support sending data over UDP port 514 to a syslog server. Here is my story on how to set-it up with Rsyslog.
I use Fedora 8 here and D-Link DIR-655.
Rsyslog is a service in Fedora. That is to say you can manage it using commands such as system rsyslog restart. Hence you have to modify how fedora handles rsyslog service when the above command is issue. You do this by modifying /etc/sysconfig/rsyslog and changing the line command to include -r option (rather than default -m 0). Save this file and restart the service. For other Linux distributions, make sure you are running rsyslog with -r (To do this, run ps aux | grep -i rsyslog and examine the output to see how rsyslog was started on your system. If you don't see anything that means you're not running rsyslog, so start it!).
Go to your router and type in the IP of the server you want to post your logs to (Make sure your machine has static IP obviously). Restart the router.
On my Fedora, I have iptraf installed, so I use to make sure that my router is sending logs to my server on port 514 (remember because we used -r above, the default rsyslog port is used which is 514).
Now you want to make sure that port 514 of is open for UDP if you are using iptables. Do this by issuing vi /etc/sysconfig/iptables and add -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 514 -j ACCEPT to it somewhere before commit. Now restart iptables by service iptables restart.
I've configured rsyslog to work with MySQL which on fedora requires the rsyslog-mysql package. So yum that if you want MySQL support. Make sure to add $ModLoad MySQL to the top of your /etc/rsyslog, and also add *.* >yourmysql,con,string to redirect everything to MySQL. (Note that you need to create the table you have in your connection string but for MySQL setup, look at the documentation for MySQL and rsyslog, there is a createDB.sql file you can use if you want). Now restart rsyslog using service rsyslog restart and you should get your router logs in your MySQL.

