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:The import command is used to download the file content from an external source\或内部来源,到Citrix ADC文件system. To load this file content into one or more packet engines for the first time, use the add command. If there is an update to the file content, the updated content can be downloaded to the Citrix ADC file system by issuing the import command with the overwrite argument. The command updates the contents in the file system. To load the updated content to one or more packet engines, use the update command.

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 [-comment] [-overwrite]

      Example:

      import ns extension http://myhost/path/to/extension myextension -comment “Custom crc calculation

    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 :/var/tmp

      where

      • extension-file-nameis the name of the extension file on your client machine.
      • ns-useridis the Citrix ADC appliance user with permission to write to /var/tmp.
      • ns-ip-addris 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:\ 

      Note:CLI必须be used to import a local extension file, by running theimportcommand.

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

    add ns extension  [-comment ] 

    Example:

    add ns extension myextension 

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  

Note:You can update the extension file only after importing the specified extension file to the Citrix ADC appliance with the -overwrite parameter.

Example:

```update ns extension myextension

### Remove an extension file from the Citrix ADC appliance At the command prompt type:

rm ns extension

**Example:**

rm ns extension myextension

### Display the details of the specified extension function on the Citrix ADC appliance At the command prompt, type:

show ns extension

**Example:**

show ns extension myextension```

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 toAppExpert>Policy Extensions, clickPolicy Extension, from theImport Fromdrop-down list, select the URL for the location of the extension file that you want to import.

    2. Navigate toAppExpert>Policy Extensions,Policy Extensionand import the extension file by selecting File in theImportFrom drop-down list.

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

    Navigate toAppExpert>Policy Extensionsand, on thePolicy Extensionstab, add the extension file.

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

Navigate toAppExpert>Policy Extensionsand, on thePolicy Extensionstab, update the extension file.

Remove an extension file from the Citrix ADC appliance

Navigate toAppExpert>Policy Extensionsand,Policy Extensionstab, remove the extension file.

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

Navigate toAppExpert>Policy Extensionsand, on thePolicy Extensions Functionstab, click the click drop-down list arrow of the extension function that you want to see the details.

Configuring policy extensions