Fortinet white logo
Fortinet white logo

CLI Reference

waf link-cloaking link-cloaking-rule

waf link-cloaking link-cloaking-rule

Use this command to prevent web pages in your application from being scanned by web crawlers and scanning software. Link cloaking transforms the fixed links to automatically generated links by JavaScript codes. For example, <a href="https://example/login"> will be transformed to href="https://jisc.waasonline.com/index/login", where the link tag <a> is cut off so that the crawlers can't recognize it. When the link is loaded in the client's browser, the lost code will be added back automatically.

To use this command, your administrator account’s access control profile must have either w or rw permission to the wafgrp area. For details, see Permissions.

Syntax

config waf link-cloaking link-cloaking-rule

edit <link_cloaking_name>

set host-status {enable | disable}

set host <name>

set url-type {plain | regular}

set url-pattern "<url_string>"

config exceptions

edit 1

set url-type

set url-pattern

next

end

next

end

Variable Description Default
<link_cloaking_name> Enter a name for the rule. no default
host-status {enable | disable} Enable to require that the Host: field of the HTTP request matches a protected host name entry in order to match the link cloaking rule. disable
host <name> Enter the protected host names entry (either a web host name or a IP address) that the Host: field of the HTTP request must be in to match the rule. no default

url-type {plain | regular}

Enter to select between:

  • plain—A simple string; a string of text that contains a literal URL.
  • regular—A regular expression; a string of text that defines a search pattern for a URL that may come in many variations.
plain

url-pattern "<url_string>"

Depending on the url-type, enter either:

  • plain—The literal URL, such as /index.php, that the HTTP request must contain in order to match the rule. The URL must begin with a slash ( / ).
  • regular—A regular expression, such as ^/*.php, matching the URLs to which the rule should apply. The pattern does not require a slash ( / ), but it must match URLs that begin with a slash, such as /index.cfm.

Do not include the domain name, such as www.example.com, which is configured separately in [bot-detection-exception-list] <No.> host <string>.

no default
exceptions If you want to exclude certain links from Link Cloaking, type a literal URL or use regular expression to match multiple URLs. no default

waf link-cloaking link-cloaking-rule

waf link-cloaking link-cloaking-rule

Use this command to prevent web pages in your application from being scanned by web crawlers and scanning software. Link cloaking transforms the fixed links to automatically generated links by JavaScript codes. For example, <a href="https://example/login"> will be transformed to href="https://jisc.waasonline.com/index/login", where the link tag <a> is cut off so that the crawlers can't recognize it. When the link is loaded in the client's browser, the lost code will be added back automatically.

To use this command, your administrator account’s access control profile must have either w or rw permission to the wafgrp area. For details, see Permissions.

Syntax

config waf link-cloaking link-cloaking-rule

edit <link_cloaking_name>

set host-status {enable | disable}

set host <name>

set url-type {plain | regular}

set url-pattern "<url_string>"

config exceptions

edit 1

set url-type

set url-pattern

next

end

next

end

Variable Description Default
<link_cloaking_name> Enter a name for the rule. no default
host-status {enable | disable} Enable to require that the Host: field of the HTTP request matches a protected host name entry in order to match the link cloaking rule. disable
host <name> Enter the protected host names entry (either a web host name or a IP address) that the Host: field of the HTTP request must be in to match the rule. no default

url-type {plain | regular}

Enter to select between:

  • plain—A simple string; a string of text that contains a literal URL.
  • regular—A regular expression; a string of text that defines a search pattern for a URL that may come in many variations.
plain

url-pattern "<url_string>"

Depending on the url-type, enter either:

  • plain—The literal URL, such as /index.php, that the HTTP request must contain in order to match the rule. The URL must begin with a slash ( / ).
  • regular—A regular expression, such as ^/*.php, matching the URLs to which the rule should apply. The pattern does not require a slash ( / ), but it must match URLs that begin with a slash, such as /index.cfm.

Do not include the domain name, such as www.example.com, which is configured separately in [bot-detection-exception-list] <No.> host <string>.

no default
exceptions If you want to exclude certain links from Link Cloaking, type a literal URL or use regular expression to match multiple URLs. no default