Difference between revisions of "Syslog"
From Bashlinux
(No difference)
|
Revision as of 20:06, 6 January 2012
syslog
How to enable remote login in Fedora
Useful from small embedded devides like routers, DSL modems and access points.
1. Enable UDP syslog reception in `/etc/rsyslog.conf` and uncomment the following lines:
$ModLoad imudp $UDPServerRun 514
Ensure TCP syslog is either disabled or running on a different port.
1. Restart rsyslog:
systemctl restart rsyslog.service
- In OpenWRT UI go to System tab, System subtab, Logging sub-subtab. Put the IP of the Fedora server there. Web-based UI in Backfire is powerful and easy to use, but you can confirm that the changes are saved in `/etc/config/system` as option 'log_ip' '192.168.m.n'
- Here you need to restart syslogd on the router. I admit, I couldn't figure out how to do that mad so I ended up just rebooting the router. Whatever you do, your ps output should show syslogd -R 192.168.m.n:514 (maybe some other switches like -C or -L).
- Now look in `/var/log/messages` on Fedora server. You should see messages from the router. If your router is not busy, try to log in or log out - it should get recorded. You will also see the name that the router reports to syslog
- if you want to combine router-based messages into single file, follow the advice from diego.misc above: Create the file `etc/rsyslogd.d/openwrt.conf` with the following contents:
:source, isequal, "server.ip" /var/log/mylogfile.log :source, isequal, "server.ip" ~