Configuring policy extensions

When your policy extension file is ready, import it to the Citrix ADC appliance. The import process copies the extension file into a directory on the Citrix ADC appliance and checks for syntax errors.

After the import, you have to make the extension file available for use in the policy expressions.

Note:

  • Use the import command to download the file content from an external source \<src\>, or an internal source, onto the NetScaler file system.
  • Use the add command to load the file content into one or more packet engines for the first time.
  • If the file content is updated, you can download the new content to the NetScaler file system by using the import command with the overwrite argument.
  • Use the update command to load the updated content to one or more packet engines.

Configure policy extensions by using the CLI

  1. Import the policy extension file to the Citrix ADC Appliance, from either a web server (using HTTP) or your local workstation.

    1. HTTP Import

      If you have a web server available, you can store the extension file in the webserver directory and import it to the Citrix ADC appliance.

      import ns extension <src> <name> [-comment<string>] [-overwrite]
      <!--NeedCopy-->
      

      Example:

      import ns extension http://myhost/path/to/extension myextension -comment "Custom crc calculation"
      <!--NeedCopy-->
      
    2. Local Import

      You can use the SSH client to copy the extension file from your workstation to the /var/tmp directory of the Citrix ADC appliance

      scp extension-file-name <ns-userid@ns-ip-addr>:/var/tmp
      <!--NeedCopy-->
      

      where,

      • extension-file-name is the name of the extension file on your client machine.
      • ns-userid is the Citrix ADC appliance user with permission to write to /var/tmp.
      • ns-ip-addr is the Citrix ADC IP address.

      After copying the file to the Citrix ADC appliance, run the import command on the Citrix ADC appliance.

      import ns extension local:<extension-file-name> <extension-name>
      <!--NeedCopy-->
      

      Note:

      The CLI must be used to import a local extension file, by running the import command.

  2. Add the policy extension to the packet engine for evaluation.

    add ns extension <name> [-comment <string>]
    <!--NeedCopy-->
    

    Example:

    add ns extension myextension
    <!--NeedCopy-->
    

After an extension file is imported, you can update it, if you included the -overwrite parameter in the import command, or remove it. You can also display the details of an imported extension file.

Update an extension file on the Citrix ADC appliance from the source

At the command prompt, type:

update ns extension <name>
<!--NeedCopy-->

Note:

You can update the extension file only after importing the specified extension file to the NetScaler appliance with the -overwrite parameter.

Example:

update ns extension myextension
<!--NeedCopy-->

Remove an extension file from the Citrix ADC appliance

At the command prompt type:

rm ns extension <name>
<!--NeedCopy-->

Example:

rm ns extension myextension
<!--NeedCopy-->

Display the details of the specified extension function on the Citrix ADC appliance

At the command prompt, type:

show ns extension <name>
<!--NeedCopy-->

Example:

show ns extension myextension
<!--NeedCopy-->

Configure policy extensions by using the GUI

  1. Import the policy extension file to the Citrix ADC Appliance, from either a web server (using HTTP) or your local workstation.

    1. Navigate to AppExpert > Policy Extensions, click Policy Extension, from the Import From drop-down list, select the URL for the location of the extension file that you want to import.

    2. Navigate to AppExpert > Policy Extensions, and on the Policy Extension tab, import the extension file by selecting File in the Import From drop-down list.

  2. Add the policy extension to the packet engine for evaluation.

    Navigate to AppExpert > Policy Extensions, and on the Policy Extensions tab, add the extension file.

Update an extension file on the Citrix ADC appliance from the source

Navigate to AppExpert > Policy Extensions, and on the Policy Extensions tab, update the extension file.

Remove an extension file from the Citrix ADC appliance

Navigate to AppExpert > Policy Extensions, and on the Policy Extensions tab, remove the extension file.

Display the details of the specified extension function on the Citrix ADC appliance

Navigate to AppExpert > Policy Extensions, and on the Policy Extensions Functions tab, click the drop-down list arrow of the extension function that you want to see the details.

Configuring policy extensions