Adding or deleting a custom whitelist rule using the CLI

Prev Next

Use the CLI commands in this topic to add a rule to a custom whitelist or to delete a rule from a custom whitelist. You can add up to 10,000 whitelist entries to the appliance database.

To add rules to a custom whitelist:
  1. Go to CLI configuration mode.

    hostname > enable
    hostname # configure terminal
  2. Specify the type of rule to add to a custom whitelist.

    • To add a whitelist rule based on an eight-digit signature ID:

      hostname (config) # analysis custom whitelist signature-id <id>
    • To add a whitelist rule based on the URL:

      hostname (config) # analysis custom whitelist url <URL>
    • To add a whitelist rule based on the SHA-256 hash file:

      hostname (config) # analysis custom whitelist sha256 <sha256>
  3. Verify that the specified signature ID and SHA-256 hash file are added to the custom whitelist.

    hostname (config) # show analysis custom whitelist
  4. Verify that the specified URLs are added to the custom whitelist.

    hostname (config) # show analysis custom whitelist urls
  5. Save your changes.

    hostname (config) # write memory

Examples

  • This example adds the URL "trackeragain.keymedia.com/?id=124375" to a custom whitelist:

    hostname (config) # analysis custom whitelist url trackeragain.keymedia.com/?id=124375

    Successfully performed add operation on url:trackeragain.keymedia.com/?id=12437

    hostname (config) # show analysis custom whitelist urls Successfully fetched url whitelist Custom Whitelist URLs: ; http://hsych.com/channel-9.html1491201030.73.7242 http://trackeragain.keymedia.com/?id=124375

  • This example confirms that the URL "trackeragain.keymedia.com/?id=124375" was already added:

    hostname (config) # analysis custom whitelist url trackeragain.keymedia.com/?id=124375 % Unable to add: url already exists

  • This example adds the SHA-256 hash file "2ff34afe77d5dd3b92c4d9c6bc1003870580e2d7a51ace181c0fc6fac62bd881" to the whitelist:

    hostname (config) # analysis custom whitelist sha256 2ff34afe77d5dd3b92c4d9c6bc1003870580e2d7a51ace181c0fc6fac62bd881

  • This example adds the signature ID "13456789" to the whitelist:

    hostname (config) # analysis custom whitelist signature-id 13456789

  • This example shows that the specified SHA-256 hash file and signature ID are added to the custom whitelist:

    hostname # show analysis custom whitelist Custom Whitelists: 2ff34afe77d5dd3b92c4d9c6bc1003870580e2d7a51ace181c0fc6fac62bd881 Signature ID Whitelist: 13456789

To delete rules from a custom whitelist:
  1. Go to CLI configuration mode.

    hostname > enable
    hostname # configure terminal
  2. Specify the type of rule to delete from a custom whitelist.

    • To delete a whitelist rule based on the URL:

      hostname (config) # no analysis custom whitelist url <URL>

    • To delete a whitelist rule based on the SHA-256 hash file:

      hostname (config) # no analysis custom whitelist sha256 <sha256>

    • To delete a whitelist rule based on an eight-digit signature ID:

      hostname (config) # no analysis custom whitelist signature-id <id>

  3. Verify that the specified signature ID and SHA-256 hash file are deleted from the custom whitelist.

    hostname (config) # show analysis custom whitelist

  4. Verify that the specified URLs are deleted from the custom whitelist.

    hostname (config) # show analysis custom whitelist urls

  5. Save your changes.

    hostname (config) # write memory

Examples

  • This example deletes the URL "trackeragain.keymedia.com/?id=124375" from a custom whitelist:

    hostname (config) # no analysis custom whitelist url trackeragain.keymedia.com/?id=124375 Successfully performed delete operation on url: trackeragain.keymedia.com/?id=124375

    hostname # show analysis custom whitelist urls Successfully fetched url whitelist Custom Whitelist URLs: http://hsych.com/channel-9.html1491201030.73.7242

  • This example confirms that the URL no longer exists:

    hostname (config) # no analysis custom whitelist url trackeragain.keymedia.com/?id=124375 % Unable to delete: url not found

  • This example deletes the signature ID "13456789" from the whitelist:

    hostname (config) # no analysis custom whitelist signature-id 13456789

  • This example deletes the SHA-256 hash file "2ff34afe77d5dd3b92c4d9c6bc1003870580e2d7a51ace181c0fc6fac62bd881" from the whitelist:

    hostname (config) # no analysis custom whitelist sha256 2ff34afe77d5dd3b92c4d9c6bc1003870580e2d7a51ace181c0fc6fac62bd881

  • This example shows that the SHA-256 hash file and signature ID are deleted from the custom whitelist:

    hostname (config) # show analysis custom whitelist No whitelisted signature-ids.