webfilter : content
 
content
Control web content by blocking or exempting words, phrases, or patterns.
For each pattern you can select Block or Exempt. Block, blocks access to a web page that matches with the pattern. Exempt allows access to the web page even if other entries in the list that would block access to the page.
For a page, each time a block match is found values assigned to the pattern are totalled. If a user-defined threshold value is exceeded, the web page is blocked.
Use this command to add or edit and configure options for the Web content filter list. Patterns words can be one word or a text string up to 80 characters long. The maximum number of patterns in the list is 5000.
When a single word is entered, the FortiGate unit checks Web pages for that word. Add phrases by enclosing the phrase in ‘single quotes’. When a phrase is entered, the FortiGate unit checks Web pages for any word in the phrase. Add exact phrases by enclosing the phrases in “quotation marks”. If the phrase is enclosed in quotation marks, the FortiGate checks Web pages for the exact phrase.
Create patterns using wildcards or Perl regular expressions.
 
Perl regular expression patterns are case sensitive for Web Content Filtering. To make a word or phrase case insensitive, use the regular expression /i. For example, /bad language/i blocks all instances of bad language regardless of case. Wildcard patterns are not case sensitive.
Syntax
config webfilter content
edit <entry_number>
set name <list_str>
set comment <comment_str>
config entries
edit <content_str>
set action {block | exempt}
set lang {cyrillic | french | japanese | korean | simch | spanish | thai | trach | western}
set pattern-type {regexp | wildcard}
set score <score_int>
set status {enable | disable}
end
end
Variable
Description
Default
edit <entry_number>
A unique number to identify the banned word list.
 
name <list_str>
The name of the banned word list.
 
comment <comment_str>
The comment attached to the banned word list.
 
edit <content_str>
Enter the content to match.
Note: multibyte characters (such as those used in Chinese, Japanese, or Korean) should be entered as character codes (e.g., &0026032;&0032862;) to ensure that the banned word is readable in the logs.
 
action {block | exempt}
Select one of:
block If the pattern matches, the Score is added to the total for the web page. The page is blocked if the total score of the web page exceeds the web content block threshold defined in the web filter profile.
Exempt If the pattern matches, the web page will not be blocked even if there are matching Block entries.
block
lang {cyrillic | french | japanese | korean | simch | spanish | thai | trach | western}
Enter the language character set used for the content. Choose from Cyrillic, French, Japanese, Korean, Simplified Chinese, Spanish, Thai, Traditional Chinese, or Western.
western
pattern-type {regexp | wildcard}
Set the pattern type for the content. Choose from regexp or wildcard.Create patterns for banned words using Perl regular expressions or wildcards.
wildcard
score <score_int>
A numerical weighting applied to the content. The score values of all the matching words appearing on a web page are added, and if the total is greater than the webwordthreshold value set in the web filter profile, the page is processed according to whether the bannedword option is set with the http command in the web filter profile. The score for banned content is counted once even if it appears multiple times on the web page.
10
status {enable | disable}
Enable or disable the content entry.
disable