No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

AR500, AR510, and AR530 V200R007 Commands Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
URL Filtering Configuration Commands

URL Filtering Configuration Commands

NOTE:
  • Among the AR500 series routers, only AR503GW-LM7, AR503GW-LcM7, AR509G-L-D-H, AR509GW-L-D-H, support URL filtering function.

  • AR530 series support URL filtering function.

add { url | host } (predefined URL category view)

Function

The add { url | host } command adds a URL or domain name rule to a predefined category.

The undo add { url | host } command removes a URL or domain name rule from a predefined category.

Format

add { url url-text | host host-text }

undo add { url { url-text | all } | host { host-text | all } }

Parameters

Parameter Description Value
url-text

Specifies a URL rule.

The value is a character string. If the URL does not contain any space or question mark (?), the length is 4 to 80 characters. If the URL contains spaces or question marks (?) (not at the end), the URL must be enclosed by double quotation marks ("") and the length is 6 to 82 characters. Pre-processing removes http:// from the entered character string.

If the URL contains double quotation marks (""), you need to replace them with escape characters "%22". For example, if the URL is www.example.com/abc/def?"gh, you need to enter www.example.com/abc/def?%22gh.

* indicates wildcard, which appears at the beginning or end of a URL. * appearing in the middle of a character string functions as a common character, not wildcard. For example, in URLs **abc and *a*bc, the first * is wildcard, and the second * is a common character.

If a URL does not contain any wildcard, the URL must contain at least four consecutive characters, such as abcd. If the URL contains wildcard, it must contain at least three consecutive characters except the wildcard, such as *abc, *abc*, **ab, and *a*b.

url all

Indicates all URL rules.

-

host-text

Specifies a domain name.

The value is a character string and the length is 4 to 80 characters, without special character slash (/), back slash (\), number sign (#), double quotation mark ("), question mark (?), or space.

* indicates wildcard, which appears at the beginning or end of a domain name. * appearing in the middle of a character string functions as a common character, not wildcard. For example, in domain names **abc and *a*bc, the first * is wildcard, and the second * is a common character.

If a domain name does not contain any wildcard, the domain name must contain at least four consecutive characters, such as abcd. If the domain name contains wildcard, it must contain at least three consecutive characters except the wildcard, such as *abc, *abc*, **ab, and *a*b.

host all

Indicates all domain name rules.

-

Views

Predefined URL category view

Default Level

2: Configuration level

Usage Guidelines

Before you add a URL rule to a predefined URL category, run the display url-filter category pre-defined command to view the subcategory-id of the predefined URL category. Then run the url-filter category pre-defined subcategory-id subcategory-id command to access the predefined URL category view and add the desired URL rule.

Run the display url-filter category pre-defined subcategory-id subcategory-id command to view existing user-defined URL and domain name rules in the predefined URL category view.

Example

# Add a URL rule www.example.com/news to the predefined category General Fashion, and set the matching mode to Exact.

<Huawei> system-view
[Huawei] url-filter category pre-defined subcategory-id 200
[Huawei-cate-pre-defined-200] add url www.example.com/news

# Add a domain name rule www.example.com to the predefined category General Fashion, and set the matching mode to Exact.

<Huawei> system-view
[Huawei] url-filter category pre-defined subcategory-id 200
[Huawei-cate-pre-defined-200] add host www.example.com

# Add a URL rule fashion to the predefined category General Fashion, and set the matching mode to Keyword.

<Huawei> system-view
[Huawei] url-filter category pre-defined subcategory-id 200
[Huawei-cate-pre-defined-200] add url *fashion*

add { blacklist | whitelist } (URL filtering profile view)

Function

The add { blacklist | whitelist } command adds blacklist and whitelist rules to the URL filtering profile.

The undo add { blacklist | whitelist } command removes blacklist and whitelist rules from the URL filtering profile.

Format

add { blacklist | whitelist } { url url-text | host host-text }

undo add { blacklist | whitelist } { url { url-text | all } | host { host-text | all } | all }

Parameters

Parameter Description Value
blacklist

Indicates a blacklist rule.

-

whitelist

Indicates a whitelist rule.

-

url-text

Specifies a URL rule.

The value is a character string. If the URL does not contain any space or question mark (?), the length is 4 to 80 characters. If the URL contains spaces or question marks (?) (not at the end), the URL must be enclosed by double quotation marks ("") and the length is 6 to 82 characters. Pre-processing removes http:// from the entered character string.

If the URL contains double quotation marks (""), you need to replace them with escape characters "%22". For example, if the URL is www.example.com/abc/def?"gh, you need to enter www.example.com/abc/def?%22gh.

* indicates wildcard, which appears at the beginning or end of a URL. * appearing in the middle of a character string functions as a common character, not wildcard. For example, in URLs **abc and *a*bc, the first * is wildcard, and the second * is a common character.

If a URL does not contain any wildcard, the URL must contain at least four consecutive characters, such as abcd. If the URL contains wildcard, it must contain at least three consecutive characters except the wildcard, such as *abc, *abc*, **ab, and *a*b.

url all

Indicates all URL rules.

-

host-text

Specifies a domain name rule.

The value is a character string and the length is 4 to 80 characters, without special character slash (/), back slash (\), number sign (#), double quotation mark ("), question mark (?), or space.

* indicates wildcard, which appears at the beginning or end of a domain name. * appearing in the middle of a character string functions as a common character, not wildcard. For example, in domain names **abc and *a*bc, the first * is wildcard, and the second * is a common character.

If a domain name does not contain any wildcard, the domain name must contain at least four consecutive characters, such as abcd. If the domain name contains wildcard, it must contain at least three consecutive characters except the wildcard, such as *abc, *abc*, **ab, and *a*b.

host all

Indicates all domain name rules.

-

all

Indicates all URL and domain name rules.

-

Views

URL filtering profile view

Default Level

2: Configuration level

Usage Guidelines

  • Blacklist

    Enterprises can define a blacklist to block the access to specified websites, improve work efficiency, and optimize network resource usage.

    If a requested URL matches the blacklist, the Router blocks the access to the requested website.

  • Whitelist

    Enterprises can define a whitelist to allow uncontrolled access to URLs on the whitelist.

    If a requested URL matches the whitelist, the Router grants access to the requested website.

Example

# Create a URL filtering profile profile_development, and add www.example.com to the blacklist.

<Huawei> system-view
[Huawei] profile type url-filter name profile_development
[Huawei-profile-url-filter-profile_development] add blacklist url www.example.com

add { url | host } (user-defined URL category view)

Function

The add { url | host } command adds a URL or domain name rule to a user-defined category.

The undo add { url | host } command removes a URL or domain name rule from a user-defined category.

Format

add { url url-text | host host-text }

undo add { url { url-text | all } | host { host-text | all } }

Parameters

Parameter Description Value
url-text

Specifies a URL rule.

The value is a character string. If the URL does not contain any space or question mark (?), the length is 4 to 80 characters. If the URL contains spaces or question marks (?) (not at the end), the URL must be enclosed by double quotation marks ("") and the length is 6 to 82 characters. Pre-processing removes http:// from the entered character string.

If the URL contains double quotation marks (""), you need to replace them with escape characters "%22". For example, if the URL is www.example.com/abc/def?"gh, you need to enter www.example.com/abc/def?%22gh.

* indicates wildcard, which appears at the beginning or end of a URL. * appearing in the middle of a character string functions as a common character, not wildcard. For example, in URLs **abc and *a*bc, the first * is wildcard, and the second * is a common character.

If a URL does not contain any wildcard, the URL must contain at least four consecutive characters, such as abcd. If the URL contains wildcard, it must contain at least three consecutive characters except the wildcard, such as *abc, *abc*, **ab, and *a*b.

url all

Indicates all URL rules.

-

host-text

Specifies a domain name.

The value is a character string and the length is 4 to 80 characters, without special character slash (/), back slash (\), number sign (#), double quotation mark ("), question mark (?), or space.

* indicates wildcard, which appears at the beginning or end of a domain name. * appearing in the middle of a character string functions as a common character, not wildcard. For example, in domain names **abc and *a*bc, the first * is wildcard, and the second * is a common character.

If a domain name does not contain any wildcard, the domain name must contain at least four consecutive characters, such as abcd. If the domain name contains wildcard, it must contain at least three consecutive characters except the wildcard, such as *abc, *abc*, **ab, and *a*b.

host all

Indicates all domain name rules.

-

Views

User-defined URL category view

Default Level

2: Configuration level

Usage Guidelines

None

Example

# Add a URL rule www.example.com in the view of user-defined URL category abc and set the matching mode to Exact.

<Huawei> system-view
[Huawei] url-filter category user-defined name abc
[Huawei-cate-user-defined-abc] add url www.example.com

# Add a URL rule bbs in the view of user-defined abc and set the matching mode to Keyword.

<Huawei> system-view
[Huawei] url-filter category user-defined name abc
[Huawei-cate-user-defined-abc] add url *bbs*

# Add domain name rule www.example.com in the view of user-defined category abc and set the matching mode to Exact.

<Huawei> system-view
[Huawei] url-filter category user-defined name abc
[Huawei-cate-user-defined-abc] add host www.example.com

category action

Function

The category action command specifies the action for a URL category.

The undo category action command specifies the default action for a URL category to allow.

Format

category { pre-defined [ category-id category-id | subcategory-id subcategory-id ] | user-defined [ name category-name ] } action { allow | alert | block }

undo category { pre-defined [ category-id category-id | subcategory-id subcategory-id ] | user-defined [ name category-name ] } action

Parameters

Parameter Description Value
pre-defined Indicates the predefined URL category. -
category-id Specifies the ID of a predefined URL category. The value is an integer ranging from 1 to 100.
subcategory-id Specifies the ID of a predefined URL subcategory. The value is an integer ranging from 101 to 60000.
user-defined Indicates the user-defined URL category. -
category-name Specifies the name of a user-defined URL category. The URL category have been configured.
allow Sets the category action to allow. -
block Sets the category action to block. -
alert Sets the category action to alert and records URL filtering logs. -

Views

URL filtering profile view

Default Level

2: Configuration level

Usage Guidelines

The dscp-value can only be set when the corresponding action of the URL category is configured as allow.

Run the display url-filter category pre-defined command to display the subcategory-id of the specified predefined URL category.

Example

# Set the action for the predefined category P2P to block in the URL filtering profile view.

<Huawei> system-view
[Huawei] profile type url-filter name profile_development
[Huawei-profile-url-filter-profile_development] category pre-defined subcategory-id 101 action block

category action mode

Function

The category action mode command configures the action mode of URL filtering.

The undo category action mode command restores the default setting.

Format

category action mode { strict | loose }

undo category action mode

Parameters

Parameter Description Value
strict

Indicates the strict mode.

-

loose

Indicates the loose mode.

-

Views

URL filtering profile view

Default Level

2: Configuration level

Usage Guidelines

The default action mode for URL categories is the strict mode.

If a URL belongs to multiple categories, the Router takes an action based on the action mode.

  • Strict: The Router takes the strictest action among all matched categories. For example, a URL belongs to two categories, and the actions are Alert and Block. In this case, the Router takes the Block action.

  • Loose: The Router takes the loosest action among all matched categories. For example, a URL belongs to two categories, and the actions are Alert and Block. In this case, the Router takes the Alert action.

Example

# Set the action mode of URL filtering to the loose mode.

<Huawei> system-view
[Huawei] profile type url-filter name profile_development
[Huawei-profile-url-filter-profile_development] category action mode loose

category pre-defined control-level

Function

The category pre-defined control-level command configures a control level for a predefined URL category.

The undo category pre-defined control-level command restores the default control level for a predefined URL category.

By default, the control level of a predefined URL category is low.

Format

category pre-defined control-level { high | low | medium }

undo category pre-defined control-level

Parameters

Parameter Description Value
high Indicates a high control level. -
low Indicates a low control level. -
medium Indicates a medium control level. -

Views

URL filtering profile view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A predefined URL category classifies all URLs into hundreds of subcategories. If actions are configured for each type of URL, the workload is heavy.

To simplify user configurations, the device defines three control levels: high, medium, and low.

Precautions

This command is valid for only predefined URL categories.

After this command is used to configure an action for a URL category, and then the category pre-defined action command is used to configure an action for a predefined URL category, the new configuration takes effect.

Example

# Set the control level for predefined URL categories to medium in the URL filtering profile view.

<Huawei> system-view
[Huawei] profile type url-filter name profile_development
[Huawei-profile-url-filter-profile_development] category pre-defined control-level medium

default action

Function

The default action command sets the default action for a URL filtering profile.

The undo default action command sets the default action for a URL filtering profile to allow.

Format

default action { allow | block | alert }

undo default action

Parameters

Parameter Description Value
allow Sets the default action to allow. -
block Sets the default action to block. -
alert Sets the default action to alert. -

Views

URL filtering profile view

Default Level

2: Configuration level

Usage Guidelines

None

Example

# Set the default action for the URL filtering profile profile_development to block in the URL filtering profile view.

<Huawei> system-view
[Huawei] profile type url-filter name profile_development
[Huawei-profile-url-filter-profile_development] default action block

description (URL filtering profile view)

Function

The description command configures a description for a URL filtering profile.

The undo description command deletes a description of a URL filtering profile.

By default, no description is configured for a URL filtering profile.

Format

description description

undo description

Parameters

Parameter

Description

Value

description

Specifies the description of a URL filtering profile.

The value is a string of 1 to 128 case-sensitive characters.

Views

URL filtering profile view

Default Level

2: Configuration level

Usage Guidelines

You can run this command to configure an easy-to-remember description for a URL filtering profile to facilitate management. You are advised to configure the characteristics of a URL filtering profile, for example, usage and applicable scenario of the profile.

Example

# Configure a description for the URL filtering profile abc.

<Huawei> system-view
[Huawei] profile type url-filter name abc
[Huawei-profile-url-filter-abc] description for marketing

description (user-defined URL category view)

Function

The description command configures a description for a user-defined URL category.

The undo description command deletes a description of a user-defined URL category.

By default, no description is configured for a user-defined URL category.

Format

description description

undo description

Parameters

Parameter Description Value
description Specifies the description of a user-defined URL category. The value is a string of 1 to 127 case-sensitive characters.

Views

User-defined URL category view

Default Level

2: Configuration level

Usage Guidelines

You can run this command to configure an easy-to-remember description for a user-defined URL category to facilitate management. You are advised to configure the characteristics of a user-defined URL category, for example, usage and applicable scenario of the user-defined URL category.

Example

# Configure a description for the user-defined URL category abc.

<Huawei> system-view
[Huawei] url-filter category user-defined name abc
[Huawei-category-user-defined-abc] description for research

display profile type url-filter

Function

The display profile type url-filter command displays information about URL filtering profiles.

Format

display profile type url-filter

display profile type url-filter name name [ blacklist [ url url-text | host host-text ] | whitelist [ url url-text | host host-text ] | pre-defined [ category-id category-id | subcategory-id subcategory-id ] | user-defined [ name category-name ] ]

Parameters

Parameter Description Value
name

Indicates the name of a URL filtering profile.

The value must be the name of an existing URL filtering profile.

blacklist

Indicates the URL blacklist of the URL filtering profile.

-

whitelist

Indicates the URL whitelist of the URL filtering profile.

-

url-text

Specifies a URL rule.

-

host-text

Specifies a domain name rule.

-

pre-defined

Indicate the predefined category.

-

category-id

Indicates the ID of a predefined URL category.

The value is an integer ranging from 1 to 100.

subcategory-id

Indicates the ID of a predefined URL subcategory.

The value is an integer ranging from 101 to 60000.

user-defined

Specifies a user-defined category.

-

category-name

Indicates the name of a user-defined URL category.

The URL category must have been configured.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

None

Example

# Display configuration information about all URL filtering profiles.

<Huawei> display profile type url-filter 
--------------------------------------------------------------------------------
  URL Filtering Profile Configurations:
  Total Profiles: 2
--------------------------------------------------------------------------------
  Name        : abc
  Description : -
  Referenced  : 0
--------------------------------------------------------------------------------
  Default Action : Block
--------------------------------------------------------------------------------
  Action Mode    : Strict
--------------------------------------------------------------------------------
  Blacklist Configurations:
--------------------------------------------------------------------------------
  Type                Blacklist
--------------------------------------------------------------------------------
  url                 www.example.com
  host                www.example.com
--------------------------------------------------------------------------------
  Whitelist Configurations:
--------------------------------------------------------------------------------
  Type                Whitelist
--------------------------------------------------------------------------------
  url                 www.example.org
  host                www.example.org
--------------------------------------------------------------------------------
  URL Pre-defined Category Configurations:
  Codes: CID(Category ID), CN(CategoryName), SID(Subcategory ID),
         SN(Subcategory Name)
--------------------------------------------------------------------------------
  CID CN                 SID   SN                                         Action
--------------------------------------------------------------------------------
  1   P2P                   
                         101   P2P                                        Allow 
  2   Download              
                         102   e-Books                                    Allow 
                         162   Software Download                          Allow 
                         163   Picture Download                           Block
                         164   Music/Film Download                        Allow 
                         165   General Download                           Allow
--------------------------------------------------------------------------------
  URL User-defined Category Configurations:
--------------------------------------------------------------------------------
  CID CN                 SID   SN                                         Action
--------------------------------------------------------------------------------
  100 User-defined                   
                         6001  abc                                        Allow 
                         6002  def                                        Block 
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------   
  Name        : default                                                             
  Description : -                                                                   
  Referenced  : 0                                                                  
--------------------------------------------------------------------------------    
  Default Action : Allow                                                            
--------------------------------------------------------------------------------    
  Action Mode    : Strict                                                         
--------------------------------------------------------------------------------  
  Blacklist Configurations:                                                       
--------------------------------------------------------------------------------  
  Type                Blacklist
--------------------------------------------------------------------------------    
--------------------------------------------------------------------------------    
  Whitelist Configurations:                                                         
--------------------------------------------------------------------------------    
  Type                Whitelist
--------------------------------------------------------------------------------   
--------------------------------------------------------------------------------   
  URL Pre-defined Category Configurations:                                       
  Codes: CID(Category ID), CN(CategoryName), SID(Subcategory ID),                 
         SN(Subcategory Name)                                                    
-------------------------------------------------------------------------------- 
  CID CN                 SID   SN                                         Action 
-------------------------------------------------------------------------------- 
  1   P2P                                                                       
                         101   P2P                                        Allow 
  2   Download                                                                  
                         102   e-Books                                    Allow 
                         162   Software Download                          Allow 
                         163   Picture Download                           Allow 
                         164   Music/Film Download                        Allow 
                         165   General Download                           Allow  
--------------------------------------------------------------------------------
  URL User-defined Category Configurations:
--------------------------------------------------------------------------------
  CID CN                 SID   SN                                         Action
--------------------------------------------------------------------------------
  100 User-defined                   
                         6001  abc                                        Block
                         6002  def                                        Block 
--------------------------------------------------------------------------------
Table 14-71  Description of the display profile type url-filter command output

Item

Description

Name Name of the URL filtering profile
Description Description of the URL filtering configuration file
Referenced Referenced count
Default Action Default action for the URL filtering profile
Action Mode

Action mode:

  • Strict
  • Loose
Blacklist Configurations Blacklist configuration
Whitelist Configurations Whitelist configuration
Type Match type
Blacklist URL blacklist
Whitelist URL whitelist
url URL
host Domain name
URL Pre-defined Category Configurations Predefined URL categories
CID ID of a predefined URL category
CN Name of a predefined URL category
SID ID of a predefined URL subcategory
SN Name of a predefined URL subcategory
Action Available actions:
  • Allow
  • Block
  • Alert
URL User-defined Category Configurations User-defined URL category

display url-filter category

Function

The display url-filter category command displays the URL category list.

Format

display url-filter category [ pre-defined [ category-id category-id | subcategory-id subcategory-id | url url-text | host host-text ] | user-defined [ name category-name | url url-text | host host-text ] ]

Parameters

Parameter Description Value
category-id

Indicates the ID of a predefined URL category.

The value is an integer ranging from 1 to 100.

subcategory-id

Indicates the ID of a predefined URL subcategory.

The value is an integer ranging from 101 to 60000.

url-text

Specifies a URL rule.

-

host-text

Specifies a domain name rule.

-

category-name

Indicates the name of a user-defined URL category.

The category must have been configured.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

None

Example

# Display the URL category list.

<Huawei> display url-filter category
--------------------------------------------------------------------------------
  URL Pre-defined Category Count: 138
  URL Pre-defined Category List:
  Codes: CID(Category ID), CN(CategoryName), SID(Subcategory ID),
         SN(Subcategory Name)
--------------------------------------------------------------------------------
  CID   CN                       SID   SN                                
--------------------------------------------------------------------------------
  1     P2P                   
                                 101   P2P                                       
  2     Download              
                                 102   e-Books                                   
                                 162   Software Download                         
                                 163   Picture Download                          
                                 164   Music/Film Download                       
--------------------------------------------------------------------------------
  URL User-defined Category Count: 1
  URL User-defined Category List:
--------------------------------------------------------------------------------
  CID    CN                     SID      SN                                
--------------------------------------------------------------------------------
  100    User-defined
                                60001 abc                                       
                                60001 def                                       
--------------------------------------------------------------------------------
Table 14-72  Description of the display url-filter category command output
Item Description
URL Pre-defined Category Count Number of predefined URL categories
URL Pre-defined Category List List of predefined URL categories
CID Category ID
CN Category name
SID Subcategory ID
SN Subcategory name
URL User-defined Category Count Number of user-defined URL categories
URL User-defined Category List List of user-defined URL categories

# Display the predefined category with category ID 2.

<Huawei> display url-filter category pre-defined category-id 2
--------------------------------------------------------------------------------
  Category Name        : Download                                               
  Category ID          : 2                                                      
  Category Description : Web sites related to download.                         
  102   e-Books                                                                 
  162   Software Download                                                       
  163   Picture Download                                                        
  164   Music/Film Download                                                     
  165   General Download                                                        
--------------------------------------------------------------------------------
Table 14-73  Description of the display url-filter category pre-defined category-id 2 command output
Item Description
Category Name Category name
Category ID Category ID
Category Description Category description

# Display the information about predefined subcategory 101.

<Huawei> display url-filter category pre-defined subcategory-id 101
--------------------------------------------------------------------------------
  Subcategory Name        : P2P
  Subcategory ID          : 101
  Subcategory Description : Web sites that provide the introduction to and download of P2P 
resources, these Web sites are always bound to contain P2P tools such as Thunder and VeryCD, 
providing seed download, search, and release
  Category Name           : P2P
  Category ID             : 1
--------------------------------------------------------------------------------
  Subcategory Configuration Information: 
--------------------------------------------------------------------------------
                            User-defined URLs/HOSTs
                              (Count: 2)
--------------------------------------------------------------------------------
  Type                  URLs/HOSTs
--------------------------------------------------------------------------------
  url                   www.example.com.com
  host                  www.example.com
--------------------------------------------------------------------------------
Table 14-74  Description of the display url-filter category pre-defined subcategory-id 101 command output
Item Description
Subcategory Name Name of a predefined URL subcategory
Subcategory ID ID of a predefined URL subcategory
Subcategory Description Description of a user-defined subcategory
Category Name Name of a predefined URL category
Category ID ID of a predefined URL category
Subcategory Configuration Information Subcategory configuration
User-defined URLs/HOSTs User-defined URL or domain name
Count Total number user-defined URLs or domain names
Type Match type

# Display the information about the user-defined category abc.

<Huawei> display url-filter category user-defined name abc
--------------------------------------------------------------------------------
  Category Name          : abc
  Category ID            : 60001
  Category Description : -
--------------------------------------------------------------------------------
                                    User-defined URLs/HOSTs                              
                                          (Count : 2)
--------------------------------------------------------------------------------
  Type                 URLs/HOSTs
--------------------------------------------------------------------------------
  url                  www.example.com.com
  host                 www.example.com                                    
--------------------------------------------------------------------------------
Table 14-75  Description of the display url-filter category user-defined name abc command output
Item Description
Category Name Name of a user-defined URL category.
Category ID ID of a user-defined URL category
Category Description Description of a user-defined URL category
User-defined URLs/HOSTs User-defined URL or domain name
Count Total number user-defined URLs or domain names
Type Match type

# Display the rules containing example.com in the user-defined category.

<Huawei> display url-filter category user-defined host example.com
--------------------------------------------------------------------------------
  Matched Count : 2
  Matched Result Information: 
  Codes: SID(Subcategory ID), SN(Subcategory Name)
--------------------------------------------------------------------------------
  SID    SN                               Matched URLs/HOSTs
--------------------------------------------------------------------------------
  60001  abc                              www.example.com
  60002  def                              www.example.com/abc
--------------------------------------------------------------------------------
Table 14-76  Description of the display url-filter category user-defined host example.com command output
Item Description
Matched Count Match count
Matched Result Information Match result
SID Subcategory ID
SN Subcategory name
Matched URLs/HOSTs Matched URL or domain name

display url-filter category pre-defined control-level

Function

The display url-filter category pre-defined control-level command displays information about all predefined URL categories with a specified control level.

Format

display url-filter category pre-defined control-level [ high | low | medium ]

Parameters

Parameter Description Value
high Displays information about all predefined URL categories with a high control level. -
low Displays information about all predefined URL categories with a low control level. -
medium Displays information about all predefined URL categories with a medium control level. -

Views

All views

Level

3: Management level

Usage Guidelines

After a control level is configured for predefined URL categories using the category pre-defined control-level command, you can run the display url-filter category pre-defined control-level command to view actions of all predefined URL categories with the specified control level.

Example

# Display information about predefined URL categories with a low control level.

<Huawei> display url-filter category pre-defined control-level low
--------------------------------------------------------------------------------
  Control Level: Low                                                            
  URL Pre-defined Category Configurations:                                      
  Codes: CID(Category ID), CN(CategoryName), SID(Subcategory ID),                  
         SN(Subcategory Name)                                                   
--------------------------------------------------------------------------------
  CID CN                   SID   SN                                       Action
--------------------------------------------------------------------------------
  1   P2P                                                                       
                         101   P2P                                        Allow 
  2   Download                                                                  
                         102   e-Books                                    Allow 
                         162   Software Download                          Allow 
                         163   Picture Download                           Allow 
                         164   Music/Film Download                        Allow 
                         165   General Download                           Allow 
  3   Humanity                                                                  
                         103   History/Culture                            Allow 
                         166   Literature                                 Allow 
                         167   Arts                                       Allow 
                         168   Music                                      Allow 
  4   Sports                                                                    
                         104   Competitive Sports                         Allow 
                         169   Leisure Sports                             Allow 
                         170   Sports Equipment                           Allow
.........
Table 14-77  Description of the display url-filter category pre-defined control-level command output
Item Description
Control Level Control level of the predefined URL category.
CID ID of the predefined URL category.
CN Name of the predefined URL category.
SID ID of the predefined URL subcategory.
SN Name of the predefined URL subcategory.
Action Action taken for HTTP requests:
  • Allow
  • Block
  • Alert

display url-filter statistics

Function

The display url-filter statistics command displays statistics on URL filtering.

Format

display url-filter statistics

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

None

Example

# Display URL filtering statistics.

<Huawei> display url-filter statistics
--------------------------------------------------------------------------------
  Statistics Information:                                                       
--------------------------------------------------------------------------------
  Total HTTP Requests            : 448460                                       
  Total Permitted HTTP Requests  : 448460                                       
  Total Denied HTTP Requests     : 0                                            
  Matched Blacklist              : 0                                            
  Matched Whitelist              : 0                                            
  Matched User-defined Category  : 0                                            
  Matched Pre-defined Category   : 0                                            
  Matched Timeout Action         : 0                                            
  Matched Default Action         : 448460                                       
  Pre-defined URL Numbers        : 85815                                        
--------------------------------------------------------------------------------
Table 14-78  Description of the display url-filter statistics command output
Item Description
Statistics Information Statistics on URL filtering
Total HTTP Requests Total number of HTTP requests
Total Permitted HTTP Requests Total number of permitted HTTP requests
Total Denied HTTP Requests Total number of blocked HTTP requests
Matched Blacklist Number of times the blacklist is matched
Matched Whitelist Number of times the whitelist is matched
Matched User-defined Category Number of times the user-defined category is matched
Matched Pre-defined Category Number of times the predefined category is matched
Matched Timeout Action Number of times the timeout action is matched
Matched Default Action Number of times the default action is matched
Pre-defined URL Numbers Number of pre-defined URL.

import url-sdb file

Function

The import url-sdb file command imports a URL category database.

Format

import url-sdb file filename

Parameters

Parameter Description Value
filename Specifies a database file name that contains the absolute path. The value is a string of 1 to 63 characters without spaces, for example, flash:/url.sdb.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

None

Example

# Import a URL category database.

<Huawei> system-view
[Huawei] import url-sdb file flash:/url-hotsite(version_1.1).sdb

profile type url-filter copy

Function

The profile type url-filter copy command creates a URL filtering profile by copying an existing one and displays the view of the created URL filtering profile.

Format

profile type url-filter copy old-name [ new-name ]

Parameters

Parameter

Description

Value

old-name

Specifies the name of the URL filtering profile to be copied.

The value is a string of case-insensitive characters. The value cannot contain question marks (?), commas (,), double question marks ("), and hyphens (-).
  • If the value does not contain any space, the value contains 1 to 32 characters.
  • If the value contains spaces, you must enclose the value with double quotation marks (""), for example, "user for test", and the value contains 3 to 34 characters.

new-name

Specifies the name of the new URL filtering profile.

The value is a string of case-insensitive characters. The value cannot contain question marks (?), commas (,), double question marks ("), and hyphens (-).
  • If the value does not contain any space, the value contains 1 to 32 characters.
  • If the value contains spaces, you must enclose the value with double quotation marks (""), for example, "user for test", and the value contains 3 to 34 characters.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To speed up configuration of a URL filtering profile, you can copy an existing URL filtering profile to create a new one when the new URL filtering profile is similar to the existing one.

Prerequisites

The URL filtering profile to be copied has been created using the url-filter category user-defined name command.

Follow-up Procedure

Run the profile urlf command to bind the URL filtering profile to a security policy.

Precautions

If new-name is not specified, the default name of the new URL filtering profile is old-name_n. The value of n indicates the number of times an existing URL filtering profile is copied, and is an integer and starts with 1.

Example

# Create two URL filtering profiles by copying the URL filtering profile abc.

<Huawei> system-view
[Huawei] profile type url-filter name abc
[Huawei-profile-url-filter-abc] quit
[Huawei] profile type url-filter copy abc
[Huawei-profile-url-filter-abc_1] quit
[Huawei] profile type url-filter copy abc
[Huawei-profile-url-filter-abc_2] quit

profile type url-filter name

Function

The profile type url-filter name command creates a URL filtering profile and displays the URL filtering profile view, or directly displays the view of an existing URL filtering profile.

The undo profile type url-filter name command deletes a URL filtering profile.

By default, no URL filtering profile is configured.

Format

profile type url-filter name name

undo profile type url-filter { all | name name }

Parameters

Parameter

Description

Value

name

Specifies the name of a URL filtering profile.

The value is a string of case-sensitive characters. The value cannot contain question marks (?), commas (,), double question marks ("), and hyphens (-).
  • If the value does not contain any space, the value contains 1 to 32 characters.
  • If the value contains spaces, you must enclose the value with double quotation marks (""), for example, "user for test", and the value contains 3 to 34 characters.

all

Deletes all URL filtering profiles.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

With rapid development of Internet applications and popularity of computer networks, acquisition, sharing, and dissemination of information has become more widespread than ever, which brings unprecedented threats to enterprises:
  • Visiting non-work-related websites during working hours reduces work efficiency.
  • Visiting illegitimate or malicious websites may result in leaks of enterprise confidential information and threats such as worms, viruses, and Trojan horses.

You can create a URL filtering profile and configure the whitelist, blacklist, and predefined and user-defined URL categories to control HTTP requests.

Follow-up Procedure

Run the profile urlf command to bind the URL filtering profile to a security policy.

Example

# Create a URL filtering profile abc.

<Huawei> system-view
[Huawei] profile type url-filter name abc
[Huawei-profile-url-filter-abc]

rename (URL filtering profile view)

Function

The rename command renames an existing URL filtering profile and displays the view of the new profile.

Format

rename new-name

Parameters

Parameter

Description

Value

new-name

Specifies the name of a URL filtering profile.

The value is a string of case-insensitive characters. The value cannot contain question marks (?), commas (,), double question marks ("), and hyphens (-).
  • If the value does not contain any space, the value contains 1 to 32 characters.
  • If the value contains spaces, you must enclose the value with double quotation marks (""), for example, "user for test", and the value contains 3 to 34 characters.

Views

URL filtering profile view

Default Level

2: Configuration level

Usage Guidelines

You can run the rename command to rename an existing URL filtering profile to facilitate management.

Example

# Rename the URL filtering profile abc to hello.

<Huawei> system-view
[Huawei] profile type url-filter name abc
[Huawei-profile-url-filter-abc] rename hello
[Huawei-profile-url-filter-hello]

rename (user-defined URL category view)

Function

The rename command renames an existing user-defined URL category and displays the view of the new user-defined URL category.

Format

rename new-name

Parameters

Parameter Description Value
new-name Specifies the name of a user-defined URL category.
The value is a string of case-insensitive characters. The value cannot contain question marks (?), commas (,), double question marks ("), and hyphens (-).
  • If the value does not contain any space, the value contains 1 to 32 characters.
  • If the value contains spaces, you must enclose the value with double quotation marks (""), for example, "user for test", and the value contains 3 to 34 characters.

Views

User-defined URL category view

Default Level

2: Configuration level

Usage Guidelines

You can run the rename command to rename a user-defined URL category to facilitate management.

Example

# Rename the user-defined URL category company to development.

<Huawei> system-view
[Huawei] url-filter category user-defined name company
[Huawei-category-user-defined-company] rename development
[Huawei-category-user-defined-development] 

reset url-filter statistics

Function

The reset url-filter statistics command clears URL filtering statistics.

Format

reset url-filter statistics { all | blacklist | category [ pre-defined | user-defined ] | whitelist }

Parameters

Parameter Description Value
all Indicates the number of times blacklisted URLs, whitelisted URLs, and user-defined and predefined URL categories are matched. -
blacklist Indicates the number of times blacklisted URLs are matched. -
category [ user-defined | pre-defined ] Indicates the number of times URL categories are matched.
  • If user-defined is specified, the parameter indicates the number of times user-defined URL categories are matched.
  • If pre-defined is specified, the parameter indicates the number of times predefined URL categories are matched.
  • If no parameter is specified, the parameter indicates the number of times user-defined and predefined URL categories are matched.
-
whitelist Indicates the number of times whitelisted URLs are matched. -

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Before running the display url-filter statistics command to recollect URL filtering statistics, run the reset url-filter statistics command to clear existing URL filtering statistics.

Precautions

Cleared URL filtering statistics cannot be restored. Exercise caution when you run the reset url-filter statistics command.

Example

# Clear URL filtering statistics.

<Huawei> reset url-filter statistics all

url-filter category pre-defined copy

Function

The url-filter category pre-defined copy command creates a user-defined URL category by copying an existing predefined URL category and displays the view of the created user-defined URL category.

Format

url-filter category pre-defined copy subcategory-id new-name

Parameters

Parameter Description Value
subcategory-id Specifies the ID of a predefined URL subcategory. The value is an integer that ranges from 101 to 60000.
new-name Specifies the name of a user-defined

URL category.
The value is a string of case-insensitive characters. The value cannot contain question marks (?), commas (,), double question marks ("), and hyphens (-).
  • If the value does not contain any space, the value contains 1 to 32 characters.
  • If the value contains spaces, you must enclose the value with double quotation marks (""), for example, "user for test", and the value contains 3 to 34 characters.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can copy an existing predefined URL category to create a user-defined URL category when the user-defined URL category is similar to the existing predefined URL category.

Prerequisites

The predefined URL category database already exists.

Example

# Create a user-defined URL category company by copying predefined URL subcategory 101.

<Huawei> system-view
[Huawei] url-filter category pre-defined copy 101 company
[Huawei-category-user-defined-company]

url-filter category pre-defined subcategory-id

Function

The url-filter category pre-defined subcategory-id command displays the predefined subcategory view.

Format

url-filter category pre-defined subcategory-id subcategory-id

Parameters

Parameter Description Value
subcategory-id Indicates the ID of a predefined URL subcategory. The value is an integer ranging from 101 to 60000.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Run the display url-filter category pre-defined command to display the subcategory-id of the specified predefined URL category.

Example

# Display the view of the predefined subcategory P2P.

<Huawei> system-view
[Huawei] url-filter category pre-defined subcategory-id 101
[Huawei-cate-pre-defined-101]

url-filter category user-defined copy

Function

The url-filter category user-defined copy command clones a user-defined URL category.

Format

url-filter category user-defined copy old-name [ new-name ]

Parameters

Parameter Description Value
old-name Indicates the name of a user-defined URL category. The category must have been configured.
new-name Indicates the name of the URL category. The value is a case-insensitive character string. The length of a name without spaces ranges from 1 to 32 characters. The length of a name with spaces ranges from 3 to 34 characters. If a name contains spaces, the name must be enclosed with quotation marks (for example, "user for test"). Question marks (?), commas (,), quotations marks ("), and hyphens (-) cannot be used.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

If new-name is not specified in the command, the name of the new URL category is the original category name suffixed by _num. _num indicates the number of times the URL category is cloned.

Example

# Clone the user-defined category company.

<Huawei> system-view
[Huawei] url-filter category user-defined copy company
[Huawei-cate-user-defined-company_1]

url-filter category user-defined name

Function

The url-filter category user-defined name command creates a user-defined URL category and displays its view, or directly displays the view of an existing user-defined URL category.

The undo url-filter category user-defined command deletes a user-defined URL category.

By default, no user-defined URL category exists.

Format

url-filter category user-defined name category-name

undo url-filter category user-defined { all | name category-name }

Parameters

Parameter Description Value
all Deletes all user-defined URL categories. -
name category-name Specifies the name of a user-defined URL category.
The value is a string of case-insensitive characters. The value cannot contain question marks (?), commas (,), double question marks ("), and hyphens (-).
  • If the value does not contain any space, the value contains 1 to 32 characters.
  • If the value contains spaces, you must enclose the value with double quotation marks (""), for example, "user for test", and the value contains 3 to 34 characters.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Although a predefined URL category database contains mainstream websites, some new websites may be not included. To meet special filtering requirements or enhance the predefined URL category database, you can create user-defined categories as needed and customize security policies for websites.

After a user-defined URL category is configured, the device checks whether URLs in HTTP requests match URLs in the user-defined URL category. If so, the device processes the HTTP requests according to the action configured by the category user-defined action command. If not, the device checks whether URLs in HTTP requests match URLs in the predefined URL category database.

Example

# Create a user-defined URL category abc.

<Huawei> system-view
[Huawei] url-filter category user-defined name abc
[Huawei-category-user-defined-abc]
Related Topics
Translation
Download
Updated: 2019-05-29

Document ID: EDOC1000097293

Views: 88815

Downloads: 121

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next