Search
  • Chris Keim

How to Configure NSLOG for NetScaler Audit Logging

  1. <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/vs2015.min.css">

  2. <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>

  3. <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/powershell.min.js"></script>

  4. <script>hljs.initHighlightingOnLoad();</script>

  5. <pre>

  6. <code>This guide is to get you up and going quickly with auditing NetScaler with NSLOG server.


Preapare the Linux VM


For the Linux VM, I used CentOS 6.2 hosted on XenServer 6.0.


  1. Install the Linux OS, give it a static IP address, load any hypervisor tools necessary.

  2. Download the "Audit Server Utilities" from mycitrix.com.  The documentation for the process by Citrix states to connect and download via FTP, but that method is no longer available.

  3. For my Linux OS install I had to install some pre-requisites ("yum install libc.so.6").

  4. Extract the files downloaded earlier and run the following command.

5. After the install completes, the following directories will have been created.

6. Navigate to /usr/local/netscaler/bin and run the following command to configure the NetScaler IP address and credentials in the NSLOG server.


7. Modify the IP address of the NSLOG server in the auditlog.conf file by navigating to /usr/local/netscaler/etc and use a text editor to open the auditlog.conf file.  I used VI in this case.  Find the line that starts with "MYIP" and add the NSLOG server's IP address.

8. Verify the syntax of auditlog.conf with the following commands.

9. Start the NSLOG server audit logging with the following command.

There are a few options to configure in the auditlog.conf if you wish, like frequency of log files, location, et... For more information about configuring the auditlog.conf http://support.citrix.com/proddocs/topic/netscaler/ns-gen-netscaler93-wrapper-con.html.


Prepare NetScaler for Auditing with NSLOG

  1. Log in to the NetScaler and go to System \ Auditing \ Policies and then click on the "Servers" tab.

  2. Create a new server and add the IP address of your NSLOG server with the default port of 3023.

  3. Configure your auditing options.

  4. Make sure you set the "Auditing Type" to NSLOG.

  5. Click "OK" when done.

  6. Go to the "Policies" tab.

  7. Create a new policy by clicking on "Add".

  8. Set the "Auditing Type" to NSLOG.

  9. Select the server you just created and click "OK".

  10. Click on "Global Bindings".

  11. Click on "Insert Policy" and select the policy you just created.

  12. Click "OK" when done.


For more information on further configuration of auditing parameters http://support.citrix.com/proddocs/topic/netscaler/ns-gen-netscaler93-wrapper-con.html.


Viewing Your Logs

Now you will start to see your logs in the default directory /usr/local/netscaler/bin, or in the directory if you chose to modify the auditlog.conf file.

©2018 by ChristopherKeim. Proudly created with Wix.com