Article Title: how to configure linux as a log host of the pix. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Environment: PIX515e and Redhat 8.0
I. linux Configuration:
1. vi/etc/sysconfig/syslog (press I to enter the vi editing status, Press ESC to return to the command line status after the editing is complete, and then enter: wq to save the disk and exit, if you do not save the disk, enter: q)
Run the following code:
SYSLOGD_OPTIONS = "-m 0"
Change
Code:
SYSLOGD_OPTIONS = "-r-m 0" //-r allows the write of messages from a remote host
2. vi/etc/syslog. conf
Add the following content
Record all logs of the device number local4 (the default device number of the pix, corresponding to the facility of the PIX side 20) to/var/log/pix. log.
Code:
# Save pix messages all to pix. log
Local4. * &/var/log/pix. log
3. To avoid excessive logs, configure log rotation (man logrotate to view detailed help information)
Vi/etc/logrotate. conf
Add the following content:
Code:
# System-specific logs may be also be configured here.
/Var/log/pix. log {
Weekly
Rotate 4 &
}
4. Restart the syslog service:
[Root @ localhost & etc] # service syslog restart
Ii. PIX Configuration:
Code:
Pix # Logging on &
Pix # Logging host 192.168.0.1 // host IP address that records logs
Pix # Logging trap 7 // specify the log message level (0: Emergency (Emergencies) 1: Alarm (Alerts) 2: severe (Critical) 3: Error (Errors) 4: warning 5: Notifications 6: Information 7: Debugging ))
Pix # Logging facility 20 // change the device number, which is local20 by default.
Pix # Exit
Pix # sh logging // you can see whether the current log is started
Pix # wr mem & // save Configuration
3. Check whether the configuration is successful and correct:
1. Run sh logging in the pix enable mode to check whether logging is enabled:
Code:
Pix # sh logging
Syslog logging: enable
Facility: 20
Timestamp logging: disabled
Standby logging: discable
Console logging: discable
Monitor logging: discable
Buffer logging: discable
Trap logging: level warnings, 373000 messages logged
& Logging to inside 192.168.0.1
History logging: discable
Device ID: discable
Pix #
2. Run [root @ localhost & etc] # tail? on linux? F &/var/log/pix. log
Check for logs. Press Ctrl + c
3. troubleshooting and experiences:
The following are errors encountered during debugging:
(1) [disable] enable the Syslog logging service: Run [no] logging on [disable] In the pix configuration mode to enable the Service.
(2) Use tail? F/var/log/pix. log command found no log records:
Due to no carelessness, logs cannot be output due to the configuration of facility 4 on the pix end. log on to the Pix and run logging facility 20 in configuration mode;
Logs cannot be output due to network problems between linux and the pix. At the beginning, logs cannot be pinged to the pix from linux, but logs can be pinged to the linx from the pix, later, the check was due to firewall restrictions. If not, stop the Firewall service in Linux and run [root @ localhost & etc] # service iptables stop
(3) During configuration, due to carelessness, the correct command may also write an error, which is also a cause of configuration failure, in addition, if you do not know anything during the configuration process, you can directly go to the official website for reference.
(4) If you are not familiar with the configuration process, you should first check whether you have lost or missed the command. Refer to the official documentation, search for the same questions from previous netizens on the Forum, and ask more questions and communicate with others.
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.