ADC

Configuring Citrix ADC appliance for audit logging

Warning:

Classic policy expressions and its usage are deprecated (discouraged from use but still supported) from Citrix ADC 12.0 build 56.20 onwards and as an alternative, Citrix recommends you to use advanced policies. For more information, seeAdvanced Policies.

Auditing module allows logging of all states and status information from different modules so that an administrator can see event history in the chronological order. Main components of an Audit framework are ‘audit action’, ‘audit policy’. ‘Audit action’ describes Audit Server configuration information whereas ‘audit policy’ links a bind entity to an ‘audit action’. The audit policies use ‘Classic Policy Engine’(CPE) framework to link ‘audit action’ to ‘bind entities’ or Progress Integration (PI) framework to link ‘audit action’ to ‘system global bind entities’.

The policy frameworks differ from each other in the way the audit log policies are bound to the global entities. Previously, the audit module supported only classic expression but now it supports both classic and advanced policy expressions. Currently, using the advanced expression you can bind audit log policies only to System global entities.

Note

When you bind a policy to global entities, you must bind it to a system global entity of the same expression type. For example, you cannot bind a classic policy to an advanced global entity or bind an advanced policy to a classic global entity.

Configuring audit log policies in a classic policy expression

Configuring audit logging in classic policy consists of the following steps:

  1. Configuring an audit log action. You can configure an audit action for different servers and for different log levels. ‘Audit action’ describes Audit Server configuration information whereas ‘audit policy’ links a bind entity to an ‘audit action’. By default, the SYSLOG, and NSLOG uses only TCP to transfer log information to the log servers. TCP is more reliable than UDP for transferring complete data. When using TCP for SYSLOG, you can set the buffer limit on the Citrix ADC appliance to store the logs. After which the logs are sent to the SYSLOG server.
  2. Configuring audit log policy. You can configure either SYSLOG policies to log messages to a SYSLOG server or NSLOG policy to log messages to an NSLOG server. Each policy includes a rule that is set totrueorns_truefor the messages to be logged, and a SYSLOG or NSLOG action.
  3. Binding audit log policies to global entities. You must globally bind the audit log policies to global entities such SYSTEM, VPN, Citrix ADC AAA and so on. You can do it to enable logging of all Citrix ADC system events. By defining the priority level, you can set the evaluation order of the audit server logging. Priority 0 is the highest and is evaluated first. The higher the priority number, the lower is the priority of evaluation.

Each of these steps is explained in the following sections.

Configuring audit log action

配置SYSLOG action in an advanced policy infrastructure by using the CLI.

Note

The Citrix ADC appliance allows you to configure only one SYSLOG action to SYSLOG server IP address and port. The appliance does not allow you to configure multiple SYSLOG actions to the same server IP address and port.

A syslog action contains a reference to a syslog server. It specifies which information to log and mentions how to log that information.

At the command prompt, type the following commands to set the parameters and verify the configuration:

- add audit syslogAction   [-serverPort ] -logLevel  [-dateFormat ( MMDDYYYY | DDMMYYYY )] [-transport ( TCP | UDP )]` - show audit syslogAction [] 

配置NSLOG action in an advanced policy infrastructure by using the CLI.

An ns log action contains a reference to an ns log server. It specifies which information to log and mentions how to log that information.

At the command prompt, type the following commands to set the parameters and verify the configuration:

- add audit nslogAction   [-serverPort ] -logLevel  [-dateFormat ( MMDDYYYY | DDMMYYYY )] - show audit nslogAction [] 

Configuring audit log policies

配置audit log Policies in classic policy infrastructure by using the CLI.

At the command prompt, type:

add audit syslogpolicy  <-rule>  add audit nslogpolicy  <-rule>  

Binding audit syslog policies to audit syslog global

Bind audit log policy in advanced policy framework by using the CLI.

At the command prompt, type:

bind audit syslogGlobal [-globalBindType

unbind audit syslogGlobal [-globalBindType ]

Bind audit log policy in classic policy framework by using the CLI.

At the command prompt, type:

bind systemglobal

unbind systemglobal

Configuring audit log policies using advanced policy expression

Configuring audit logging in advanced policy consists of the following steps:

  1. Configuring an audit log action. You can configure an audit action for different servers and for different log levels. ‘Audit action’ describes Audit Server configuration information whereas ‘audit policy’ links a bind entity to an ‘audit action’. By default, the SYSLOG, and NSLOG uses only TCP to transfer log information to the log servers. TCP is more reliable than UDP for transferring complete data. When using TCP for SYSLOG, you can set the buffer limit on the Citrix ADC appliance to store the logs. After which the logs are sent to the SYSLOG server.
  2. Configuring audit log policy. You can configure either SYSLOG policies to log messages to a SYSLOG server or NSLOG policy to log messages to an NSLOG server. Each policy includes a rule that is set totrueorns_truefor the messages to be logged, and a SYSLOG or NSLOG action.
  3. Binding audit log policies to global entities. You must globally bind the audit log policies to theSYSTEM globalentity to enable logging of all Citrix ADC system events. By defining the priority level, you can set the evaluation order of the audit server logging. Priority 0 is the highest and is evaluated first. The higher the priority number, the lower is the priority of evaluation.

Note

The Citrix ADC appliance evaluates all the policies that are bind to true.

Configuring audit log action

配置syslog action in an advanced policy infrastructure by using the CLI.

At the command prompt, type the following commands to set the parameters and verify the configuration:

add audit syslogAction   [-serverPort ] -logLevel  [-dateFormat ( MMDDYYYY | DDMMYYYY )] [-transport ( TCP | UDP )] show audit syslogAction [] 

配置NSLOG action in advanced policy infrastructure by using the CLI.

At the command prompt, type the following commands to set the parameters and verify the configuration:

add audit nslogAction   [-serverPort ] -logLevel  [-dateFormat ( MMDDYYYY | DDMMYYYY )] show audit nslogAction [] 

Configuring audit log policies

Add a syslog audit action by using the CLI.

At the command prompt, type:

add audit syslogAction  ( | (([-domainResolveRetry ]) | -lbVserverName ))[-serverPort ] -logLevel [-dateFormat ] [-logFacility ][-tcp ( NONE | ALL )] [-acl ( ENABLED | DISABLED )] [-timeZone ( GMT_TIME | LOCAL_TIME )][-userDefinedAuditlog ( YES | NO )] [-appflowExport ( ENABLED | DISABLED )] [-lsn ( ENABLED | DISABLED )][-alg ( ENABLED | DISABLED )] [-subscriberLog ( ENABLED | DISABLED )][-transport ( TCP | UDP )] [-tcpProfileName ][-maxLogDataSizeToHold 

Example

add audit syslogaction audit-action1 10.102.1.1 -loglevel INFORMATIONAL -dateformat MMDDYYYY add audit nslogAction nslog-action1 10.102.1.3 -serverport 520 -loglevel INFORMATIONAL -dateFormat MMDDYYYY add audit syslogpolicy syslog-pol1 ns_true audit-action1 add audit nslogPolicy nslog-pol1 ns_true nslog-action1 bind system global nslog-pol1 -priority 20 

Add a ns log audit action by using the CLI.

At the command prompt, type:

add audit nslogAction  ( | ([-domainResolveRetry ])) [-serverPort ] -logLevel  ... [-dateFormat ][-logFacility ] [-tcp ( NONE | ALL )][-acl ( ENABLED | DISABLED )] [-timeZone ( GMT_TIME | LOCAL_TIME )][-userDefinedAuditlog ( YES | NO )][-appflowExport ( ENABLED | DISABLED )] [-lsn ( ENABLED | DISABLED )][-alg ( ENABLED | DISABLED )] [-subscriberLog ( ENABLED | DISABLED )]` 

Binding audit log policies to global entities

Bind syslog audit log policy in advanced policy framework by using the CLI.

At the command prompt, type:

bind audit syslogGlobal [-globalBindType

unbind audit syslogGlobal [-globalBindType ]

Configuring audit log policy by using the GUI

  1. Navigate toConfiguration > System > Auditing > Syslog.Syslog Auditing
  2. SelectServerstab.
  3. ClickAdd.
  4. In theCreate Auditing Serverpage, populate the relevant fields, and clickCreate.
  5. To add the policy, select thePoliciestab, and clickAdd.
  6. In theCreate Auditing Syslog Policypage, populate the relevant fields, and clickCreate.Syslog Policy
  7. To bind the policy globally, selectAdvanced Policy Global Bindingsfrom the drop-down list. Select thebest_syslog_policy_everpolicy. ClickSelect.
  8. From the drop-down list, select the bind point asSYSTEM_GLOBALand clickBind, and then clickDone.

Configuring policy-based logging

You can configure policy-based logging for rewrite and responder policies. Audit messages are then logged in a defined format when the rule in a policy evaluates to TRUE. To configure policy-based logging, you configure an audit-message action that uses default syntax expressions. To specify the format of the audit messages, and associate the action with a policy. The policy can be bound either globally or to a load balancing or content switching virtual server. You can use audit-message actions to log messages at various log levels, either in syslog format only or in both syslog and new nslog formats.

Prerequisites

  • User Configurable Log Messages (userDefinedAuditlog) option is enabled for when configuring the audit action server to which you want to send the logs in a defined format.
  • The related audit policy is bound to the system global.

Configuring an audit message action

您可以配置审计日志mes消息的行为sages at various log levels. You can do it either in syslog format only or in both syslog and new nslog formats. Audit-message actions use expressions to specify the format of the audit messages.

Create an audit message action by using the CLI

At the command prompt, type:

add audit messageaction    [-logtoNewnslog (YES|NO)] [-bypassSafetyCheck (YES|NO)] 
add audit messageaction log-act1 CRITICAL '"Client:"+CLIENT.IP.SRC+" accessed "+HTTP.REQ.URL' -bypassSafetyCheck YES 

配置an audit message action by using the GUI

Navigate toSystem > Auditing > Message Actions, and create the audit message action.

Binding audit message action to a policy

After you have created an audit message action, you must bind it to a rewrite or responder policy. For more information about binding log message actions to a rewrite or responder policy, seeRewriteorResponder.

配置Audit Server

You can configure a SYSLOG audit server on a Citrix ADC appliance.

配置SYSLOG through Citrix GUI

配置the SYSLOG audit server, complete the following steps:

Note:

These instructions are applicable to a stand-alone Citrix ADC appliance.

  1. Sign into Citrix ADC and navigate toSystem > Auditing > Syslog.
  2. In Servers tab, clickAdd.
  3. In theCreate Auditing Serverpage, set the following parameters:
    1. Auditing Type. Name of the auditing server type, example SYSLOG.
    2. Name. Provide a name to the SYSLOG type auditing server.
    3. Server Type. Select a server type from the drop-down list.
    4. IP Address. Provide an IP address for the SYSLOG server.
    5. Port. Provide the server port number.
    6. Log Levels. Select an audit log level which specifies the events to be logged.
    7. Log Facility. Select a log facility that is assigned to the log message. Log facility values are numbers 0 to 7 (LOCAL0 through LOCAL7). Each number indicates where a specific message originated from, such as the Citrix ADC itself, the VPN, or the external.
    8. Date format. Select the format in which the date must appear in the log message.
    9. Time Zone. Select the time zone for date and timestamps in the log message.
    10. TCP Logging. Select this option to log TCP messages globally.
    11. ACL Logging. Select this option to log access control list messages.
    12. User Configurable Log Messages. Select this option to log user configurable log message globally.
    13. AppFlow Logging. Select this option to export log messages to AppFlow collectors.
    14. Large Scale NAT Logging. Select this option to log lsn information.
    15. ALG messaging Logging. Select this option to log ALG information.
    16. Subscriber Logging. Select this option to log subscriber’s session event information.
    17. DNS. Select this option to log DNS related SYSLOG messages.
    18. SSL interception. Select this option to log SSL Interception event information.
    19. URL Filtering. Select this option to log URL filtering event information.
    20. Content Inspection Logging. Select this option to log content inspection events for ICAP or IPS integration at the global level.
  4. Net Profile. Select a network profile. The SNIP configured in the network profile is as source IP when sending log messages.
  5. Transport Type. Select a transport type for sending audit log messages to a syslog server. Default type is UDP.
  6. Transport Profile. Add a transport profile whose settings are to be applied to the audit server information to tune the TCP connection parameters.
  7. Max Log Data Size to hold. Provide the maximum size of log data that can be held in the NSB chain of server information.
  8. ClickCreate.

For information about SYSLOG parameters, seeAudit SyslogParamscommand reference page.

Configuring Citrix ADC appliance for audit logging