config : wad website
 
wad website
Use this command to enable and configure web site defacement attack detection and automatic repair.
The FortiWeb appliance monitors the web site’s files for any changes and folder modifications at specified time intervals. If it detects a change that could indicate a defacement attack, the FortiWeb appliance notifies you, and can quickly react by automatically restoring the web site contents to the previous backup revision.
Optionally, you can specify a filter that either defines which files and folders FortiWeb does not scan when it looks for changes (blacklist) or the specific files and folders you want it to monitor (whitelist). (See “config wad file-filter”.)
FortiWeb automatically backs up web site files and creates a revision in the following cases:
When the FortiWeb appliance initiates monitoring for the first time, the FortiWeb appliance downloads a backup copy of the web site’s files and stores it as the first revision.
If the FortiWeb appliance could not successfully connect during a monitor interval, it creates a new revision the next time it re-establishes the connection.
 
When you intentionally modify the web site, you must disable the monitor option; otherwise, the FortiWeb appliance sees your changes as a defacement attempt and undoes them.
 
Backup copies omit files exceeding the file size limit and/or matching the file extensions that you have configured the FortiWeb appliance to omit. See backup-max-fsize <limit_int> and backup-skip-ftype <extensions_str>.
To use this command, your administrator account’s access control profile must have either w or rw permission to the wadgrp area. For more information, see “Permissions”.
Syntax
config wad website
edit <entry_index>
set alert-email <email-policy_name>
set auto-restore {enable | disable}
set backup-max-fsize <limit_int>
set backup-skip-ftype <extensions_str>
set connect-type {ftp | smb | ssh}
set description "<comment_str>"
set hostname-ip {<host_ipv4> | <host_fqdn>}
set interval-other <seconds_int>
set interval-root <seconds_int>
set monitor {enable | disable}
set monitor-depth <folders_int>
set name <name_str>
set password <password_str>
set port <port_int>
set share-name <share_str>
set user <user_str>
set web-folder <path_str>
set file-filter <wad-file-filter_name>
next
end
Variable
Description
Default
<entry_index>
Type the index number of the individual entry in the table. The valid range is from 1 to 16.
No default.
alert-email <email-policy_name>
Type the name of the email policy that specifies the email address that FortiWeb sends an email to when it detects that the web site changed. (See “config log email-policy”.)The maximum length is 35 characters.
No default.
auto-restore {enable | disable}
Enable to automatically restore the web site to the previous revision number when it detects that the web site changed.
Disable to do nothing. In this case, you must manually restore the web site to a previous revision when the FortiWeb appliance detects that the web site has been changed.
Note: When you intentionally modify the web site, you must turn off this option; otherwise, the FortiWeb appliance will detect your changes as a defacement attempt, and undo them.
disable
backup-max-fsize <limit_int>
Type a file size limit in kilobytes (KB) to indicate which files will be included in the web site backup. Files exceeding this size will not be backed up. The valid range is from 1 to 1,048,576 kilobytes.
Note: Backing up large files can impact performance.
10240
backup-skip-ftype <extensions_str>
Type zero or more file extensions, such as iso,avi, to exclude from the web site backup. Separate each file extension with a comma. The maximum length is 512 characters.
Note: Backing up large files, such as video and audio, can impact performance.
No default.
connect-type {ftp | smb | ssh}
Select which protocol to use when connecting to the web site in order to monitor its contents and download web site backups. For Microsoft Windows-style shares, enter smb.
ftp
description "<comment_str>"
Type a description or other comment. If the comment is more than one word or contains special characters, surround the comment with double quotes ( " ). The maximum length is 255 characters.
No default.
hostname-ip {<host_ipv4> | <host_fqdn>}
Type the IP address or fully qualified domain name (FQDN) of the physical server on which the web site is hosted.
This will be used when connecting by SSH or FTP to the web site to monitor its contents and download backup revisions, and therefore could be different from the real or virtual web host name that may appear in the Host: field of HTTP headers.
No default.
interval-other <seconds_int>
Type the number of seconds between each monitoring connection from the FortiWeb appliance to the web server. During this connection, the FortiWeb appliance examines the web site’s subfolders to see if any files have been changed by comparing the files with the latest backup. The valid range is from 1 to 86,400 seconds.
If any file change is detected, the FortiWeb appliance will download a new backup revision. If you have enabled auto-restore {enable | disable}, the FortiWeb appliance will revert the files to their previous version.
600
interval-root <seconds_int>
Type the number of seconds between each monitoring connection from the FortiWeb appliance to the web server. During this connection, the FortiWeb appliance examines web-folder <path_str> (but not its subfolders) to see if any files have been changed by comparing the files with the latest backup. The valid range is from 1 to 86,400 seconds.
If any file change is detected, the FortiWeb appliance will download a new backup revision. If you have enabled auto-restore {enable | disable}, the FortiWeb appliance will revert the files to their previous version.
60
monitor {enable | disable}
Enable to monitor the web site’s files for changes, and to download backup revisions that can be used to revert the web site to its previous revision if the FortiWeb appliance detects a change attempt.
enable
monitor-depth <folders_int>
Type how many folder levels deep to monitor for changes to the web site’s files. Files in subfolders deeper than this level will not be backed up. The valid range is from 1 to 10 levels deep.
5
name <name_str>
Type a name for the web site. The maximum length is 63 characters.
This name will not be used when monitoring the web site, nor will it be referenced in any other part of the configuration, and therefore can be any identifier that is useful to you. It does not need to be the web site’s FQDN or virtual host name.
No default.
password <password_str>
Type the password for the user name you entered in user <user_str>. The maximum length is 63 characters.
No default.
port <port_int>
Type the port number on which the web site’s physical server listens. The standard port number for FTP is 21; the standard port number for SSH is 22.
This is applicable only if connect-type is ftp or ssh.
21
share-name <share_str>
Type the name of the shared folder on the web server. The maximum length is 63 characters.
This variable appears only if connect-type is smb.
No default.
user <user_str>
Type the user name that the FortiWeb appliance will use to log in to the web site’s physical server. The maximum length is 63 characters.
No default.
web-folder <path_str>
Type the path to the web site’s folder, such as public_html, on the physical server. The path is relative to the initial location when logging in with the user name that you specify in user <user_str>. The maximum length is 1,023 characters.
Available only if the value of connect-type is ftp or ssh.
No default.
file-filter <wad-file-filter_name>
Type the filter that specifies either the files and folders that FortiWeb excludes from anti-defacement monitoring or the specific files and folders to monitor.
No default.
Example
config wad website
edit 1
set alert-email email_policy_1
set connect-type ssh
set hostname-ip "192.168.1.10"
set monitor enable
set name "www.example.com"
set password P@ssword1
set port 22
set user "fortiweb"
set web-folder "public_html"
set file-filter "video-folder"
next
end
Related topics
config wad file-filter
config system interface
config router static