Configure Syslog
Configure Syslog
Configure Syslog
Introduction
Prerequisites
Requirements
Components Used
Basic Syslog
Send Logging Information to the Internal Buffer
Send Logging Information to a Syslog Server
Send Logging Information as E-mails
Send Logging Information to the Serial Console
Send Logging Information to a Telnet/SSH Session
Display Log Messages on the ASDM
Send Logs to an SNMP Management Station
Add Timestamps to Syslogs
Example 1
Configure Basic Syslog with ASDM
Send Syslog Messages Over a VPN to a Syslog Server
Central ASA Configuration
Remote ASA Configuration
Advanced Syslog
Use the Message List
Example 2
ASDM Configuration
Use the Message Class
Example 3
ASDM Configuration
Send Debug Log Messages to a Syslog Server
Use of Logging List and Message Classes Together
Log ACL Hits
Verify
Troubleshoot
%ASA-3-201008: Disallowing New Connections
Solution
Related Information
Introduction
This document provides a sample configuration that demonstrates how to configure different
logging options on an Adaptive Security Appliance (ASA) that runs code Version 8.4 or later.
ASA Version 8.4 has introduced very granular filtering techniques in order to allow only certain
specified syslog messages to be presented. The Basic Syslog section of this document
demonstrates a traditional syslog configuration. The Advanced Syslog section of this document
shows the new syslog features in Version 8.4. Refer to Cisco Security Appliance System Log
Messages Guide, Version 8.x and 9.x for the complete system log messages guide.
Prerequisites
Requirements
Components Used
The information in this document is based on these software and hardware versions:
Note: Refer to ASA 8.2: Configure Syslog using ASDM for more information for similar
configuration details with ASDM version 7.1 and later.
Basic Syslog
Note: Use the Command Lookup Tool (registered customers only) in order to obtain more
information on the commands used in this section.
Enter these commands in order to enable logging, view logs, and view configuration settings.
● logging enable - Enables the transmission of syslog messages to all output locations.
● no logging enable - Disables logging to all output locations.
● show logging - Lists the contents of the syslog buffer as well as information and statistics
that pertain to the current configuration.
The ASA can send syslog messages to various destinations. Enter the commands in these
sections in order to specify the locations you would like the syslog information to be sent:
In order to help align and order events, timestamps can be added to syslogs. This is
recommended in order to help trace issues based on time. In order to enable timestamps, enter
the logging timestamp command. Here are two syslog examples, one without the timestamp and
one with:
Example 1
This output shows a sample configuration for logging into the buffer with the severity level of
debugging.
logging enable
logging buffered debugging
This is sample output.
logging enable
logging buffered debugging
This procedure demonstrates the ASDM configuration for all available syslog destinations.
1. In order to enable logging on the ASA, first configure the basic logging parameters. Choose
Configuration > Features > Properties > Logging > Logging Setup. Check the Enable
3. Choose E-Mail Setup in Logging in order to send syslog messages as e-mails to specific
recipients. Specify the source e-mail address in the Source E-Mail Address box and choose
Add in order to configure the destination e-mail address of the e-mail recipients and the
message severity level. Click OK when you are
done.
4. Choose Device Administration, Logging, choose SMTP, and enter the Primary Server IP
6. Choose Add in order to add an SNMP management station. Enter the SNMP host details
In either the simple site-to-site VPN design or the more complicated hub-and-spoke design,
administrator might want to monitor all remote ASA Firewalls with the SNMP server and syslog
server located at a central site.
In order to configure the site-to-site IPsec VPN configuration, refer to PIX/ASA 7.x and above: PIX-
to-PIX VPN Tunnel Configuration Example. Apart from the VPN configuration, you have to
configure the SNMP and the interesting traffic for the syslog server in both the central and local
site.
!--- This access control list (ACL) defines IPsec interesting traffic.
!--- This line covers traffic between the LAN segment behind two ASA.
!--- It also includes the SNMP/syslog traffic between the SNMP/syslog server
!--- and the network devices located on the Ethernet segment behind the ASA 5515.
!--- This lines covers SNMP (TCP/UDP port - 161), SNMP TRAPS(TCP/UDP port - 162)
!--- and syslog traffic (UDP port - 514) from SNMP/syslog server
!--- to the outside interface of the remote ASA.
logging enable
logging trap debugging
!--- This lines covers SNMP (TCP/UDP port - 161), SNMP TRAPS (TCP/UDP port - 162) and
!--- syslog traffic (UDP port - 514) sent from this ASA outside
!--- interface to the SYSLOG server.
access-list 101 permit tcp host 10.20.20.1 host 172.22.1.5 eq 161
access-list 101 permit udp host 10.20.20.1 host 172.22.1.5 eq 161
access-list 101 permit tcp host 10.20.20.1 host 172.22.1.5 eq 162
access-list 101 permit udp host 10.20.20.1 host 172.22.1.5 eq 162
access-list 101 permit udp host 10.20.20.1 host 172.22.1.5 eq 514
Advanced Syslog
ASA Version 8.4 provides several mechanisms that enable you to configure and manage syslog
messages in groups. These mechanisms include message severity level, message class,
message ID, or a custom message list that you create. With the use of these mechanisms, you
can enter a single command that applies to small or large groups of messages. When you set up
syslogs this way, you are able to capture the messages from the specified message group and no
longer all the messages from the same severity.
Use the message list in order to include only the interested syslog messages by severity level and
ID into a group, then associate this message list with the desired destination.
Example 2
Enter these commands in order to create a message list, which includes all the severity 2 (critical)
messages with the addition of message 611101 to 611323, and also have them sent to the
console:
ASDM Configuration
This procedure shows an ASDM configuration for Example 2 with the use of the message list.
1. Choose Event Lists under Logging and click Add in order to create a message
list.
2. Enter the name of the message list in the Name box. In this case my_critical_messages is
used. Click Add under Event Class/Severity
Filters.
3. Choose All from the Event Class drop-down list. Choose Critical from the Severity drop-
OK.
6. Go back to the Logging Filters menu and choose Console as the destination.
7. Choose my_critical_messages from the Use event list drop-down list. Click OK when you
are done.
8. Click Apply after you return to the Logging Filters window.
This completes the ASDM configurations with the use of a message list as shown in Example 2.
Use the message class in order to send all messages associated with a class to the specified
output location. When you specify a severity level threshold, you can limit the number of
messages sent to the output location.
Example 3
Enter this command in order to send all ca class messages with a severity level of emergencies or
higher to the console.
ASDM Configuration
This procedure shows the ASDM configurations for Example 3 with the use of the message list.
1. Choose the Logging Filters menu and choose Console as the destination.
2. Click Disable logging from all event classes.
3. Under the Syslogs from Specific Event Classes, choose the Event Class and Severity you
want to add.This procedure uses ca and Emergencies respectively.
4. Click Add in order to add this into the message class and click
OK.
5. Click Apply after you return to the Logging Filters window. The console now collects the ca
class message with severity level Emergencies as shown on the Logging Filters
window.
This completes the ASDM configuration for Example 3. Refer to Messages Listed by Severity
Level for a list of the log message severity levels.
For advanced troubleshooting, feature/protocol specific debug logs are required. By default, these
log messages are displayed on terminal (SSH/Telnet). Dependent on the type of debug, and the
rate of debug messages generated, use of the CLI might prove difficult if debugs are enabled.
Optionally, debug messages can be redirected to the syslog process and generated as syslogs.
These syslogs can be sent to any syslog desination as would any other syslog. In order to divert
debugs to syslogs, enter the logging debug-trace command. This configuration sends debug
output, as syslogs, to a syslog server.
Enter the logging list command in order to capture the syslog for LAN-to-LAN and Remote
access IPsec VPN messages alone. This example captures all VPN (IKE and IPsec) class system
log messages with debugging level or higher.
Example
hostname(config)#logging enable
hostname(config)#logging timestamp
hostname(config)#logging list my-list level debugging class vpn
hostname(config)#logging trap my-list
hostname(config)#logging host inside 192.168.1.1
An optional syslog level (0 - 7) can be specified for the generated syslog messages (106100). If no
level is specified, the default level is 6 (informational) for a new ACE. If the ACE already exists,
then its current log level remains unchanged. If the log disable option is specified, access list
logging is completely disabled. No syslog message, including message 106023, is generated. The
log default option restores the default access list logging behavior.
Complete these steps in order to enable the syslog message 106100 to view in the console output:
1. Enter the logging enable command in order to enable transmission of system log messages
to all output locations. You must set a logging output location in order to view any logs.
2. Enter the logging message <message_number> level <severity_level> command in order
to set the severity level of a specific system log message.In this case, enter the logging
message 106100 command in order to enable the message 106100.
3. Enter the logging console message_list | severity_level command in order to enable
system log messages to display on the Security Appliance console (tty) as they occur. Set
the severity_level from 1 to 7 or use the level name. You can also specify which messages
are sent with the message_list variable.
4. Enter the show logging message command in order to display a list of system log message
messages that have been modified from the default setting, which are messages that have
been assigned a different severity level and messages that have been disabled.This is
sample output of the show logging message command:ASAfirewall#show logging message
106100
syslog 106100: default-level informational (enabled)
ASAfirewall# %ASA-7-111009: User 'enable_15' executed cmd: show logging mess 106
100
Verify
There is currently no verification procedure available for this configuration.
Troubleshoot
If you want to suppress a specific syslog message to be sent to syslog server, then you must enter
the command as shown.
The %ASA-3-201008: Disallowing new connections. error message is seen when an ASA is unable to
contact the syslog server and no new connections are allowed.
Solution
This message appears when you have enabled TCP system log messaging and the syslog server
cannot be reached, or when you use Cisco ASA Syslog Server (PFSS) and the disk on the
Windows NT system is full. Complete these steps in order to resolve this error message:
Related Information
● Cisco ASA Firewall Software
● Cisco Secure PIX Firewall Command References
● Requests for Comments (RFCs)
● Technical Support & Documentation - Cisco Systems