Palo Alto Networks Knowledgebase: How to delete a custom URL category from the CLI

How to delete a custom URL category from the CLI

2225
Created On 02/07/19 23:53 PM - Last Updated 02/07/19 23:53 PM
Resolution

Overview

 

This document describes how to delete a custom URL category from the PAN-OS CLI.

 

Details

 

note: in a multi-vsys environment add 'shared' or 'vsys vsysX' after the show or delete command to address the appropriate space

 

  • To view the custom URL categories on CLI:
admin@anuragFW> configure
Entering configuration mode
[edit]
admin@anuragFW# show profiles custom-url-category

custom-url-category {
samtest {
list [ */*=dying */*+dying];
description "wildcards";
}
Dropbox {
list [ *.dropbox.com/ dropbox.com/];
}
portquiz {
list portquiz.net;
description "Website that works on all ports";
}
Blockedpage {
list [ */*=blockedPage */*+blockedPage];
}
}
[edit]

 

To delete a custom URL category from the CLI:

admin@anuragFW# delete profiles custom-url-category

Blockedpage Blockedpage
Dropbox Dropbox
portquiz portquiz
samtest samtest
<name> <name>

admin@anuragFW# delete profiles custom-url-category portquiz

[edit]

 

 

Note: Ensure the custom category being deleted is not in use in any Security rule or URL filtering profile. Otherwise, the system won't let the category be deleted.

 

admin@anuragFW# delete profiles custom-url-category samtest

Server error : samtest cannot be deleted because of references from:
profiles -> url-filtering -> mydefault -> allow
profiles -> url-filtering -> mydefault -> credential-enforcement -> allow
[edit]

 

To fix this, delete the custom category from the URL filtering profiles action and credential-enforcement:

 

admin@anuragFW#delete profiles url-filtering mydefault allow samtest 

[edit]       
admin@anuragFW#delete profiles url-filtering mydefault credential-enforcement allow samtest

[edit]

 

Or set the action and credential submission for the custom URL category, in the URL filtering profile, to be 'None' in the GUI.URLcategory.JPGChoose the action as 'None' to make the custom URL category ineffective

 

 

Additional resources

How to Create Custom URL Categories

Complete List of PAN-DB URL Filtering Categories

 

 

owner: ansharma



Attachments
Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClMqCAK&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Attachments
Choose Language