2. Create your source log configuration file: /etc/rsyslog.d/hapac2.conf
$template NetworkLog, "/var/log/hapac2.log"
:fromhost-ip, isequal, "192.168.3.1" -?NetworkLog
& ~
3. Enable rsyslog to listen to remote request, uncomment below entries in file /etc/rsyslog.conf
module(load="imudp")
input(type="imudp" port="514")
module(load="imtcp")
input(type="imtcp" port="514")
4. Touch /var/log/hapac2.log
5. Restart rsyslog daemon:
service rsyslog restart
Configuration on Hap ac2 router
Login Hap ac2 console, goto System -> Logging -> Actions
Double click on remote to open the entry, then type in the information you get from rsyslog server.
Back to tab Rules, Add rule for firewall, and give a Prefix if you like, and change the Action to remote:
Now, logon rsyslog server, you should be able to see the logs saved in /var/log/hapac2.log
No comments:
Post a Comment