You know all these log messages you get on the console? *It's possible to put them in a log file, in case your firewall does not have a monitor. *Here are the steps:
1. Edit /etc/newsyslog.conf:
Where all the log files are, append this line:
Code:
/var/log/console.log * * * * * * * * * *640 *5 * *250 ** * * Z
2. Edit /etc/syslog.conf:
change these 4 lines:
Code:
*.err;kern.debug;auth.notice;authpriv.none;mail.crit * */dev/console
<snip>
*.err * * * * * * * * * * * * * * * * * * * * * * * * * /dev/console
*.notice;auth.debug * * * * * ** * * * * * * * * * * * /dev/console
*.alert * * * * * * * * * * * * * * * ** * * * * * * * */dev/console
to read:
Code:
*.err;kern.debug;auth.notice;authpriv.none;mail.crit * */var/log/console.log
<snip>
*.err * * * * * * * * * * * * * * * * * * * * * * * * * /var/log/console.log
*.notice;auth.debug * * * * * * * * * * * * * * * * * * /var/log/console.log
*.alert * * * * * * * * * * * * * * * * * * * * * * * * /var/log/console.log
3. Create the /var/log/console.log and set the proper permissions
# touch /var/log/console.log
# chmod 640 /var/log/console.log
4. Restart syslog:
# kill -HUP <syslog PID>
This way, you can see logins, failed logins, ssh attempts, etc. in a log file which you can tail -f. *Very useful. *The more you know about what's going on, the better and this technique makes it easy to know a lot!
Bookmarks