การส่ง Log ของ Cisco Router

#conf t
#logging buffered notice
#logging buffered 64000
#logging history size 250
#logging IP_SoftnixLogger
#logging trap 6
#logging no logging console
#logging source-interface Loopback 0
#logging facility local2

ตรง #logging trap 6
มี Option ให้แก้ดังนี้
0 = system unusable
1 = Immediate action required
2 = Critical condition
3 = Error conditions
4 = Warning conditions
5 = Normal but significant conditions
6 = Information messages
7 = Debugging messages

warning  show error message about software or hardware
debugging show output of debug commands
notices show interface up/down and system restart
informational show reloads requests and low-process stack message

 

อันนี้เป็นอีกวิธี ก็คล้ายๆกัน ดูเป็น Guide Line ได้ อันนี้สำหรับ Cisco ASA โดยเฉพาะ

 

1.

Enable Logging:

Here I enable logging on the ASA and specify that a timestamp be included with each message (optional).

logging enable 
logging timestamp

 
2.

Add a time server:  <== หากต้องการให้ Sync Time ด้วย

This is optional however you should make sure the time is accruate on your log messages.

ntp server 192.5.41.41 source outside 
ntp server 192.5.41.40 source outside prefer

 
3.

Send messages to a syslog server:

Here I have specified a logging level, and a destination syslog server address (required). I have also specified a facility number (optional) and that the ASA hostname be attached to each messages (optional).

logging trap warnings <<== หรือระบุ logging trap 6  เลข 6 คือ Information Message
logging facility 21   <== หรือระบุอย่างงี้ก็ได้ logging facility local2
logging device-id hostname  <== hostname คือชื่อที่จะไปแสดงที่ Logger
logging host inside XXX.XXX.XXX.XXX   <== IP ของ Logger

  • Share/Bookmark

Tags:

Leave a Comment