Remote logging with Linksys WRT54G
Enabling remote syslog logging with Linksys WRT54G and OpenWRT White Russian RC3 is as simple as storing the IP of the remote syslog server into the log_ipaddr NVRAM variable:
nvram set log_ipaddr=A.B.C.D nvram commit reboot
log_ipaddr is used by /etc/init.d/rcS startup script to launch a local syslog daemon with option “-R
#!/bin/sh
syslog_ip=$(nvram get log_ipaddr)
ipcalc -s "$syslog_ip" || syslog_ip=""
syslogd -C 16 ${syslog_ip:+-L -R $syslog_ip}
klogd
...
Leave a Reply