/Var/log/secure logs do not record Problems

Source: Internet
Author: User

Release: dedicated wait
 
God checked the server security log, and the firewall blocked the ip addresses that handled some brute force ssh password cracking attacks (one of the ip addresses is a famous CDN service provider in Beijing ), then all the/var/log/secure * log files are deleted.
When I checked the logs again today, I found that/var/log/secure had no records, so I thought that when I deleted the log files directly, the corresponding service had to be restarted. Run the command: service syslog restart; service sshd restart is normal.
By the way, I will review ssh settings in syslog.
 
1. settings in/etc/ssh/sshd_config: (that is, SyslogFacility is set to AUTHPRIV)
[Root @ mail ~] # More/etc/ssh/sshd_config
# Port 22
# Logging
# Obsoletes QuietMode and FascistLogging
# SyslogFacility AUTH
<Strong> SyslogFacility AUTHPRIV </strong>
# LogLevel INFO
# Defines the sshd log at the authriv.info level.
2. In combination with the settings in/etc/syslog. conf:
[Root @ mail ~] # More/etc/syslog. conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
# Kern. */dev/console
# Log anything (could t mail) of level info or higher.
# Dont log private authentication messages!
*. Info; mail. none; authpriv. none; cron. none/var/log/messages
# The authpriv file has restricted access.
<Strong> authpriv. */var/log/secur </strong> e
 
Restart sshd and syslog

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.