Fortiweb v5.8.0 Administration Guide
Fortiweb v5.8.0 Administration Guide
FortiWeb AdministrationGuide
VERSION 5.8
FORTINET DOCUMENTLIBRARY
http://docs.fortinet.com
FORTINETVIDEOGUIDE
http://video.fortinet.com
FORTINETBLOG
https://blog.fortinet.com
CUSTOMERSERVICE&SUPPORT
https://support.fortinet.com
http://cookbook.fortinet.com/how-to-work-with-fortinet-support/
FORTIGATECOOKBOOK
http://cookbook.fortinet.com
FORTINETTRAININGSERVICES
http://www.fortinet.com/training
FORTIGUARDCENTER
http://www.fortiguard.com
FEEDBACK
Email: [email protected]
1st Edition
TABLEOFCONTENTS
Introduction 15
Benefits 15
Architecture 16
Scope 16
Whats new 18
Key concepts 34
Workflow 34
Sequence of scans 35
IPv6 support 40
Solutions for specific web attacks 41
HTTP/HTTPS threats 41
DoS attacks 47
HTTP/2 support 49
HTTP sessions & security 50
FortiWeb sessions vs. web application sessions 53
Sessions & FortiWeb HA 54
Example: Magento & FortiWeb sessions during failover 55
HA heartbeat & synchronization 57
Data that is not synchronized by HA 58
Configuration settings that are not synchronized by HA 59
How HA chooses the active appliance 60
Heartbeat packet Ethertypes 61
Administrative domains (ADOMs) 62
Defining ADOMs 65
Assigning administrators to an ADOM 66
How to use the web UI 67
System requirements 67
URL for access 67
Workflow 68
Permissions 69
Trusted hosts 73
Maximum concurrent administrator sessions 73
Global web UI & CLI settings 73
Buttons, menus, & the displays 78
Deleting entries 80
Renaming entries 81
Shutdown 82
How to set up your FortiWeb 83
Appliance vs. VMware 83
Registering your FortiWeb 83
Planning the network topology 84
External load balancers: before or after? 84
How to choose the operation mode 87
Supported features in each operation mode 88
Matching topology with operation mode & HA mode 90
Topology for reverse proxy mode 90
Topology for either of the transparent modes 93
Topology for offline protection mode 94
Topology for WCCP mode 96
Topologies for high availability (HA) clustering 97
Connecting to the web UI or CLI 100
Connecting to the web UI 102
Connecting to the CLI 103
Updating the firmware 108
Testing new firmware before installing it 108
Installing firmware 110
Updating firmware on an HA pair 115
Installing alternate firmware 116
Booting from the alternate partition 119
Changing the admin account password 122
Setting the system time & date 124
Setting the operation mode 127
Configuring a high availability (HA) FortiWeb cluster 130
Replicating the configuration without FortiWeb HA (external HA) 142
Configuring FortiWeb to receive traffic via WCCP 146
Configuring the FortiWeb WCCP client settings 146
Viewing WCCP protocol information 149
Example: Using WCCP with FortiOS 5.2.x 149
Example: Using WCCP with FortiOS 5.4 154
Example: Using WCCP with multiple FortiWeb appliances 155
Example: Using WCCP with a Cisco router 157
Configuring the network settings 160
Network interface or bridge? 160
Configuring the network interfaces 162
Link aggregation 172
Configuring a bridge (V-zone) 175
Adding a gateway 179
Creating a policy route 183
Notice for using policy route in an one-arm topology 184
Fixing asymmetric routing problems with policy-based routing 185
Configuring DNS settings 187
Connecting to FortiGuard services 190
Choosing the virus signature database & decompression buffer 193
Accessing FortiGuard via a web proxy 195
How often does Fortinet provide FortiGuard updates for FortiWeb? 195
Scheduling automatic signature updates 196
Manually initiating update requests 199
Uploading signature & geography-to-IP updates 201
Receive quarantined source IP addresses from FortiGate 202
Configuring basic policies 204
Example 1: Configuring a policy for HTTP via auto-learning 204
Example 2: Configuring a policy for HTTPS 205
Example 3: Configuring a policy for load balancing 205
Auto-learning 207
How to adapt auto-learning to dynamic URLs & unusualparameters 207
Configuring URL interpreters 209
Grouping URL interpreters 221
Recognizing data types 223
Predefined data types 223
Grouping predefined data types 227
Recognizing suspicious requests 228
Predefined suspicious request URLs 229
Configuring custom suspicious request URLs 230
Grouping custom suspicious request URLs 231
Grouping all suspicious request URLs 232
Configuring an auto-learning profile 234
Running auto-learning 237
Pausing auto-learning for a URL 238
Viewing auto-learning reports 238
Using the report navigation pane 240
Using the report display pane 243
Generating a profile from auto-learning data 254
Transitioning out of the auto-learning phase 258
Removing old auto-learning data 258
Generate protection profiles using a scanner report 259
WhiteHat Sentinel scanner report requirements 260
Telefnica FAAST scanner report requirements 261
HP WebInspect scanner report requirements 262
Import a scanner report 263
Testing your installation 265
Reducing false positives 266
Testing for vulnerabilities & exposure 266
Expanding the initial configuration 267
Switching out of offline protection mode 269
Backups 270
Restoring a previous configuration 275
Administrators 277
Configuring access profiles 282
Grouping remote authentication queries and certificates for administrators 284
Changing an administrators password 285
Certificate-based Web UI login 286
Users 291
Authentication styles 291
Via the Authorization: header in the HTTP/HTTPS protocol 291
Via forms embedded in the HTML 292
Via a personal certificate 294
Offloading HTTP authentication & authorization 294
Configuring local end-user accounts 297
Configuring queries for remote end-user accounts 298
Configuring LDAP queries 298
Configuring RADIUS queries 303
Configuring NTLM queries 306
Adding servers to an authentication server pool 307
Configuring a Kerberos Key Distribution Center (KDC) 308
Grouping users 309
Applying user groups to an authorization realm 311
Grouping authorization rules 314
Single sign-on (SSO) (site publishing) 317
Two-factor authentication 319
RSA SecurID authentication 320
Changing user passwords at login 321
Using Kerberos authentication delegation 321
Types of Kerberos authentication delegation 322
Configuring Windows Authentication for Kerberos authentication delegation 322
Offloaded authentication and optional SSO configuration 324
To create an Active Directory (AD) user for FortiWeb 335
Example: Enforcing complex passwords 340
Tracking users 341
Defining your web servers & loadbalancers 348
Protected web servers vs. allowed/protected host names 348
Defining your protected/allowed HTTP Host: header names 349
Defining your web servers 351
Configuring server up/down checks 352
Configuring session persistence 356
Configuring server-side SNIsupport 359
Creating a server pool 359
Routing based on HTTP content 373
Example: Routing according to URL/path 383
Example: Routing according to the HTTP Host: field 384
Example: HTTP routing with full URL & host name rewriting 385
Defining your proxies, clients, & X-headers 386
Indicating the original clients IP to back-end web servers 387
Indicating to back-end web servers that the clients request was HTTPS 389
Blocking the attackers IP, not your load balancer 390
Configuring virtual servers on your FortiWeb 393
Defining your network services 395
Defining custom services 396
Predefined services 397
Enabling or disabling traffic forwarding to your servers 397
Secure connections (SSL/TLS) 399
Offloading vs. inspection 399
Supported cipher suites & protocol versions 401
SSL offloading cipher suites and protocols (reverse proxy and true transparent proxy) 402
Selecting the supported cipher suites using the advanced SSL settings 402
Enabling ChaCha-Poly1305 cipher suite support 404
SSL inspection cipher suites and protocols (offline and transparent inspection) 405
Uploading trusted CAs certificates 406
Grouping trusted CAs certificates 408
How to offload or inspect HTTPS 409
Using session keys provided by an HSM 411
Generating a certificate signing request 413
Uploading a server certificate 417
Supplementing a server certificate with its signing chain 420
Allowing FortiWeb to support multiple server certificates 423
How to force clients to use HTTPS 425
How to apply PKI client authentication (personal certificates) 425
Example: Generating & downloading a personal certificate from
MicrosoftWindows2003Server 429
Example: Downloading the CAs certificate from MicrosoftWindows2003Server 437
Example: Importing the personal certificate & private key to a clients truststore on
MicrosoftWindows7 438
Uploading the CAs certificate to FortiWebs trusted CA store 445
Configuring FortiWeb to validate client certificates 445
Use URLs to determine whether a client is required to present a certificate 448
Revoking certificates 449
How to export/back up certificates & private keys 450
How to change FortiWeb's default certificate 450
Using OCSP Stapling 452
Access control 453
Restricting access to specific URLs 453
Combination access control & rate limiting 460
Blacklisting & whitelisting clients 465
Blacklisting source IPs with poor reputation 465
Blacklisting & whitelisting countries & regions 467
Blacklisting & whitelisting clients using a source IP or source IP range 471
Blacklisting content scrapers, search engines, web crawlers, & other robots 474
Blocking client devices with poor reputation 474
How device reputation works 474
How to configure device reputation security policies 475
An example shows a configuration and resulting behavior of a device reputation
security policy 479
Protecting against cookie poisoning and other cookie-based attacks 482
Rate limiting 487
DoS prevention 487
Configuring application-layer DoS protection 487
Limiting the total HTTP request rate from an IP 488
Limiting TCP connections per IP address by session cookie 492
Preventing an HTTP request flood 496
Configuring network-layer DoS protection 500
Limiting TCP connections per IP address 501
Preventing a TCP SYN flood 503
Grouping DoS protection rules 504
Preventing brute force logins 506
Rewriting & redirecting 510
Example: HTTP-to-HTTPS redirect 519
Example: Full host name/URL translation 522
Example: Sanitizing poisoned HTML 524
Example: Inserting & deleting body text 527
Example: Rewriting URLs using regular expressions 528
Example: Rewriting URLs using variables 528
Caching 530
What can be cached? 535
Blocking known attacks & data leaks 538
False Positive Mitigation for SQL Injection signatures 550
Enable False Positive Mitigation for SQL Injection and SQL Injection (Extended) 550
Syntax-based SQL Injection Detection 552
How Syntax-based SQL Injection Detection works 553
Built-in SQL statement templates 554
SQL injection types 554
Enable Syntax Based SQL Injection detection 555
Configuring action overrides or exceptions to data leak & attack detection signatures 556
Example: Concatenating exceptions 562
Filtering signatures 562
Defining custom data leak & attack signatures 563
Example: ASP .Net version & other multiple server detail leaks 568
Example: Zero-day XSS 570
Example: Local file inclusion fingerprinting via Joomla 572
Defeating cipher padding attacks on individually encrypted inputs 573
Defeating cross-site request forgery (CSRF)attacks 578
Addressing security vulnerabilities by HTTP Security Headers 583
Enforcing page order that follows application logic 586
Specifying URLs allowed to initiate sessions 591
Preventing zero-day attacks 597
Validating parameters (input rules) 597
Bulk changes to input validation rules 605
Defining custom data types 606
Preventing tampering with hidden inputs 607
Specifying allowed HTTP methods 613
Configuring allowed method exceptions 616
HTTP/HTTPS protocol constraints 618
Configuring HTTP protocol constraint exceptions 630
Limiting file uploads 637
Restricting uploads by file type and size 637
Using FortiSandbox to evaluate uploaded files 637
Compression & decompression 647
Configuring compression/decompression exemptions 647
Configuring compression offloading 648
Configuring temporary decompression for scanning & rewriting 651
Policies 654
How operation mode affects server policy behavior 654
Configuring the global objectwhitelist 655
Configuring a protection profile for inline topologies 658
Configuring a protection profile for an out-of-band topology or asynchronous mode of
operation 669
Configuring a server policy 677
HTTP pipelining 691
Enabling or disabling a policy 692
Anti-defacement 693
Specifying files that anti-defacement does not monitor 699
Accepting or reverting changed files 700
Reverting a defaced web site 701
Compliance 702
Database security 702
Authorization 702
Preventing data leaks 702
Vulnerability scans 703
Preparing for the vulnerability scan 704
Live web sites 704
Network accessibility 704
Traffic load & scheduling 704
Scheduling web vulnerability scans 705
Configuring vulnerability scan settings 706
Running vulnerability scans 712
Manually starting & stopping a vulnerability scan 715
Viewing vulnerability scan reports 716
Downloading vulnerability scan reports 717
Advanced/optional system settings 718
Changing the FortiWeb appliances host name 718
Fail-to-wire for power loss/reboots 719
Customizing error and authentication pages (replacement messages) 720
Attack block page HTTP response codes 720
Macros in custom error and authentication pages 721
Image macros 722
Customize the message returned for LDAP errors (%%REPLY_TAG%% macro) 723
Configure the integrated firewall 724
Advanced settings 727
Example: Setting a separate rate limit for shared Internet connections 728
Monitoring your system 730
Status dashboard 730
System Information widget 733
FortiGuard Information widget 735
CLI Console widget 739
System Resources widget 741
Attack Log widget 742
Real Time Monitor widget 743
Event Log Console widget 745
Policy Sessions widget 746
Operation widget 746
Policy Status dashboard 747
Health Check Status 747
Session Count 748
RAID level & disk statuses 748
Logging 749
About logs & logging 750
Log types 750
Log severity levels 751
Log rate limits 752
Configuring logging 752
Enabling log types, packet payload retention, & resource shortage alerts 753
Configuring log destinations 756
Obscuring sensitive data in the logs 760
Configuring Syslog settings 762
Configuring FortiAnalyzer policies 764
Configuring SIEM policies 765
Configuring FTP/TFTP policies 766
Configuring triggers 767
Viewing log messages 768
Viewing a single log message as a table 772
Viewing packet payloads 773
Downloading log messages 776
Deleting log files 778
Coalescing similar attack log messages 778
Alert email 780
Configuring email settings 780
Configuring alert email for event logs 783
SNMP traps & queries 785
Configuring an SNMP community 787
MIB support 791
Reports 791
Customizing the reports headers, footers, & logo 794
Restricting the reports scope 796
Choosing the type & format of a report profile 799
Scheduling reports 801
Selecting the reports file type & delivery options 802
Viewing & downloading generated reports 804
Data analytics 805
Configuring policies to gather data 806
Updating data analytics definitions 806
Viewing web site statistics 807
Bot analysis 813
Monitoring currently blocked IPs 814
Monitoring currently tracked devices 815
FortiGuard updates 817
Vulnerability scans 817
Fine-tuning & best practices 818
Hardening security 818
Topology 818
Administrator access 819
User access 822
Signatures & patches 823
Buffer hardening 823
Enforcing valid, applicable HTTP 824
Sanitizing HTML application inputs 825
Disable SSL 3.0 825
Improving performance 825
System performance 825
Antivirus performance 825
Regular expression performance tips 826
Logging performance 828
Report performance 829
Auto-learning performance 829
Vulnerability scan performance 834
Packet capture performance 834
TCP transmission performance tuning 835
Improving fault tolerance 835
Alerting the SNMP manager when HA switches the primary appliance 836
Reducing false positives 837
Regular backups 841
Downloading logs in RAM before shutdown or reboot 842
Downloading logs in RAM before shutdown or reboot 842
Troubleshooting 843
Frequently asked questions 843
Administration 843
FortiGuard 843
Access control and rewriting 843
Logging and packet capture 844
Security 844
Performance 844
IPMI (FortiWeb 3000E and 4000E only) 844
Upgrade 844
How do I recover the password of the admin account? 844
What is the maximum number of ADOMs I can create? 844
How do I upload and validate a license for FortiWeb-VM? 845
How do I troubleshoot a high availability (HA) problem? 846
How do I upload a file to or download a file from FortiWeb? 849
Why did the FortiGuard service update fail? 850
Why is URL rewriting not working? 850
How do I create a custom signature that erases response packet content? 851
How do I reduce false positives and false negatives? 852
Why is FortiWeb not forwarding non-HTTP traffic (for example, RDP, FTP) to back-
end servers even though set ip-forward is enabled? 852
How do I prevent cross-site request forgery (CRSF or XSRF) with a custom rule? 853
Why does my Advanced Protection rule that has both Signature Violation and HTTP
Response Code filters not detect any violations? 854
What's the difference between the Packet Interval Timeout and Transaction Timeout
filters in an Advanced Protection rule? 854
What ID numbers do I use to specify a Signature Violation filter when I use the CLI to
create a custom access rule? 855
Why is the Signature Violation filter I added to my Advanced Protection custom rule
not working? 855
Why don't my back-end servers receive the virtual server IP address as the source IP?856
Why do I not see HTTP traffic in the logs? 856
Why do I see HTTP traffic in the logs but not HTTPS traffic? 859
How do I store traffic log messages on the appliance hard disk? 860
Why is the most recent log message not displayed in the Aggregated Attack log? 861
How can I sniff FortiWeb packets (packet capture)? 861
How do I trace packet flow in FortiWeb? 862
Why is the number of cookies reported in my attack log message different from the
number of cookies that message detail displays? 862
Why does the attack log message display the virtual server IP address as the
destination IP instead of the IP address of the back-end server that was the target of
the attack? 863
How do I detect which cipher suite is used for HTTPS connections? 863
How can I strengthen my SSL configuration? 863
Why cant a browser connect securely to my back-end server? 863
How do I use performance tests to determine maximum performance? 864
How can I measure the memory usage of individual processes? 864
How can I use IPMIto shut down or power on FortiWeb remotely? 865
How do I reformat the boot device (flash drive) when I restore or upgrade the
firmware? 866
How do I set up RAID for a replacement hard disk? 867
Tools 867
Ping & traceroute 868
Log messages 869
Diff 869
Packet capture 870
Packet capture via CLI command 870
Packet capture via Web UI 876
Diagnostic commands in the CLI 877
Retrieving kernel or daemon logs 877
How to troubleshoot 878
Establishing a system baseline 878
Determining the source of the problem 878
Planning & access privileges 879
Solutions by issue type 879
Connectivity issues 880
Checking hardware connections 880
Examining the ARP table 881
Checking routing 881
Examining the routing table 889
Checking port assignments 889
Performing a packet trace 890
Debugging the packet processing flow 890
Checking the SSL/TLS handshake & encryption 891
Resource issues 892
Killing system-intensive processes 892
Monitoring traffic load 892
Preparing for attacks 893
Login issues 893
Checking user authentication policies 893
When an administrator account cannot log in from a specific IP 894
Remote authentication query failures 894
Resetting passwords 894
Data storage issues 896
Bootup issues 896
Hard disk corruption or failure 896
Power supply failure 898
Issues forwarding non-HTTP/HTTPS traffic 900
Resetting the configuration 900
Restoring firmware (clean install) 901
Appendix A: Port numbers 904
AppendixB: Maximum configuration values 907
Maximum values on FortiWeb-VM 914
Data analytics maximums 914
Appendix C: Supported RFCs, W3C,&IEEE standards 916
RFCs 916
W3C standards 916
IEEE standards 917
Appendix D: Regularexpressions 918
Regular expression syntax 918
What are back-references? 924
Cookbook regular expressions 926
Language support 928
Appendix E: How to purchase and renew FortiGuard licenses 930
Introduction Benefits
Introduction
Welcome, and thank you for selecting Fortinet Inc. products for your network.
FortiWeb hardware and FortiWeb-VM virtual appliance models are available that are suitable for medium and
large enterprises, as well as service providers.
Benefits
FortiWeb web application firewalls (WAF) provide specialized application layer threat detection and protection for
HTTP or HTTPS services such as:
l Apache Tomcat
l nginx
l Microsoft IIS
l JBoss
l IBM Lotus Domino
l Microsoft SharePoint
l Microsoft Outlook Web App (OWA)
l RPC and ActiveSync for Microsoft Exchange Server
l Joomla
l WordPress
l and many others
FortiWebs integrated web-specific vulnerability scanner can drastically reduces challenges associated with
protecting regulated and confidential data by detecting your exposure to the latest threats, especially the
OWASP Top 10.
In addition, FortiWebs HTTP firewall and denial-of-service (DoS) attack-prevention protect your Internet-facing
web-based applications from attack and data theft. Using advanced techniques to provide bidirectional protection
against sophisticated threats like SQL injection and cross-site scripting (XSS), FortiWeb helps you prevent
identity theft, financial fraud, and corporate espionage. FortiWeb delivers the technology you need to monitor
and enforce government regulations, industry best practices, and internal security policies, including firewalling
and patching requirements from PCI DSS.
l Secure HTTP applications that are often gateways into valuable databases
l Prevent and reverse defacement
l Improve application stability
l Monitor servers for downtime & connection load
l Reduces response times
l Accelerate SSL/TLS *
l Accelerate compression/decompression
l Rewrite content on the fly
* On VM models, acceleration is due to offloading the cryptography burden from the back-end server. On
hardware models, cryptography is also hardware-accelerated via ASIC chips.
FortiWeb significantly reduces deployment costs by consolidating WAF, hardware acceleration, load balancing,
and vulnerability scanning into a single device with no per-user pricing. Those features drastically reduce the time
required to protect your regulated, Internet-facing data and eases the challenges associated with policy
enforcement and regulatory compliance.
Architecture
Basic topology
Client Administrator
Switch
FortiGate
FortiWeb
Protected Web
Servers
FortiWeb can be deployed in a one-arm topology, but is more commonly positioned inline to intercept all
incoming clients connections and redistribute them to your servers. FortiWeb has TCP- and HTTP-specific
firewalling capability. Because it is not designed to provide security to non-HTTP applications, it should be
deployed behind a firewall such as FortiGate that focuses on security for other protocols that may be forwarded to
your back-end servers, such as FTP and SSH.
Once the appliance is deployed, you can configure FortiWeb via its webUI and CLI, from a web browser and
terminal emulator on your management computer.
Scope
This document describes how to set up your FortiWeb appliance. For both the hardware and virtual appliance
versions of FortiWeb, it describes how to complete first-time system deployment, including planning the network
topology.
It also describes how to use the web user interface (web UI), and contains lists of default utilized port numbers,
configuration limits, and supported standards.
This document assumes, if you have installed the virtual appliance version (FortiWeb-VM), that you have already
followed the instructions in the FortiWeb-VM Install Guide.
Whats new
The list below contains new or changed features in FortiWeb5.4 and later. For upgrade information, see the
Release Notes available with the firmware and Updating the firmware on page 108.
FortiWeb 5.8
l Threat Weight Each protection feature can be scored with a threat weight to indicate how serious a
security violation is. When a security violation is detected, the threat weight of the security violation is used to
calculate the reputation of the device that launched the event.
l Device ReputationSecurity Policy Device reputation security policies use Device Tracking and
Threat Weight to determine the risk level of devices so that FortiWeb can carry out violation actions
according to the risk level of devices defined in a device reputation security policy.
l OCSP Stapling There is now support for OCSP (Online Certificate Status Protocol) stapling, an alternative
approach to the OCSP in which the certificate holder periodically requests the revocation status of certificates
of servers from OCSP servers and attaches the time-stamped response to the initial SSL/TLS handshake
between clients and servers. This transfers the resource burden of checking the revocation status of
certificates from the client to the presenter of the certificate and reduces the total amount of queries to OCSP
servers.
l HTTP Header Security FortiWeb can now ensure a safer browsing experience to website visitors by
inserting the following security-related headers to HTTP responses:
l Credential Stuffing Defense There is now support for protection against credential stuffing attacks.
When Credential Stuffing Defense is enabled, username and password credentials in a web server login
attempt will be processed in the database to verify whether it is a spilled username/password pair. Using this
feature requires a subscription to FortiGuard.
See Tracking users, Offloaded authentication and optional SSO configuration and Connecting to FortiGuard
services.
l Certificate It is now possible to import certificates to FortiWeb through the CLI (only PEM format is
acceptable).
l Active-active HA
l Session table synchronization is now disabled by default. This can be enabled and disabled through the
CLI.
l FortiWeb can now set weights for HA cluster members for traffic load-balancing by source IP.
l After completing your HA deployment, you can check the HA topology, information, and statistics of each
HA unit in the Web UI; this is similar to the get system ha-status command in the CLI.
l VM slaves in a high availability active-active cluster can validate themselves.
See Configuring a high availability (HA) FortiWeb cluster and the FortiWeb CLI Reference.
l LDAP Server It is now possible to configure a LDAP sever to FortiWeb usingeither the IPaddress or
domain name.
l Maximum Antivirus Buffer Size The maximum acceptable value for Maximum Antivirus Buffer Size has
been increased from 100 MB to 200 MB for the following platforms: FortiWeb 1000D, FortiWeb
3000D,FortiWeb 4000Dand FortiWeb Eseries.
l Maximum Body Cache Size The maximum acceptable value for the Maximum Body Cache Size has
been increased from 1024 KB to 4096 KB.
l Log There is now a log to record file submissions to FortiSandbox. This log is disabled by default and can
be enabled through the CLI.
l Log Email Policy It is now possible to set a company name and logo in an email policy.
See Configuring email settings.
l Signature Policy Threat scoring has been removed. This feature has been replaced by Device Reputation
Security Policies and the Threat Weight feature.
l LACPSupport There is now support for turning aggregated physical ports into bridges (V-zones).
See Configuring the network settings
l XFFClient IPSupport XFF Client IPs are now supported across all features.
See Defining your proxies, clients, & X-headers.
l Syslog over TLS Support Transport Layer Security (TLS) to provide a secure connection for transferring
syslog messages to a remote server.
FortiWeb 5.7
l HTTP/2 Support FortiWeb now supports HTTP/2 web communication. FortiWeb supports end to end
HTTP/2 and also conversion protocols between HTTP/2 clients and HTTP/1.1 back-end servers thus allowing
customers to enjoy HTTP/2 benefits without having to upgrade their back web servers. FortiWeb also provides
native HTTP/2 security (admin guide lists which security rules support HTTP/2 traffic). HTTP/2 is supported in
Reverse Proxy and/or True Transparent Proxy mode.
l A new method to detect SQL Injection attacks Using Lexical analysis with a SQL parser, SQL
templates, and Abstract Syntax Trees, FortiWeb can verify whether requests are true SQL Injection attacks.
This virtually eliminates SQL Injection false positives and false negatives..
l URL Rewriting Specified fields and values can be inserted to HTTP headers of requests by URL
Rewriting.
l QRadar SIEM FortiWeb's log messages can be sent in QRadar Log Event Extended Format (LEEF) to IBM
QRadar servers.
l Active-Active High Availability Multiple FortiWebs (up to eight units) can be deployed as an Active-
Active HA cluster in Reverse Proxy or True Transparent Proxy modes. The master unit in the cluster can
distribute incoming traffic over other cluster members (including itself) according to the specified load
balancing algorithm: packet source IP, least number of processing connections or round-robin.
l Packet Capture Packet capture now can be executed through FortiWeb's Web UI. Packet capture
intercepts the data packets that are passing through FortiWeb and stores them as a file for reference.
l Scanner Integration
l You can now retrieve a scanner report on FortiWeb from the Telefnica Faast portal through RESTful
API, without downloading the report file manually from Telefnica Faast and uploading it to FortiWeb
in advance.
l Scanner Integration lists vulnerabilities of an imported scan report in the aboriginal order as how they
l SSL/TLS Cipher Suits The following cipher suits are no longer supported by FortiWeb's high/medium-level
SSL/TLS encryption:
l ECDHE-RSA-DES-CBC3-SHA
l EDH-RSA-DES-CBC3-SHA
l DES-CBC3-SHA
See Supported cipher suites & protocol versions.
l HTTP Protocol Constraints Seventeen new HTTP protocol constraints are added. Eight of them are added to
govern the specific HTTP/2 header fields, they are:
l Illegal Connection Preface
l Illegal Frame Type
l Illegal Frame Flags
l Initial Window Size
l Header Compression Table Size
l Header List Size
l Frame Size
l Number of Concurrent Streams
The others are as following:
l Redundant HTTP Headers
l Maximum URL Parameter Name Length
l Maximum URL Parameter Value Length
l Illegal Character in Parameter Name
l Illegal Character in Parameter Value
l NULL Character in URL
l Illegal Character in URL
l Malformed URL
l Illegal Chunk Size
Moreover, in the Web UI page of HTTP Protocol Constraints, a new table column named HTTP Protocol
Support is introduced to indicate the HTTP version that a constraint can be applied to.
l Attack/Traffic Logs A new field HTTP Version is added to indicate the protocol that a log is associated
with.
l Site Publishing Site publishing supports Android clients to access to Microsoft Exchange servers through
Exchange ActiveSync. Note that while a site publishing rule is configured for Exchange ActiveSync, single sign-
on, authentication cookie and Kerberos authentication are not available, and HTTP Basic Authentication is the
only method to authenticate the clients.
l Server Name Indication (SNI) SNI can match domains to certificates using either simple string or regular
expression.
l Certificates
l Support ECDSA certificate for offloading and inspecting HTTPs, authenticating other devices'
certificates and administrators' Web UI login.
l Support the ability to replace the certificate that FortiWeb uses for secure accesses (HTTPS) to its
management interface.
l Support Certificate-based authentication for FortiWeb's Web UI login.
See Certificate-based Web UI login and How to change FortiWeb's default certificate.
l Buffer size for parsing multipart/form-data requests The buffer size used for parsing requests whose
content-types are multipart/form-data can be increased through setting max-multipart-buffsize-per-
arg in CLI command config system advanced.
l GEO IP
l A dedicated database is added to enhance FortiWeb's GEO IP for identifying more exact locations of
IPv6 addresses.
l It is no longer required to periodically manually upload the GEO IP database. FortiWeb automatically
and transparently updates the database from the FortiGuard Distribution Servers. The interface to
manually upload the database is kept for those deployments that do not have an Internet connection.
l Custom Signature A new action "Erase, no Alert" is added (in the response direction) for FortiWeb to react
when information disclosure is detected.
l Cookie Security Configuration of Cookie Replay for a cookie security policy is available only if Security
Mode is selected as Encrypted.
l Network IPv6 addressing through DHCP is supported on FortiWeb's physical network interfaces, VLAN
subnetwork interface and link aggregation interfaces.
l Logging From this release, FortiWeb's Attack Log and Traffic Log contains the field Referer of HTTP
requests.
l URL Rewriting URL Rewrite supports RSS XML content type. application/rss+xml becomes one
of the options in Content Type Set for creating an URL Rewriting Rule to rewrite the body of the HTTP
requests.
l Policy Routing To support one-arm network deployments for FortiWeb's Policy Routing, configuring a
policy route rule without specifying the gateway is allowed.
l Config-Synchronization From this release, FortiWeb will not synchronize configurations of FTP backup
(System > Maintenance > FTP backup) and SNMP (System > Config > SNMP) to the peer while performing full
Config-Synchronization.
l System Time FortiWeb's system time data was updated for the announce that Turkey scraps Daylight Saving
Time (DST).
l SSL The OpenSSL employed by FortiWeb was upgraded to 1.0.2j.
l FortiWeb 2000E Support new model FortiWeb 2000E.
FortiWeb 5.6
l Enhanced cookie security The cookie poisoning settings are now part of the new cookie security policy,
which allows you to configure additional ways to prevent cookie-based attacks. For example, you can encrypt
the cookies issued by a back-end server or add security attributes to them.
l Logging
l Log filter You now search logs in the web UI by adding a filter that matches messages found in the
most recent 100,000 messages in the attack, event, or traffic log. You can specify one or more values
to match, including the action, severity level, or message. (When searching by date and time, all
messages with the selected date are displayed.)
l Log file size The log file no longer has a maximum size. Each log file can contain approximately
50,000 log records.
l Improved hard disk log storage Logging enhancements have improved performance when
FortiWeb logs messages to the local hard disk. Recording traffic and event log messages in the local
random access memory (RAM) of the FortiWeb appliance is no longer supported.
See Logging.
l Site Publishing
l Multiple authentication servers Site publishing rules now authenticate clients using a
member of a pool of authentication servers. The pool can contain LDAP servers, RADIUSservers,
or both.
l User lock out You can define an account lockout policy to prevent account cracking by locking
an account out after several failures logging into FortiWeb.
l Integrated stateful firewall The new system firewall settings allow you to add basic stateful firewall
functionality to your FortiWeb appliance.
l FortiWeb Manager administrative access You now configure access to a FortiWeb appliance from
FortiWeb Manager using a specific FortiWeb Manager administrative access setting. (Access by FortiWeb
Manager via HTTPS administrative access is no longer supported.)
l Data capture using DPDK For models 3000E, 3010E and 4000E, when the operation mode is offline
protection, the network interfaces assigned as data capture ports now use Data Plane Development Kit
(DPDK) for packet processing.
l Optional compression for alert emails You are allowed to determine whether to apply compression to
an alert email policy or not. With the compression function being enabled, event logs and alerts will be
attached to the emails in ZIP format, otherwise they will be attached in TXT format.
For more information, see Logging and the FortiWeb-VM for Azure Install Guide.
l KVM ttyS0 console support You can now configure a FortiWeb-VM instance you deploy on
KVM with the console /dev/ttyS0 in addition to the console /dev/console.
l User tracking The new user tracking feature allows you to track sessions by user and capture a username
to reference in traffic and attack log messages. You can also use this feature to prevent a session fixation
attack and set a period of time during which FortiWeb blocks requests with a session ID from a timed-out
session.
l JSONprotocol detection You can now configure inline and offline protection profiles to scan for matches
with attack and data leak signatures in JSON data submitted by clients in HTTP requests with Content-
Type: values application/json or text/json.
For more information, see Configuring a protection profile for inline topologies and Configuring a protection
profile for an out-of-band topology or asynchronous mode of operation.
l WebSocket HTTP protocol constraint You can now configure an HTTP protocol constraint to detect and
take action against traffic that uses the WebSocket TCP-based protocol. (By default, FortiWeb allows
WebSocket traffic to pass through.)
l Check uploaded files for Trojans You can now configure a file upload restriction policy to scan uploaded
files for Trojans.
l Reverse proxy: connect to back-end server using client IP By default, when the operation mode is
reverse proxy, the source IP for connections between FortiWeb and back-end servers is the address of a
FortiWeb network interface. You can configure FortiWeb to use the source IP address of the client that
originated the request when it connects to a back-end server on behalf of that client.
l HTTP content routing policies can match X509 certificate extension field content The HTTP
content routing policy settings that match X509 certificate content now allow you to match values found in
either in the client certificate's extension field or subject field.
l Token-based CSRF protection You can now specify web pages that FortiWeb protects from CSRF
attacks. To enable the feature, you specify both the web pages to protect and the URLs found in requests that
the web page generates.
l Real Time Monitor widget enhancements The Real Time Monitor widget on the Status dashboard has new
graphics and provides the option to view a specific attack type in the Attack Event History.
l CLI commands
l Session clean up command The new command execute session-cleanup allows you to
immediately clean up all sessions.
l Configure when FortiWeb clears the hash table entry for a FortiSandbox suspicious file
The config system fortisandbox command now allows you to set how long FortiWeb waits
before it clears the hash table entry for an uploaded file that was evaluated by FortiSandbox.
l True transparent proxy: Replace source MAC address When the operation mode is true
transparent proxy, by default, traffic to the back-end servers preserves the MAC address of the source.
The config system v-zone command now allows you to configure FortiWeb to use the MAC
address of the FortiWeb network interface instead.
For more information, see the FortiWeb CLI Reference.
l Deploy FortiWeb-VM on OpenStack You can now use the KVMversion of the FortiWeb-VM software to
deploy a virtual appliance on the OpenStack cloud computing platform using Cloud Init.
l FortiSandbox Cloud support You can now configure FortiWeb to upload files to FortiSandbox Cloud for
evaluation (requires FortiWeb FortiGuard Sandbox Cloud Service subscription).
l HA
l Independent management interfaces for HA cluster members You can now specify a network
interface that provides administrative access to an appliance when it is a member of an HA cluster. This
interface allows you to directly manage a cluster member and gives it a unique identity on your network.
l Access an HA cluster member configuration from another member You can now use the CLI
command execute ha manage to log into another appliance in the same HA group via the HA link.
l HA synchronization via TCP FortiWeb now uses unicast TCP to synchronize the configuration
between HA cluster members.
l Advanced SSL settings for server pool members When the operation mode is reverse proxy, you can
now select which versions of SSL and TLS and which cipher suites are supported for connections between
FortiWeb and an individual server pool member. For true transparent proxy and WCCP modes, these settings
now apply to connections between FortiWeb and the server pool member as well as SSL/TLS offloading.
l Increase file upload size to 100MB The maximum size you can specify for a file upload limit is now
102400 kilobytes. This is also the new maximum size of Maximum Antivirus Buffer Size, which is the
buffer that FortiWeb uses to temporarily undo the compression that a client or web server has applied to traffic
in order to inspect or modify it.
See Limiting file uploads on page 637 and Connecting to FortiGuard services on page 190.
l Increase maximum number of IP addresses that Period Block can block FortiWeb can now
temporarily block up to 10,000 client IP addresses at a time. These are addresses FortiWeb blocks because
the client violated a rule whose Action is Period Block.
l Column settings and filters For information that the web UI displays in columns, new settings allow you to
select the columns to display or remove any column filters you have added. Many columns also now allow you to
click the filter icon to filter the column by specifying a string.
l Use interface IP address for virtual server address You can now configure a virtual server to use the IP
address of the specified network interface. This is useful for Microsoft Azure and AWS deployments where
FortiWeb communicates with the Internet using a cloud-based load balancer.
l Support for more server pools For some models, the total number of server pools that an individual
appliance can support has increased.
l Hostname as Radius NAS Identifier When you configure a Radius query, FortiWeb now uses the
appliance host name (which you can configure) as the Radius NAS identifier instead of a predefined, string
that you cannot edit.
See Changing the FortiWeb appliances host name on page 718 and Configuring RADIUS queries on page
303.
l Maintainer user removed FortiWeb no longer provides the maintainer administrator account. (In previous
releases, this account allowed you to reset the password for the admin account using a console connection.)
l HTTP Request Filename Length constraint A set of HTTP protocol constraints can now specify the
maximum acceptable length in bytes of the HTTP request filename.
l FortiWeb 3010E and FortiWeb 4000E (second generation) The new 3010E and updated 4000E models
come with two 10-Gigabit Ethernet port pairs that are wired for bypass/ fail-open.
l V-zone member monitoring When the FortiWeb operation mode is true transparent proxy, you can now
configure it to monitor v-zone (bridge) members. When monitoring is enabled, if a network interface that
belongs to the v-zone goes down, FortiWeb automatically brings down the other members.
l Support for CRLservices that require HTTP/1.1 FortiWeb can now import a certificate revocation list
(CRL) from an HTTP site that provides a CRL service and requires the HTTP/1.1 protocol.
l HTTPS and SSL server health checks use TLS 1.0 Server health checks that use HTTP or SSL now
use TLS 1.0.
l Alert for log disk utilization A new log setting allows you to configure FortiWeb to generate an alert
when its log disk usage exceeds a percentage you specify.
See Enabling log types, packet payload retention, & resource shortage alerts on page 753.
l IPv6 support for SNMP communities You can now use an IPv6 address to specify the SNMP manager
that can receive traps from and query the FortiWeb appliance.
l Configure network interfaces to support jumbo frames A new setting for the config system
interface and config system v-zone CLIcommands allows you to configure the maximum
transmission unit (MTU) for network interfaces. This configuration allows the network interfaces to support
Ethernet frames with more than 1500 bytes of payload.
l Signatures
l Threat scoring The threat scoring feature allows you to configure your signature policy to take
action based on multiple signature violations by a client, instead of a single signature violation. When
a client violates a signature in a threat scoring category, it contributes to a combined threat score.
When the combined threat score exceeds a maximum value you specify, FortiWeb takes action. You
specify whether the combined threat score calculation is based on HTTPtransactions or sessions, or
TCP sessions.
See .
l Send HTTP response You can configure FortiWeb to block and reply to clients that violate a
signature rule with an HTTP error message (attack block page) instead of resetting the connection.
This is useful if your load balancer uses TCP multiplexing, where each TCP connection can send
requests from multiple clients. Use the replacement messages settings to customize the attack block
page and HTTP error code that the client receives.
See Blocking known attacks & data leaks on page 538 and Defining custom data leak & attack
signatures on page 563.
l Detect XSS in Referer field Signatures included in the category Cross Site Scripting (Extended) can
now prevent attackers from enabling cross-site scripting via the Referer: HTTP header field.
l Server pools
l New load balancing algorithms The 5 new load balancing algorithms determine how to
distribute new TCP connections using a hash. FortiWeb generates the hash based on the HTTP
request (for example, the URI or host name).
l View member status In the server pool settings, a new column in the list of members displays the
current status of a pool member.
l WCCP traffic redirection using Layer 2 The WCCP configuration now allows you to select Layer 2 (L2)
as the cache engine method. L2 redirection overwrites the original MAC header of the IP packets and replaces
it with the MAC header for the WCCP client.
l Qualys WAS integration The web scanner integration framework now allows you to import scan results
from Qualys Web Application Scanning (WAS).
l Increase file upload size to 30MB The maximum size you can specify for a file upload limit is now 30720
kilobytes. This is also the new maximum size of the memory buffer that FortiWeb uses when it updates the
FortiWeb virus database via FortiGuard services.
See Limiting file uploads on page 637 and Connecting to FortiGuard services on page 190.
l CLI command to disable maintainer account The config system global command now
includes an option that enables or disables the maintainer administrator account. This account is enabled by
default and allows you to reset the password for the admin account using a console connection.
l FortiWeb 400D A new mid-range model that can replace the 400C.
l FortiWeb-VM
l Support for VMware vSphere HA vSphere High Availability (HA) allows you to pool virtual machines
and the hosts they reside on into a cluster. In the event of a failure, the HA feature restarts the virtual
machines on a failed host on alternate hosts. This alternative to FortiWeb HA requires no HA configuration
on the FortiWeb.
l Support for VMware Tools You can now install VMware Tools for FortiWeb-VM deployed on vSphere.
FortiWeb 5.5
l New and enhanced HTTP content routing methods You can now route traffic by URL, HTTP
parameter, HTTP header, source IP address (single or a range), or an X509 Certificate field. You can
also concatenate the routing rules. For example, you can require traffic to match multiple rules or only
one rule among many.
l New and enhanced session persistence types You can now configure session persistence
based on source IP, HTTP header, URL parameter, SSL session ID or additional cookie-based
options.
l Connection limit for server pool member You can now specify the maximum number of TCP
connections that FortiWeb forwards to this pool member.
l New server health check types The two new methods for checking the health of a server in a
pool are TCP Half Open and TCP SSL.
l Site publishing
l Change password after login The HTML form authentication login page now includes an option
that allows users to change their password immediately after they log in. FortiWeb displays a change
password form after the user successfully logs in.
l Prompt for incorrect login credentials If your site publishing configuration uses HTML form
authentication and users try to log in with an incorrect user name or password, FortiWeb now displays a
message that describes why the attempt was unsuccessful.
l Signatures
l Signature wizard You can now automatically generate a signature policy that contains only
signature categories that are relevant to the databases and web servers found in your environment.
l New user interface The new UI makes it easier to review and configure the list of signatures in a
signature policy.
l New search and filter options When you view signature details, you can now search the list of
individual signatures using a keyword. Also, you can filter the list to display only signatures that are
configured with exceptions or search for signatures using a CVE ID.
l Additional criteria in signature exceptions In addition to using host names and URLs, you can
now specify which requests FortiWeb does not scan using elements such as HTTP methods, client IP,
and cookie name, either individually or in combination.
See Configuring action overrides or exceptions to data leak & attack detection signatures on page 556.
l False positive mitigation feature for SQL injection signatures To reduce false positives,
FortiWeb can now perform additional lexical and syntax analysis after a SQL injection signature
matches a request. You can disable this feature for one or both of the SQL injection signature
categories, or disable it for individual signatures within the categories.
l Custom signature rule enhancements You can now specify a value to match for each meet
condition rule in a custom signature. The value can be either a regular expression to match or a value
to compare to the target's value (greater than, less than, and so on).
See Defining custom data leak & attack signatures on page 563.
l FortiGate integration
l Quarantined IPs You can now specify a FortiGate appliance that transmits its list of quarantined
source IPs to FortiWeb at regular intervals. You can then configure an inline protection policy to detect
these IPs.
l WCCP You can now configure FortiWeb as a WCCP client that receives and inspects specified
traffic from a FortiGate unit.
l IBM Security AppScan, WhiteHat Sentinel, and HP WebInspect integration The web scanner
integration framework now allows you to import scan results from IBM Security AppScan Standard, WhiteHat
Sentinel, and HP WebInspect.
l Web Anti-Defacement
l Automatically acknowledge changed files The web anti-defacement settings now allow you to
configure FortiWeb to automatically acknowledge (accept) any changes that it detects.
l Acknowledge all changed files A new option allows you to acknowledge all items in the list of
changed files.
l Web site name and full file path in alert email The alert email that FortiWeb sends when a web site
file changes now includes the name of the web anti-defacement configuration for the web site as well as the
full directory path for the changed file.
l Automatic support for HTTP pipelining Instead of requiring you to manually enable HTTP pipelining,
FortiWeb now automatically identifies and supports clients that request it.
l New user interface The new user interface organizes the constraints into categories. You can click a
constraint name to display its description.
l HA synchronization uses unicast High availability synchronization traffic between HAcluster appliances is
now transmitted using unicast instead of multicast. (HA heartbeat traffic still uses multicast.)
l Cipher suites
l Customizable ciphers per policy or pool member In addition to selecting a medium or high-
security configuration, you can now select a custom set of cipher suites for a server policy or server
pool member.
See Configuring a server policy on page 677 or Creating a server pool on page 359
l ChaCha-Poly1305 cipher support A new CLI command allows you to add support for the
ChaCha-Poly1305 cipher suite to a server policy.
l Network interfaces user interface The web UI display and settings for configuring network interfaces are
now similar to the ones that FortiGate appliances use.
l SNMP version 3 support When you create an SNMP community, you can now enable the traps for SNMP
v3 instead or in addition to SNMP v1 and v2c.
l Microsoft Azure support FortiWeb-VM is now available for deployment on the Microsoft Azure cloud
computing platform.
l Predefined, optimized protection profile for Drupal Use this new profile as-is or clone it to create a
custom profile.
See Configuring a protection profile for inline topologies on page 658 and Configuring a protection profile for
an out-of-band topology or asynchronous mode of operation on page 669
l Period block for transparent inspection and offline protection mode If the operation mode is transparent
inspection or offline protection and Period Block is the action FortiWeb takes against traffic that violates a policy,
FortiWeb now attempts to block a client that has violated the policy for the length of time specified by Block
Period.
l Message ID in Attack Block page The unique message ID is now displayed on the error page FortiWeb uses
to respond to HTTP request that it blocks. You can use this ID to search attack logs for additional information.
l Full URL in attack and traffic log messages When FortiWeb sends attack and traffic log messages to
Syslog and FortiAnalyzer, it now includes the full URL, including URL parameters, instead of just the name of the
requested file.
l Send reports to FTP/TFTP server Report configuration now allows you to automatically send reports to a
specified FTP or TFTP server.
See Selecting the reports file type & delivery options on page 802.
l Display update daemon information The diagnose system update infocommand displays
update information, including when FortiWeb last updated signatures and other databases, any recent update
errors, and the time of the next scheduled update.
l HSM integration SafeNet Luna SA You can use the hsm setting of the config system global
command to display HSMintegration settings to the web UI. These settings integrate FortiWeb and SafeNet
Luna SA HSM to retrieve a per-connection, SSL session key instead of loading the private key and certificate
stored on FortiWeb.
FortiWeb 5.4
l FortiSandbox integration You can now use a file upload restriction policy to submit uploaded files to
FortiSandbox for evaluation. If FortiSandbox identifies a file as a threat, FortiWeb generates a corresponding attack
log message and can block further attempts to upload the file.
For more information, see the FortiWeb Manager Installation and Administration Guide.
l RESTful API support Use the RESTful API to manage the settings of FortiWeb appliances or the central
manager.
l Backup server for pools You can now specify one or more server pool members to which FortiWeb directs
traffic only when all other members are unavailable.
l HTTP content routing policies can inherit web protection profiles When you configure a server policy,
instead of assigning web protection profiles to each HTTP content routing policy, you can now configure the routing
policies to inherit the profile that the server policy uses.
l Send log messages to multiple Syslog servers Each Syslog policy can now create connections to up to 3
Syslog servers.
Key concepts
If you are new to FortiWeb, or new to security, this chapter can help you to quickly understand.
Workflow
Sequence of scans
IPv6 support
Solutions for specific web attacks
HTTP/2 support
HTTP sessions & security
HA heartbeat & synchronization
Administrative domains (ADOMs)
How to use the web UI
Shutdown
See also
Workflow
Begin with How to set up your FortiWeb on page 83 for your initial deployment. These instructions guide you to
the point where you have a simple, verifiably working installation.
Ongoing use is located in the chapters after How to set up your FortiWeb on page 83. Once you have
successfully deployed, ongoing use involves:
l Backups
l Updates
l Configuring optional features
l Adjusting policies if:
l New attack signatures become available
l Requirements change
l Fine-tuning performance
l Periodic web vulnerability scans if required by your compliance regime
l Monitoring for defacement or focused, innovative attack attempts from advanced persistent threats (APTs)
l Monitoring for accidentally blacklisted client IPs
l Using data analytics to show traffic patterns
Except for features independent of policies such as anti-defacement, most features are configured before
policies. Policies link protection components together and apply them. As such, policies usually should be
configured last, not first.
Sequence of scans
To improve performance, block attackers using the earliest possible technique in the
execution sequence and/or the least memory-consuming technique.
The blocking style varies by feature and configuration. For example, when detecting
cookie poisoning, instead of resetting the TCP connection or blocking the HTTP
request, you could log and remove the offending cookie. For details, see each specific
feature.
Scan/action Involves
Scan/action Involves
Add X-Real-IP:
Allow Known Search Engines Source IP address of the client in the IP layer
Real Browser Enforcement Tests whether the client is a web browser or automated tool.
l Cookie:
HTTP Request Limit/sec
l Session state
(HTTP Flood Prevention)
l URL in the HTTP header
TCP Connection Number Limit Source IP address of the client (depending on your configuration of X-
(Malicious IP) header rules (see Defining your proxies, clients, & X-headers on page 386)
this could be derived from either the SRC field in the IP header, or an HTTP
header such as X-Forwarded-For: or X-Real-IP:)
Scan/action Involves
Brute Force Login l Source IP address of the client (depending on your configuration of X-
header rules (see Defining your proxies, clients, & X-headers on page
386) this could be derived from either the SRC field in the IP header, or an
HTTP header such as X-Forwarded-For: or X-Real-IP:)
l URL in the HTTP header
l Cookie: cookiesession1
Global White List l URL if /favicon.ico, AJAX URL parameters such as __LASTFOCUS,
and others as updated by the FortiGuard Security Service
l Host:
Padding Oracle Protection l URL in HTTP header
l Individually encrypted URL, cookie, or parameter
l Host:
Page Access (page order) l URL in HTTP header
l Session state
Scan/action Involves
l Host:
Parameter Validation l URL in the HTTP header
l Name, data type, and length
l Host:
Web Cache l URL in the HTTP header
l Size in kilobytes (KB) of each URL to cache
l Host:
Hidden Fields Protection l URL in the HTTP header
l Name, data type, and length of <inputtype="hidden">
Scan/action Involves
Client Certificate Forwarding Clients personal certificate, if any, supplied during the SSL/TLS
handshake
IPv6 support
If the FortiWeb operating mode is reverse proxy, offline inspection, or transparent inspection, the following
features support IPv6-to-IPv6 forwarding, as well as NAT64, to support environments where legacy back-end
equipment only supports IPv4.
l IP/Netmask for all types of network interfaces, DNS settings, and Gateway and Destination IP/Mask for IP-layer
static routes
l Virtual Server/V-zone
l Server Pool
l Server Health Check
l Protected Hostnames
l Add HSTS Header
l X-Forwarded-For
l Session Management
l Cookie Security Policy
l Signatures
l Custom Policy
l Parameter Validation
l Hidden Fields Protection
l File Upload Restriction
l HTTP Protocol Constraints
l Brute Force Login
l URL Access
l Page Access (page order)
l Start Pages
l Allow Method
l IP List (manual, individual IP blacklisting/whitelisting)
l File Compress/File Uncompress
l Auto-learning
l Vulnerability scans
l Configuring the global objectwhitelist
l Chunk decoding
l FortiGuard server IP overrides (Connecting to FortiGuard services)
l URL Rewriting (also redirection)
l Data Analytics
l HTTP Authentication and LDAP, RADIUS, and NTLM profiles
l Geo IP
l DoS Protection
l SNMP traps & queries
l IP Reputation
l Device Tracking
l HTTP Header Security
If a policy has any virtual servers or server pools that contain physical or domain
servers with IPv6 addresses, it does not apply these features, even if they are
selected.
l Shared IP
l Policy bypasses for known search engines
l Firewall
l Log-based reports
l Alert email
l Syslog and FortiAnalyzer IP addresses
l NTP
l FTP immediate/scheduled
l SCEP
l Anti-defacement
l HA/Configuration sync
l exec restore
l exec backup
l exec traceroute
l exec telnet
The types of attacks that web servers are vulnerable to are varied, and evolve as attackers try new strategies.
FortiWeb appliances offer numerous configurable features for preventing web-related attacks, including denial-
of-service (DoS) assaults, brute-force logins, data theft, and more.
Early in your deployment of FortiWeb, configure and run web vulnerability scans to
detect the most common attack vulnerabilities. You can use this to discover attacks
that you may be vulnerable to. For more information, see Vulnerability scans on page
703.
HTTP/HTTPS threats
Servers are increasingly being targeted by exploits at the application layer or higher. These attacks use
HTTP/HTTPS and aim to compromise the target web server, either to steal information, deface it, or to post
malicious files on a trusted site to further exploit visitors to the site, using the web server to create botnets.
Among its many threat management features, FortiWebs fends off attacks that use cross-site scripting, state-
based, and various injection attacks. This helps you comply with protection standards for:
Web-related threats lists several HTTP-related threats and describes how FortiWeb appliances protect servers
from them. FortiWeb can also protect against threats at higher layers (HTML, Flash or XML applications).
Web-related threats
Adobe Flash binary Attackers attempt XSS, Decode and scan Flash Enable AMF3
(AMF) protocol attacks SQL injection or other action message format Protocol Detection
common exploits through (AMF) binary data for
an Adobe Flash client. matches with attack
signatures.
Utilizes zombies
previously exploited or
infected (or willingly
Decode and scan Flash
participating), distributed
action message format
usually globally, to
Botnet (AMF) binary data for IP Reputation
simultaneously
matches with attack
overwhelm the target
signatures.
when directed by the
command and control
server(s).
An attacker attempts to
gain authorization by Require strong passwords
Brute force login
repeatedly trying ID and for users, and throttle login Brute Force Login
attack
password combinations attempts.
until one works.
Credit card theft Attackers read users Detect and sanitize credit Credit Card
credit card information in card data leaks. Detection
replies from a web server.
Helps you comply with
credit card protection
standards, such as PCI
DSS 6.6.
Cross-site scripting Attackers cause a Content filtering, cookie Cross Site Scripting
(XSS) browser to execute a security, disable client-side
client-side script, allowing scripts.
them to bypass security.
HTTP header overflow Attackers use specially Limit the length of HTTP HTTP Protocol
crafted HTTP/HTTPS protocol header fields, Constraints
requests to target web bodies, and parameters.
server vulnerabilities
(such as a buffer
overflow) to execute
malicious code,
escalating to
administrator privileges.
Man-in-the-middle A device located on the Redirect clients from HTTP l HTTPS Service
(MITM) same broadcast network to secure HTTPS, then l Add HSTS Header
or between the client and encrypt all traffic and
l URL Rewriting
server observes prevent subsequent
unencrypted traffic accidental insecure access.
between them. This is
often a precursor to other
attacks such as session
hijacking.
Malformed XML To exploit XML parser or Validate XML formatting for Illegal XML Format
data modeling bugs on closed tags and other basic Caution: Unlike
the server, the client language requirements. XML protection
sends incorrectly formed profiles in previous
tags and attributes. versions of
FortiWeb, Illegal
XML Format does
not check for
conformity with the
object model or
recursive payloads.
DoS attacks
A denial of service (DoS) attack or distributed denial-of-service attack (DDoS attack) is an attempt to overwhelm a
web server/site, making its resources unavailable to its intended users. DoS assaults involve opening vast
numbers of sessions/connections at various OSI layers and keeping them open as long as possible to overwhelm
a server by consuming its available sockets. Most DoS attacks use automated tools (not browsers) on one or
more hosts to generate the harmful flood of requests to a web server.
A DoS assault on its own is not true penetration. It is designed to silence its target, not for theft. It is censorship,
not robbery. In any event, a successful DoS attack can be costly to a company in lost sales and a tarnished
reputation. DoS can also be used as a diversion tactic while a true exploit is being perpetrated.
The advanced DoS prevention features of FortiWeb are designed to prevent DoS techniques, such as those
examples listed in the table DoS-related threats, from succeeding. For best results, consider creating a DoS
protection policy that includes all of FortiWebs DoS defense mechanisms, and block traffic that appears to
originate from another country, but could actually be anonymized by VPN or Tor. For more information on policy
creation, see DoS prevention on page 487 and Blacklisting source IPs with poor reputation on page 465.
DoS-related threats
Slow POST attack Sends multiple HTTP POST requests with a l URL Access
legitimate Content-Length: field. This tells the l Allow Method
web server how much data to expect. Each POST
message body is then transmitted at an unusually
slow speed to keep the connection from timing out,
and thereby consuming sockets.
SYN flood Sends a stream of TCP SYN packets. The target Syn Cookie
server acknowledges each SYN and waits for a
response (ACK). Rather than respond, the attacker
sends more SYN packets, leaving each connection
half-open, not fully formed, so that it may not
register on systems that only monitor fully formed
connections. Since each half-formed connection
requires RAM to remember this state while awaiting
buildup/tear-down, many SYN signals eventually
consume available RAM or sockets.
HTTP/2 support
If the FortiWeb is deployed in Reverse Proxy (see Topology for reverse proxy mode) or True Transparent Proxy
(see Topology for either of the transparent modes) mode, HTTP/2 web communication can be protected by the
following FortiWeb's security services:
When the FortiWeb is operating in Reverse Proxy mode, it provides the end-to-end HTTP/2 security which
requires both clients and back-end servers running HTTP/2. Moreover, if the back web servers do not support
HTTP/2, FortiWeb (in Reverse Proxy mode) providers the HTTP/2 protections also with conversion protocols
between HTTP/2 clients and HTTP/1.1 back-end servers. This allows customers to enjoy HTTP/2 benefits
without having to upgrade their back web servers. Therefore, when the FortiWeb is operating in Reverse Proxy
mode, it requires two necessary configurations for the HTTP/2 security:
l Server Policy: Enable HTTP/2 in a Server Policy (see HTTP/2 in Configuring a server policy), so that HTTP/2
can be negotiated between FortiWeb and clients via SSL ALPN (Application-Layer Protocol Negotiation) during the
SSL handshake, if the client's browser supports HTTP/2 protocol. Then, FortiWebcan recognize HTTP/2 traffic and
apply the security services to it.
l Server Pool: Enable HTTP/2 for a Server Pool (see HTTP/2 in Creating a server pool) if your back-end web
servers are running HTTP/2. This indicates HTTP/2 communicate between the FortiWeb and the back servers in
the server pool. HTTP/2 Traffic processed by FortiWeb will be forwarded to the back web servers through HTTP/2.
However, if your web servers do not support HTTP/2, keep the option disabled and FortiWeb will converse the
processed HTTP/2 traffic to HTTP/1.x, then forward it to the back servers. Please note that enable this only if
your back web servers really support HTTP/2, or connections will go failed.
When FortiWeb operates in Reverse Proxy mode, HTTP Content Routing (see
Routing based on HTTP content) will be not supported if HTTP/2 security inspection
is enabled.
Conversion between HTTP/2 clients and HTTP/1.1 back-end servers is not available when the FortiWeb is
operating in True Transparent Proxy mode. Therefore, FortiWeb's HTTP/2 inspection must work with the back
web servers that really support HTTP/2. When your FortiWeb is operating in True Transparent Proxy mode, only
one configuration is required to enable the HTTP/2 support:
l Server Pool: Enable SSL and HTTP/2 for a Server Pool (see Creating a server pool). Please make sure your
back-end web servers are running HTTP/2, or no HTTP/2 connections will be established between clients and the
back servers and enabling HTTP/2 support on the FortiWeb will be kind of meaningless.
Note that FortiWeb only supports HTTP/2 for HTTPS (SSL) connections (most browsers support HTTP/2 for only
HTTPS). Therefore, for deployment in Reverse Proxy or True Transparent Proxy mode, HTTPS or SSL on the
FortiWeb must be enabled for HTTP/2.
The HTTP 1.1 protocol itself is stateless (i.e., has no inherent support for persistent sessions). Yetmany web
applications add sessions to become stateful.
Why?
Sessions are a correlation of requests for individual web pages/data (hits) into a sense of an overall visit for a
client during a time span, but also retain some memory between events. They typically consist of a session ID
coupled with its data indicating current state. Classicexamples include logins, showing previously viewed items,
and shopping carts.
Thereason why HTTP applications must add sessions is related to how software works: software often changes
how it appears or acts based upon:
l press the button to return your money before you have inserted any money
the machine will do nothing. The machine is designed so that it must be in the state where it has received
enough money before it will dispense the snack (or return your change).
If the vending machine had no notion of states, it would dispense free snacks or change regardless of whether
it had received any money.
While free snacks might make some hungry people happy, it is not the intended behavior. We would say that the
vending machine is broken.
Similar to the working vending machine, in the TCP protocol, a connection cannot be acknowledged (ACK) or
data sent (PSH) before the connection has been initiated (SYN). There is a definite order to valid operations,
based upon the operation that preceded it. If a connection is not already established not in a state to receive
data then the receiver will disregard it.
Similar to the broken vending machine, the naked HTTP protocol has no idea what the previous HTTP request
was, and therefore no way to predict what the next one might be. Nothing is required to persist from one request
to the next. While this was adequate at the time when HTTP was initially designed, when it purely needed to
retrieve static text or HTML documents, as the World Wide Web evolved, this was no longer enough. Static pages
evolved into dynamic CGI-generated and JavaScripted pages. Dynamic pages use programs to change the page.
Scripted pages eventually evolved to fully-fledged multimedia web applications with their own client-server
architecture. As pages became software in their own right, a need for sessions arose.
When a web application has its own native authentication, the session may correspond directly with its
authentication logs server-side sessions may start with a login and end with a logout/session timeout. Within
each session, there are contexts that the software can use to determine which operations make sense. For
example, for each live session, a web application might remember:
For example, a web application session may remember that a client has authenticated. But unless it also knows
what pages that client is authorized to use, there might be nothing to prevent that person from ignoring the links
on the current web page and entering a non-authorized URL into their web browser to steal secret information.
If they do not enforce valid state transitions and guard session IDs and cookies from fraud (including sidejacking
attacks made famous by Firesheep) or cookie poisoning, webapplications become vulnerable to state transition-
based attacks attacks where pages are requested out of the expected order, by a different client, or where
inputs used for the next page are not as expected. While many web applications reflect business logic in order to
function, not all applications validate state transitions to enforce application logic. Other web applications do
attempt to enforce the softwares logic, but do not do so effectively. In other cases, the state enforcement itself
has bugs. These are common causes of security vulnerabilities.
Similar to plain HTTP, SSL/TLS also keeps track of what steps the client has
completed in encryption negotiation, and what the agreed keys and algorithms are.
These HTTPS sessions are separate from, and usually in addition to, HTTP sessions.
Attacks on SSL/TLS sessions are also possible, such as the SPDY protocol/Deflate
compression-related CRIME attack.
Your web application may have its own sessions data one or more. These are
not the same as FortiWeb sessions, unless FortiWeb is operating in a mode that
does not support FortiWeb session cookies, and therefore uses your web
applications own sessions as a cue (see Session Key).
However, it can protect those sessions. To configure protection for your web
applications own sessions, see options such as Cookie Security Policy,
Parameter Validation, and Hidden Fields Protection.
For example, to reinforce authentication logic, you might want to require that a clients first HTTP request always
be a login page. All other web pages should be inaccessible until a client has authenticated, because out-of-order
requests could be an attempt to bypass the web applications authentication mechanism.
How can FortiWeb know if a request is the clients first HTTP request? If FortiWeb were to treat each request
independently, without knowledge of anything previous, it would not be able to remember the authentication
request, and therefore could not enforce page order.
To fill this need for context, enable Session Management. When enabled:
1. For the first HTTP/HTTPS request from a client, FortiWeb embeds a cookie in the responses Set-Cookie:
field in the HTTP header. It is named cookiesession1. (FortiWeb does not use source IP addresses and
timestamps alone for sessions: NAT can cloak multiple clients; clocks can be altered.)
If you have configured rules such as start page rules that are enforced when a page request is the first in a
session, FortiWeb can enforce them at this point.
2. Later requests from the same client must include this same cookie in the Cookie: field to be regarded as
part of the same session. (Otherwise, the request will be regarded as session-initiating, and return to the first
step.)
Attack blocked via a start page or page order rule with session management
3. After some time, if the FortiWeb has not received any more requests, the session will time out.
The next request from that client, even if it contains the old session cookie, will restart the process at step For
the first HTTP/HTTPS request from a client, FortiWeb embeds a cookie in the responses Set-Cookie: field in
the HTTP header. It is named cookiesession1. (FortiWeb does not use source IP addresses and timestamps
alone for sessions: NAT can cloak multiple clients; clocks can be altered.).
Exceptions to this process include network topologies and operation modes that do not
support FortiWeb session cookies: instead of adding its own cookie, which is not
possible, FortiWeb can instead cue its session states from your web applications
cookie. See Session Key.
Traffic logs include the HTTP/HTTPS session ID so you can locate all requests in each session. Correlating
requests by session ID can be useful for forensic purposes, such as when analyzing an attack from a specific
client, or when analyzing web application behavior that occurs during a session so that you can design an
appropriate policy to protect it. For details, see Viewing log messages on page 768 and the FortiWeb Log
Message Reference.
Because the new active appliance does not know previous session history,
after failover, for existing sessions, FortiWeb cannot enforce actions that are
based on:
l the order of page requests in that session IDs history, such as page order rules (see
Enforcing page order that follows application logic on page 586).
l the count or rate of requests that it remembers for that session ID, such as rate
limiting per session ID per URL, (see Limiting the total HTTP request rate from an IP
on page 488).
For more information on what data and settings are synchronized by HA, see HA heartbeat & synchronization on
page 57 and Configuration settings that are not synchronized by HA on page 59.
In the FortiWeb HA pair that protects the server pool, you have enabled Session Management, so the active
appliance (FortiWeb A) also adds its own cookie to the HTTP response from Magento. The HTTP response
therefore contains 2 cookies:
Login
Cook
ie:
name
=coo
kies
essi
Set-Cookie: name=cookiesession1...
on1.
..
Lets say you then update FortiWeb As firmware. During the update, the standby appliance (FortiWeb B) briefly
assumes the role of the active appliance while FortiWeb A is applying the update and rebooting (i.e. a failover
occurs).
After the failover, FortiWeb B would receive the next HTTP request in the session. Because it was previously the
standby when the client initiated the session, and FortiWeb session tables are not synchronized, FortiWeb B has
no knowledge of the FortiWeb session cookie in this request.
As a result, it cannot enforce sequence-specific features such as page order, since it does not know the session
history. However, a FortiWeb session cookie is present. Therefore FortiWeb B would permit the new request
(assuming that it has no policy violations).
es
Cook si
ie: on
1.
Login name
=coo
kies
essi
..
Set-Cookie: name=cookiesession1...
on1.
..
Since web application sessions are not the same as FortiWeb sessions, Magento sessions continue
and are unaffected by the failover.
If the client deletes their FortiWeb session cookie or it times out, FortiWeb B regards the next request as a new
FortiWeb session, adding a new FortiWeb session cookie to Magentos response and creating an entry in
FortiWeb Bs session table, enabling it to enforce page order and start page rules again.
You can group multiple FortiWeb appliances together as a high availability (HA) cluster (see Configuring a high
availability (HA) FortiWeb cluster on page 130). The heartbeat traffic indicates to other appliances in the HA
cluster that the appliance is up and alive. Synchronization ensures that all appliances in the cluster remain
ready to process traffic, even if you only change one of the appliances.
Heartbeat and synchronization traffic between cluster appliances occurs over the physical network ports selected
in Heartbeat Interface. Heartbeat traffic uses multicast on port number 6065 and the IP address 239.0.0.1.
Synchronization traffic uses TCP on port number 6010 and a reserved IP address. The HA IP addresses are hard-
coded and cannot be configured.
Ensure that switches and routers that connect to heartbeat interfaces are configured to
allow level2 frames. See Heartbeat packet Ethertypes on page 61.
Failover is triggered by any interruption to either the heartbeat or a port monitored network interface whose
length of time exceeds your configured limits (Detection Interval x Heartbeat Lost Threshold). When the active
(main) appliance becomes unresponsive, the standby appliance:
1. Notifies the network via ARP that the network interface IP addresses (including the IP address of the bridge, if
any) are now associated with its virtual MAC addresses
2. Assumes the role of the active appliance and scans network traffic
To keep the standby appliance ready in case of a failover, HA pairs also use the heartbeat link to automatically
synchronize most of their configuration. Synchronization includes:
Although they are not automatically synchronized for performance reasons due to large size and frequent
updates, you can manually force HA to synchronize. For instructions, see execute ha synchronize in the
FortiWeb CLI Reference. For a list of settings and data that are not synchronized, see Data that is not
synchronized by HA on page 58 and Configuration settings that are not synchronized by HA.
If you do not want to configure HA (perhaps you have a separate network appliance
implementing HA externally), you can still replicate the FortiWebs configuration on
another FortiWeb appliance. For more information, see Configuring a high availability
(HA) FortiWeb cluster on page 130
See also
l FortiWeb HTTP sessions FortiWeb appliances can use cookies to add and track its own sessions,
functionality that is not inherently provided by HTTP. For more information, see HTTP sessions & security on page
50. This state-tracking data corresponds in a 1:1 ratio to request volume, and therefore can change very rapidly. To
minimize the performance impact on an HA cluster, this data is not synchronized.
Failover will not break web applications existing sessions, which do not reside on
the FortiWeb, and are not the same thing as FortiWebs own HTTP sessions. The
new active appliance will allow existing web application sessions to continue. For
more information, see FortiWeb sessions vs. web application sessions on page
53.
FortiWeb sessions are used by some FortiWeb features. After a failover, these
features may not work, or may work differently, for existing sessions.
(New sessions are not affected.) See the description for each setting that uses
session cookies. For more information, see Sessions & FortiWeb HA on page 54.
l SSL/TLS sessions HTTPS connections are stateful in that they must be able to remember states such as the
security associations from the SSL/TLS handshake: the mutually supported cipher suite, the agreed parameters,
and any certificates involved. Encryption and authentication in SSL/TLS cannot function without this. However, a
new primary FortiWebs lack of existing HTTPS session information is gracefully handled by re-initializing the
SSL/TLS session with the client.This does not impact to the encapsulated HTTP application, has only an initial
failover impact during re-negotiation, and therefore is not synchronized.
l Log messages These describe events that happened on that specific appliance. After a failover, you may
notice that there is a gap in the original active appliances log files that corresponds to the period of its down time.
Log messages created during the time when the standby was acting as the active appliance (if you have configured
local log storage) are stored there, on the original standby appliance. For more information on configuring local log
storage, see Configuring logging on page 752.
l Generated reports Like the log messages that they are based upon, PDF, HTML, RTF, and plain text reports
also describe events that happened on that specific appliance. As such, report settings are synchronized, but report
output is not. For information about this feature, see Reports on page 791.
l Auto-learning data Auto-learning is a resource-intensive feature. To minimize the performance impact on an
HA cluster, this data is not synchronized. For information about this feature, see Auto-learning on page 207.
See also
Setting Explanation
Operation mode You must set the operation mode of each HA group member before
configuring HA. See Setting the operation mode on page 127.
Setting Explanation
Network interfaces Only the FortiWeb appliance acting as the main appliance, actively
scanning web traffic, is configured with IP addresses on its network
(reverse proxy or offline interfaces (or bridge).
protection mode only)
The standby appliance only uses the configured IP addresses if a
or failover occurs, and the standby appliance therefore assumes the role
of the main appliance. See Configuring the network interfaces on
Bridge page 162 or Configuring a bridge (V-zone) on page 175.
(true transparent proxy or If you have configured a reserved management port for a cluster
transparent inspection mode member, that configuration, including administrative access and other
only) settings, is not synchronized.
HA active status and The HA configuration, which includes Device Priority, is not synchronized
priority because this configuration must be different on the primary and secondary
appliances.
See also
Since the current active appliance will by definition have a greater uptime than a failed previous active appliance
that has just returned online, assuming each has the same number of available ports, the current active appliance
usually retains its status as the active appliance, unless Override is enabled. If Override is enabled, and if the
Device Priority setting of the returning appliance is higher, it will be elected as the active appliance in the HA
cluster.
Uptime is reset to zero if an appliance fails, or the status of any monitored port (per Port Monitor) changes.
3. The smallest Device Priority number (that is, 0 has the highest priority)
4. The highest-sorting serial number
Serial numbers are sorted by comparing each character from left to right, where 9 and
z are the greatest values, and result in highest placement in the sorted list.
See also
By default, HA heartbeat packets use the following Ethertypes, which are hard-coded and cannot be configured:
l Ethertype 0x8890 For HA heartbeat packets that cluster members use to find other cluster member and to
verify the status of other cluster members while the cluster is operating.
l Ethertype 0x8893 For HA sessions that synchronize the cluster configurations.
Because heartbeat packets are recognized as level2 frames, the switches and routers that connect to heartbeat
interfaces require a configuration that allows them. If these network devices drop level2 frames, they prevent
heartbeat traffic between the members of the cluster.
In some cases, if you connect and configure the heartbeat interfaces so that regular traffic flows but heartbeat
traffic is not forwarded, you can change the configuration of the switch that connects the HA heartbeat interfaces
to allow level2 frames with Ethertypes 0x8890 and 0x8893 to pass.
Administrative domains (ADOMs) enable the admin administrator to constrain other FortiWeb administrators
access privileges to a subset of policies and protected host names. This can be useful for large enterprises and
multi-tenant deployments such as web hosting.
ADOMs are not enabled by default. Enabling and configuring administrative domains can only be performed by
the admin administrator.
Enabling ADOMs alters the structure of and the available functions in the GUI and CLI, according to whether or
not you are logging in as the admin administrator, and, if you are not logging in as the admin administrator, the
administrator accounts assigned access profile.
l If ADOMs are enabled and you log in as admin, a superset of the typical CLI commands appear, allowing
unrestricted access and ADOM configuration.
config global contains settings used by the FortiWeb itself and settings shared by ADOMs, such as
RAID and administrator accounts. It does not include ADOM-specific settings or data, such as logs and
reports. When configuring other administrator accounts, an additional option appears allowing you to restrict
other administrators to an ADOM.
l If ADOMs are enabled and you log in as any other administrator, you enter the ADOM assigned to your account. A
subset of the typical menus or CLI commands appear, allowing access only to only logs, reports, policies, servers,
and LDAP queries specific to your ADOM. You cannot access global configuration settings, or enter other ADOMs.
By default, administrator accounts other than the admin account are assigned to the root ADOM, which
includes all policies and servers. By creating ADOMs that contain a subset of policies and servers, and
assigning them to administrator accounts, you can restrict other administrator accounts to a subset of the
FortiWebs total protected servers.
The admin administrator account cannot be restricted to an ADOM. Other administrators are restricted to their
ADOM, and cannot configure ADOMs or global settings.
To enable ADOMs
2. Go to System> Status> Status, then in the System Information widget, in the Administrative
Domains row, click Enable.
3. Log in again.
When ADOMs are enabled, and if you log in as admin, the navigation menu on the left changes: the top level
lists two ADOM items Global and root.
This menu and CLI structure change is not visible to non-global accounts; ADOM administrators navigation
menus continue to appear similar to when ADOMs are disabled, except that global settings such as network
interfaces, HA, and other global settings do not appear.
l Global contains settings that only admin or other accounts with the prof_admin access profile can change.
l root is the default ADOM.
4. Continue by defining ADOMs (Defining ADOMs).
To disable ADOMs
2. Go to System> Status> Status, then in the System Information widget, in the Administrative
Domains row, click Disable.
3. Continue by reconfiguring the appliance (How to set up your FortiWeb on page 83).
See also
l Permissions
l Defining ADOMs
l Assigning administrators to an ADOM
l Administrators
l Configuring access profiles
Defining ADOMs
Some settings can only be configured by the admin account they are global. Global settings apply to the
appliance overall regardless of ADOM, such as:
l operation mode
l network interfaces
l system time
l backups
l administrator accounts
l access profiles
l FortiGuard connectivity settings
l HA and configuration sync
l SNMP
l RAID
l vulnerability scans
l exec ping and other global operations that exist only in the CLI
Only the admin account can configure global settings.
In the current release, some settings, such as user accounts for HTTP authentication,
anti-defacement, and logging destinations are read-only for ADOM administrators.
Future releases will allow ADOM administrators to configure these settings separately
for their ADOM.
Other settings can be configured separately for each ADOM. They essentially define each ADOM. For
example, the policies of adom-A are separate from adom-B.
Initially, only the root ADOM exists, and it contains settings such as policies that were global before ADOMs
were enabled. Typically, you will create additional ADOMs, and few if any administrators will be assigned to the
root ADOM.
After ADOMs are created, the admin account usually assigns other administrator accounts to configure their
ADOM-specific settings. However, as the root account, the admin administrator does have permission to
configure all settings, including those within ADOMs.
To create an ADOM
The maximum number of ADOMs you can add varies by your FortiWeb model. The
number of ADOMs is limited by available physical memory (RAM), and therefore also
limits the maximum number of policies and sessions per ADOM. See AppendixB:
Maximum configuration values on page 907.
See also
1. If you have not yet created any administrator access profiles, create at least one. See Configuring access
profiles on page 282.
2. In the administrator accounts Access Profile setting, select the new access profile.
(Administrators assigned to the prof_admin access profile will have global access. They cannot be restricted
to an ADOM.)
3. In the administrator accounts Administrative Domain setting, select the accounts assigned ADOM.
Currently, in this version of FortiWeb, administrators cannot be assigned to more than one ADOM.
See also
l Administrators
l Configuring access profiles
l Defining ADOMs
l Permissions
This topic describes aspects that are general to the use of the web UI, a graphical user interface (GUI) that
provides access the FortiWeb appliance from within a web browser.
See also
l System requirements
l URL for access
l Permissions
l Maximum concurrent administrator sessions
l Global web UI & CLI settings
l Buttons, menus, & the displays
System requirements
The management computer that you use to access the web UI must have:
l a compatible web browser, such as Microsoft Internet Explorer 6.0 or greater, or MozillaFirefox 3.5 or greater
l Adobe Flash Player 10 or greater plug-in
To minimize scrolling, the computers screen should have a resolution that is a minimum of 1280x 1024 pixels.
The default URL to access the web UI through the network interface on port1 is:
https://192.168.1.99/
If the network interfaces were configured during installation of the FortiWeb appliance (see Configuring the
network settings on page 160), the URL and/or permitted administrative access protocols may no longer be in
their default state. In that case, use either a DNS-resolvable domain name for the FortiWeb appliance as the
URL, or the IP address that was assigned to the network interface during the installation process.
For example, you might have configured port2 with the IP address 10.0.0.1 and enabled HTTPS. You might have
also configured a private DNS server on your network to resolve FortiWeb.example.com to 10.0.0.1. In this case,
to access the web UI through port2, you could enter either https://FortiWeb.example.com/ or
https://10.0.0.1/.
For information on enabling administrative access protocols and configuring IP addresses for the FortiWeb
appliance, see Configuring the network settings on page 160.
If the URL is correct and you still cannot access the web UI, you may also need to
configure FortiWeb to accept login attempts for your administrator account from that
computer (that is, trusted hosts), and/or static routes. For details, see Administrators
on page 277 and Adding a gateway on page 179.
Workflow
While the heart of your security enforcement on FortiWeb is server policies, its individual settings are specified
in rules and exceptions, that are grouped into sets and selected in a profile before being applied to the server
policy. Often you will not be able to complete configuration of an item unless you have configured its chain of
prerequisites. For that reason, you may want to start with the most granular settings first.
For example, when configuring DoS protection, configuration must occur in this order:
3. Select the anti-DoS policy in a protection profile, and enable Session Management (Configuring a protection
profile for inline topologies on page 658).
4. Select the protection profile in a server policy (Configuring a server policy on page 677).
Permissions
Depending on the account that you use to log in to the FortiWeb appliance, you may not have complete access to
all CLI commands or areas of the web UI.
Together, both:
Similar to VDOMs on FortiGate, ADOMs on FortiWeb divide policies and other settings so that they each can be
assigned to a different administrators.
Autolearn Auto Learn > Auto LearnProfile > Auto Learn Profile WebUI
Configuration
System System ... except Network, Admin, and Maintenance tabs WebUI
Configuration
Server Policy Policy > Server Policy ... Server Objects ... Application Delivery WebUI
Configuration ...
* For each config command, there is an equivalent get/show command, unless otherwise
noted.
config access requires write permission.
get/show access requires read permission.
Unlike other administrator accounts, the administrator account named admin exists by default and cannot be
deleted. The admin administrator account is similar to a root administrator account. This administrator account
always has full permission to view and change all FortiWeb configuration options, including viewing and changing
all other administrator accounts and ADOMs. Its name and permissions cannot be changed. It is the only
administrator account that can reset another administrators password without being required to enter that
administrators existing password.
Set a strong password for the admin administrator account, and change the password
regularly. By default, this administrator account has no password. Failure to maintain
the password of the admin administrator account could compromise the security of
your FortiWeb appliance.
For complete access to all commands and abilities, you must log in with the administrator account named
admin.
See also
Trusted hosts
As their name implies, trusted hosts are assumed to be (to a reasonable degree) safe sources of administrative
login attempts.
Configuring the trusted hosts of your administrator accounts (Trusted Host #1, Trusted Host #2, and Trusted Host
#3) hardens the security of your FortiWeb appliance by further restricting administrative access. In addition to
knowing the password, an administrator must connect only from the computer or subnets you specify. The
FortiWeb appliance will not allow logins for that account from any other IP addresses. If all administrator
accounts are configured with specific trusted hosts, FortiWeb will ignore login attempts from all other computers.
This eliminates the risk that FortiWeb could be compromised by a brute force login attack from an untrusted
source.
Trusted host definitions apply both to the web UI and to the CLI when accessed through Telnet, SSH, or the CLI
Console widget. Local console access is not affected by trusted hosts, as the local console is by definition not
remote, and does not occur through the network.
Relatedly, you can white-list trusted end-user IP addresses. End users do not log in to the webUI, but their
connections to protected web servers are normally subject to protective scans by FortiWeb unless the clients are
trusted. See Blacklisting & whitelisting clients using a source IP or source IP range on page 471.
See also
l Administrators
l Configuring access profiles
l Permissions
For details, see Enable Single Admin User login on page 77.
Type the TCP port number on which the FortiWeb appliance will listen
for HTTP administrative access. The default is 80.
HTTP
This setting has an effect only if HTTP is enabled as an administrative
access protocol on at least one network interface. For details, see
Configuring the network interfaces on page 162.
HTTPS Type the TCP port number on which the FortiWeb appliance will listen
for HTTPS administrative access. The default is 443.
Select the certificate that FortiWeb uses for secure connections to its
Web UI (see How to offload or inspect HTTPS). Certificates that
HTTPS Server
stored in System > Admin > Admin Cert Local (How to change
Certificate
FortiWeb's default certificate) are listed here for options. defaultcert
is the Fortinet factory default certificate.
Config-Sync Type the TCP port number on which the FortiWeb appliance will listen
for configuration synchronization requests from the peer/remote
FortiWeb appliance. The default is 8333.
Note: This is not used by HA. See Configuring a high availability (HA)
FortiWeb cluster on page 130.
Timeout Settings
Idle Timeout Type the number of minutes that a web UI connection can be idle
before the administrator must log in again. The maximum is
480minutes (8hours). To maintain security, keep the idle timeout at
the default value of 5minutes.
Language
Web Administration Select which language to use when displaying the webUI.
l English
l simplified Chinese
l traditional Chinese
l Japanese
The displays web pages will use UTF-8 encoding, regardless of which
language you choose. UTF-8 supports multiple languages, and allows
them to display correctly, even when multiple languages are used on
the same web page.
For example, your organization could have web sites in both English
and simplified Chinese. Your FortiWeb administrators prefer to work in
the English version of the web UI. They could use the web UI in
English while writing rules to match content in both English and
simplified Chinese without changing this setting. Both the rules and
the web UI will display correctly, as long as all rules were input using
UTF-8.
Note: This setting does not affect the display of the CLI.
Security Settings
Disable SSLv3 for Enable to protect against a POODLE (Padding Oracle On Downgraded
Web Administration Legacy Encryption) attack by preventing access to the FortiWeb web
UI via SSL 3.0.
Enable Single Admin When multiple administrators simultaneously modify the same part of
User login the configuration, they each edit a copy of the current, saved state of
the configuration. As each administrator makes changes, FortiWeb
does not update the other administrators working copies. Each
administrator may therefore make conflicting changes without being
aware of the other. The FortiWeb appliance will only use whichever
administrators configuration is saved last.
If only one administrator can log in, this problem cannot occur.
Enable HTTPS Enable the option to let FortiWeb operates with only certificate-based
Certificate Login authentication for Web UI accesses. If this option is enable,
username/password authentication will be disabled. Please see
Certificate-based Web UI login for details.
3. Click Apply.
See also
Web UI parts
A navigation menu is located on the left side of the web UI. To expand a menu item, simply click it. To expand a
submenu item click the > button located next to the submenu name, or click the submenu name itself. To view
the pages located within a submenu, click the name of the page.
Do not use your browsers Back button to navigate pages may not operate
correctly. Instead, use the navigation menu, tabs, and buttons within the pages of the
web UI.
To expand or collapse an area of the menu, click the name of the area itself. Within each area may be multiple
submenus. To expand or collapse a submenu, click the > or v button next to the submenu name, or click the
name of the submenu itself.
Within each submenu may be one or more tabs or sub-panes, which are displayed to the right of the navigation
menu, in the content pane. At the top of the content pane is a toolbar. The toolbar contains buttons that enable
you to perform operations on items displayed in the content pane, such as importing or deleting entries.
Each tab or pane (per Permissions on page 69) displays or allows you to modify settings, using a similar set of
buttons.
Icon Description
Click to view the first pages worth of records within the tab. or pane.
If this button is grey, you are already viewing the first page.
Click to view the previous pages worth of records within the tab or pane.
To go to a specific page number, type the page number in the field and press Enter.
The total number of pages depends on the number of records per page.
Click to view the next pages worth of records within the tab or pane.
Click to view the last pages worth of records within the tab or pane.
If this button is gray, you are already viewing the last page.
Click to create a new entry using only typical default values as a starting point.
To use this button, you must first mark a check box to select an existing entry upon
which the new entry will be based.
Icon Description
To use this button, you must first select which existing entry you want to modify.
Alternatively, you can double-click the existing entry, or right-click the entry and select
Edit.
To use this button, you must first mark a check box to select which existing
entry you want to remove.
To delete multiple entries, either mark the check boxes of each entry that
you want to delete, then click Delete.
This button may not always be available. See Deleting entries on page 80.
Some pages have unique buttons, or special behaviors associated with common buttons. Those buttons are
described in their corresponding section of this guide.
See also
l Deleting entries
l Renaming entries
Deleting entries
To delete a part of the configuration, you must first remove all references to it.
For example, if you selected a profile named Profile1 in a policy named PolicyA, that policy references
Profile1 and requires it to exist. Therefore the appliance will not allow you to delete Profile1 until you have
reconfigured PolicyA (and any other references) so that Profile1 is no longer required and may be safely
deleted.
If you do not know where your configuration refers to the entry that you want to delete,
to find the references, you can download a backup of the configuration and use a plain
text editor to search for the entrys name.
See also
Renaming entries
In the web UI, each entrys name is not editable after you create and save it.
For example, lets say you create a policy whose Name is PolicyA. While configuring the policy, you change
your mind about the policys name a few times, and ultimately you change the Name to Blog-Policy. Finally, you
click OK to save the policy. Afterwards, if you edit the policy, most settings can be changed. However, Name is
greyed-out, and cannot any longer be changed.
While you cannot edit Name, you can achieve the same effect by other means.
To rename an entry
Alternatively, if you need to rename an item that is only referenced in the core
configuration file, you can download a backup copy, use a plain text editor to find and
replace the entrys old name, then restore the modified configuration backup file to the
appliance. Where there are many references, this may save time.
If you do not know where your configuration refers to the entry that you want to delete,
to find the references, you can download a backup of the configuration and use a plain
text editor to search for the entrys name.
See also
Shutdown
Always properly shut down the FortiWeb appliances operating system before turning off the power switch or
unplugging it. This causes it to finish writing any buffered data, and to correctly spin down and park the hard
disks.
Do not unplug or switch off the FortiWeb appliance without first halting the
operating system. Failure to do so could cause data loss and hardware
damage.
1. Access the CLI or web UI. For details, see Connecting to the web UI or CLI on page 100.
2. From the CLI console, enter the following command:
execute shutdown
Alternatively, if you are connected to the web UI, go to System> Status> Status, and in the Operation
widget, click Shut Down.
You may be able to hear the appliance become more quiet when the appliance halts its hardware and
operating system, indicating that power can be safely disconnected.
3. For hardware appliances, press the power button if there is one. Power supplies and switches vary by
hardware model. On some, you will press the power button. On others, you will flip the switch to either the off
(O) or on (I) position. When power is connected and the hardware is started, the power indicator LEDs should
light. For details, see the LED specifications in the QuickStart Guide for your model.
For FortiWeb-VM, in the hypervisor or VM manager, power off the virtual machine.
These instructions will guide you to the point where you have a simple, verifiably working installation.
From there, you can begin to use optional features and fine-tune your configuration.
If you are deploying gradually, you may want to initially install your FortiWeb in offline protection mode during the
transition phase. In this case, you may need to complete the procedures in this section multiple times: once for
offline protection mode, then again when you switch to your permanent choice of operation modes. See
Switching out of offline protection mode on page 269.
Installation workflow varies depending on whether you are installing FortiWeb as a physical appliance or as a
virtual machine.
To install a physical FortiWeb appliance, follow the instructions in How to set up your FortiWeb sequentially.
To install a virtual appliance, FortiWeb-VM, first follow the FortiWeb-VM Install Guide, then continue with How to
set up your FortiWeb.
Before you begin, take a moment to register your Fortinet product at the Fortinet Technical Support web site:
https://support.fortinet.com
Many Fortinet customer services such as firmware updates, technical support, FortiGuard services,
and FortiSandbox Cloud require product registration.
For more information, see the Fortinet Knowledge Base article Registration Frequently Asked Questions.
To receive traffic intended for web servers that your FortiWeb appliance will protect, you usually must install the
FortiWeb appliance between the web servers and all clients that access them.
The network configuration should make sure that all network traffic destined for the web servers must first pass to
or through the FortiWeb appliance (depending on your operation mode). Usually, clients access web servers from
the Internet through a firewall such as a FortiGate, so the FortiWeb appliance should be installed between the
web servers and the firewall.
n
je c tio
L in
S, SQ
, XS a cks
F las
h
L att
XM
Vi r
p oo
use
n
s
g
FortiGate + FortiWeb
IP s
Ideally, control and protection measures should only allow web traffic to reach
FortiWeb and your web servers. FortiWeb and FortiGate complement each other to
improve security.
Other topology details and features vary by the mode in which the FortiWeb appliance will operate. For example,
FortiWeb appliances operating in offline protection mode or either of the transparent modes cannot do network
address translation (NAT) or load-balancing; FortiWeb appliances operating in reverse proxy mode can.
l Simplified configuration
l Unscanned traffic will not reach your load balancer, improving its performance and security
l At the IP layer, from FortiWebs perspective, HTTP requests will correctly appear to originate from the real clients
IP address, not (due to SNAT) your load balancer
Otherwise, attackers and legitimate clients IP addresses may be hidden by the load balancer.
Alternatively, depending on the features that you require, you may be able to use
FortiWebs built-in load balancing features instead. See Load Balancing Algorithm on
page 361.
Client
10.0.2.200
Web
Server 1
FortiWeb FortiADC
10.0.2.1 192.0.2.1
port2 port3
FortiWeb Sees
HTTP Clients IP
Client
10.0.2.200
Web
Server 1
FortiADC FortiWeb
10.0.2.1 192.0.2.1 192.0.2.2 172.0.2.1
port2 port3 port2 port3
l Configure your load balancer so that it does not multiplex HTTP requests from multiple different clients into each
TCP connection with FortiWeb.
FortiWeb often applies blocking at the TCP/IP connection level, which could result in blocking innocent HTTP
requests if the load balancer is transmitting them within the same TCP connection as an attack. It could
therefore appear to cause intermittent failed requests.
l Configure your load balancer to insert or append to an X-Forwarded-For:, X-Real-IP:, or other HTTP X-
header. Also configure FortiWeb to find the original attackers or clients IP address in that HTTP header, not in the
IP session (see Defining your proxies, clients, & X-headers on page 386).
Some features do not support using client IPs found in the X-header. See Defining
your proxies, clients, & X-headers on page 386.
Client
10.0.2.200
Web
Server 1
FortiADC FortiWeb
10.0.2.1 192.0.2.1 192.0.2.2 172.0.2.1
port2 port3 port2 port3
GET /index.php
X-Real-IP:
10.0.2.200,192.0.2.1 Block 10.0.2.200? Web
Server 2
FortiWeb Sees
HTTP Clients IP
l Do not set any Action to Period Block if the load balancer, or any other device in front of FortiWeb, applies SNAT
unless you have configured blocking based upon HTTP X-headers. Period blocking based upon the source IP
address at the IP layer will cause innocent requests forwarded by the SNAT device after an attack to be blocked
until the blocking period expires. It could therefore appear to cause intermittent service outages.
Because this is such a pivotal factor, consider the implications carefully before you make your
choice. It can be time-consuming to reconfigure your network if you switch modes later.
If you are not sure which operation mode is best for you, you can deploy in offline
protection mode temporarily. This will allow you to implement some features and
gather auto-learning data while you decide.
Operation mode
Feature Reverse True trans- Transparent Offline pro-
WCCP
proxy parent proxy inspection tection
Config. Sync
Yes ^ Yes Yes Yes Yes
(Non-HA)
Hidden Input
Yes Yes No No Yes
Constraints
Operation mode
Feature Reverse True trans- Transparent Offline pro-
WCCP
proxy parent proxy inspection tection
Information
Disclosure Prevention
Yes Yes Yes Yes Yes
(Anti-Server
Fingerprinting)
Rewriting /
Yes Yes No No Yes
Redirection
Start Page
Yes Yes No No Yes
Enforcement
X-Forwarded-For:
Yes Yes No No Yes
Support
Operation mode
Feature Reverse True trans- Transparent Offline pro-
WCCP
proxy parent proxy inspection tection
* Requires that your web application have session IDs. See Session Key.
For the specific cipher suites that FortiWeb supports in each operating mode and protocol,
see Supported cipher suites & protocol versions.
Requests are destined for a virtual servers network interface and IP address on FortiWeb, not a web server
directly. FortiWeb usually applies full NAT.
DNS A/AAAA record changes may be required in reverse proxy mode due to NAT.
Also, servers will see the IP of FortiWeb, not the source IP of clients, unless you
configure FortiWeb to insert/append to an HTTP X-header such as X-Forwarded-
For:. Verify that the server does not apply source IP-based features such as rate
limiting or geographical analysis, or, alternatively, that it can be configured to find the
original clients source IP address in an HTTP X-header.
If you want to deploy without any IP and DNS changes to the existing network,
consider either of the transparent modes instead.
Client
Web
Server 1
192.0.2.2/24
FortiGate 10.0.2.1 port3
port2 192.0.2.1
Switch
192.0.2.3/24
FortiWeb
Web
Server 2
FortiWeb applies the first applicable policy, then forwards permitted traffic to a web server. FortiWeb logs, blocks,
or modifies violations according to the matching policy.
Example network topology: reverse proxy mode shows an example network topology for reverse proxy mode. A
client accesses two web servers over the Internet through a FortiWeb appliance. A firewall is installed between
FortiWeb and the Internet to regulate non-HTTP/HTTPS traffic. Port1 is connected to the administrators
computer. Port2 is connected to the firewall. Port3 is connected to a switch, which is connected to the web
servers. The FortiWeb appliance provides load-balancing between the two web servers.
Alternatively, Example network topology: one-arm with reverse proxy mode shows multiple protocols originating
from the client. Only HTTP/HTTPS is routed through FortiWeb for additional scanning and processing before
arriving at the servers.
FortiWeb
Client
HTTP port3
192.0.2.2
HTTP & Only
SFTP port2 port3
10.0.2.1 192.0.2.1
Scanned
HTTP
FortiGate 192.0.2.3/24
SFTP Web
Servers
Virtual servers can be on the same subnet as physical servers. This is one way to
create a one-arm HTTP proxy. For example, the virtual server 192.0.2.1/24 could
forward to the physical server 192.0.2.2.
However, this is often not recommended. Unless your networks routing configuration
prevents it, it could allow clients that are aware of the physical servers IP address to
bypass the FortiWeb appliance by accessing the physical server directly.
By default when in reverse proxy mode, FortiWeb will not forward non-
HTTP/HTTPS traffic to from virtual servers to your protected back-end servers. (IP-
based forwarding/routing of unscanned protocols is disabled.)
If you must forward FTP, SSH, or other protocols to your back-end servers, Fortinet
recommends that you do not deploy FortiWeb inline. Instead, use FortiGate VIP port
forwarding to scan then send FTP, SSH, etc. protocols directly to the servers,
bypassing FortiWeb. Deploy FortiWeb in a one-arm topology where FortiWeb receives
only HTTP/HTTPS from the FortiGate VIP/port forwarding, then relays it to your web
servers. Carefully test to verify that only firewalled traffic reaches your web servers.
If this is not possible, and you require FortiWeb to route non-HTTP protocols above
the TCP layer, you may be able to use the config router setting command.
See the FortiWebCLIReference. For security and performance reasons, this is not
recommended.
Unlike with reverse proxy mode, with both transparent modes, web servers will see the source IP address of
clients.
You can configure VLAN subinterfaces on FortiWeb, or omit IP address configuration entirely and instead assign
a network port to be a part of a Layer2-only bridge.
192.168.1.4/24
Web Web
Server 2 Server 1
192.168.1.3/24
Switch
Client
port4
192.168.1.1/24 (bridge1)
LAN
LA
port3
(bridge1)
FortiGate port1
172.16.1.10/24 FortiWeb
Administrator
Example network topology: transparent modes shows one example of network topology for either true
transparent proxy or transparent inspection mode. A client accesses a web server over the Internet through a
FortiWeb appliance. A firewall is installed between the FortiWeb appliance and the Internet to regulate non-
HTTP/HTTPS traffic. Port1 is connected to the administrators computer. Port3 is connected to the firewall. Port4
is connected to the web servers. Port3 and port4 have no IP address of their own, and act as a V-zone (bridge).
Because port3 and port4 have hardware support for fail-to-wire, this topology also gives you the option of
configuring fail-open behavior in the event of FortiWeb power loss.
True transparent proxy mode and transparent inspection mode are the same in topology aspect, but due to
differences in the mode of interception, they do have a few important behavioral differences:
l True transparent proxy FortiWeb transparently proxies the traffic arriving on a network port that belongs to
a Layer2 bridge, applies the first applicable policy, and lets permitted traffic pass through. FortiWeb logs, blocks, or
modifies violations according to the matching policy and its protection profile. This mode supports user
authentication via HTTP but not HTTPS.
l Transparent inspection FortiWeb asynchronously inspects traffic arriving on a network port that belongs to
a Layer2 bridge, applies the first applicable policy, and lets permitted traffic pass through. (Because it is
asynchronous, it minimizes latency.) FortiWeb logs or blocks traffic according to the matching policy and its
protection profile, but does not otherwise modify it. (It cannot, for example, offload SSL, load-balance connections,
or support user authentication.
Unlike in reverse proxy mode or true transparent proxy mode, actions other than Alert
cannot be guaranteed to be successful in transparent inspection mode. The FortiWeb
appliance will attempt to block traffic that violates the policy. However, due to the
nature of asynchronous inspection, the client or server may have already received the
traffic that violated the policy.
Switching out of offline protection mode when you are done with transition
can prevent bypass problems that can arise as a result of misconfigured
routing. It also offers you the ability to offer protection features that cannot
be supported in a SPAN port topology.
Requests are destined for a web server, not the FortiWeb appliance. Traffic is duplicated from the flow and sent
on an out-of-line link to the FortiWeb through a switched port analyzer (SPAN or mirroring) port. Unless there is a
policy violation, there is no reply traffic from FortiWeb. Depending on whether the upstream firewalls or routers
apply source NAT (SNAT), the web servers might be able to see and use the source IP addresses of clients.
Client
Web
Server 1
192.168.1.3/24
FortiGate
Switch
192.168.1.1/24 192.168.1.4/24
FortiWeb resets TCP
port2 Web
connection if it
Server 2
detects policy
violation
FortiWeb
FortiWeb monitors traffic received on the data capture ports network interface (regardless of the IP address) and
applies the first applicable policy. Because it is not inline with the destination, it does not forward permitted
traffic. FortiWeb logs or blocks violations according to the matching policy and its protection profile. If FortiWeb
detects a malicious request, it sends a TCP RST (reset) packet through the blocking port to the web server and
client to attempt to terminate the connection. It does not otherwise modify traffic. (It cannot, for example, offload
SSL, load-balance connections, or support user authentication.)
Unlike in reverse proxy mode or true transparent proxy mode, actions other than Alert
cannot be guaranteed to be successful in offline protection mode. The FortiWeb
appliance will attempt to block traffic that violates the policy by mimicking the client or
server and requesting to reset the connection. However, the client or server may
receive the reset request after it receives the other traffic due to possible differences in
routing path metrics and latency.
If you select offline protection mode, you can configure Blocking Port to select the port
from which TCP RST (reset) commands are sent to block traffic that violates a policy.
Example network topology: offline protection mode shows an example one-arm network topology for offline
protection mode. A client accesses two web servers over the Internet through a FortiWeb appliance. A firewall is
installed between the FortiWeb appliance and the Internet to regulate non-HTTP/HTTPS traffic. Port1 is
connected to the administrators computer. Port2 is connected to the firewall, and thereby to a switch, which is
connected to the web servers. The FortiWeb appliance provides detection, but does not load-balance, block, or
otherwise modify traffic to or from the two web servers.
192.168.1.5/24
Web Web
Server 2 Server 1
Client 192.168.1.4/24
port2
192.168.1.1/24
port1
Switch
non-HTTP
port3 FortiGate
172.22.80.1/24
HTTP
and
HTTPS
Scanned
HTTP and
HTTPS
port3
172.22.80.100/24
FortiWeb
In the illustration Example network topology: WCCP mode, a client accesses a web server over the Internet
through a FortiWeb appliance. In this one-arm topology, a firewall is configured as a WCCP server that routes
HTTP/HTTPS traffic arriving on port1 to a FortiWeb configured as a WCCP client. The firewall directs non-
HTTP/HTTPS traffic to the switch directly. On the FortiWeb, Port3 is configured for the WCCP protocol and
connected to the firewall.
FortiWeb applies the first applicable policy, logs, blocks, or modifies violations according to the matching policy,
and then returns permitted traffic to the firewall. The firewall is configured to route HTTP/HTTPS traffic arriving
on port3 to the switch.
l FortiWeb active-passive HA
l FortiWeb active-active HA
l an external HA/load balancer
Example network topology: reverse proxy mode with active-passive HA shows another network topology for
reverse proxy mode, except that the single FortiWeb appliance has been replaced with two of them operating
together as an active-passive (highavailability (HA) pair. If the active appliance fails, the standby appliance
assumes the IP addresses and load of the failed appliance.
To carry heartbeat and synchronization traffic between the HA pair, the heartbeat interface on both HA
appliances must be connected through crossover cables or through switches.
Links
port3 port4
FortiGate Switch
port1 port2
If you use a switch to connect the heartbeat interfaces, they must be reachable by
Layer 2 multicast.
If FortiWeb will not be operating in reverse proxy mode (such as for either true transparent proxy mode or
transparent inspection mode), typically you would not use FortiWeb HA this could require changes to your
network scheme, which defeats one of the key benefits of the transparent modes: it requires no IP changes.
Instead, most customers use an existing externalload balancer/HA solution in conjunction with FortiWeb
configuration synchronization to preserve an existing active-active or active-passive topology, as shown in
Example network topology: transparent proxy mode with configuration synchronization and external HA via
FortiADC.
If the operation mode is not reverse proxy mode (for example, the mode is true transparent proxy or transparent
inspection), use configuration synchronization or FortiWeb Manager to maintain consistent configuration settings
between the HA Active-Active units. The illustration shows an example of an HAtopology that uses configuration
synchronization.
port 1 port 2
port 3
Slave
port 1
port 2
Heartbeat
FortiGate port 3
Switch port 3
port 1 port 2
Web Servers
Slave
This example shows another HA topology for reverse proxy mode; an active-active HA deployment. A FortiWeb
active-active HA cluster cab be consisted of more than two FortiWeb appliances (up to eight). All the cluster
members are operating as an active appliance together, which means each of the members can simultaneously
handle the traffic between clients and the back web servers. In the active-active HA cluster, there is one appliance
selected as the master and in the meantime time the others are slaves. Like a central controller, only the master
appliance receives traffic from clients and back web servers, then it will distribute received traffic to all the cluster
members (including itself), so that each FortiWeb appliance performs the security services to protect the traffic.
Similar to the active-passive HA deployment, the operation of active-active HA cluster requires heartbeat
detection, configuration and session synchronization between the cluster members. If the master appliance fails,
one of the slaves will take it over. The heartbeat interfaces of all the HA appliances must be connected directly
with crossover cables or through switches to carry the heartbeat and synchronization traffic between the HA
cluster members.
Example network topology: transparent proxy mode with configuration synchronization and external HA
via FortiADC
FortiWeb
Client transparent proxy
192.168.1.1
port2 Switch
FortiGate 192.168.1.2/24
Web
Active-Active Configuration Server 1
HA via Synchronization
FortiADC
FortiADC
Web
FortiGate Server 2
192.168.1.3/24
port2
192.168.1.1 Switch
FortiWeb
transparent proxy
Unlike with FortiWeb HA, the external HA device detects when a FortiWeb has failed and then redirects the traffic
stream. (FortiWeb has no way of actively notifying the external HA device.) To monitor the live paths through your
FortiWebs, you could configure your HA device to poll either:
See also
To configure, maintain, and administer the FortiWeb appliance, you need to connect to it. There are two
methods:
l Web UI A graphical user interface (GUI), from within a web browser. It can display reports and logs, but lacks
many advanced diagnostic commands. For usage, see How to use the web UI on page 67.
l Command line interface (CLI) A text interface similar to DOS or UNIX commands, from a Secure Shell (SSH)
or Telnet terminal, or from the JavaScript CLI Console widget in the webUI (System> Status> Status). It
provides access to many advanced diagnostic commands as well as configuration, but lacks reports and logs. For
usage, see the FortiWeb CLI Reference.
Access to the CLI and/or web UI through your network is not yet configured if:
If you are installing a FortiWeb-VM virtual appliance, you should have already
connected if you followed the instructions in the FortiWeb-VM Install Guide. If so, you
can skip this chapter and continue with Changing the admin account password on
page 122.
Via the direct connection, you can use the web UI or CLI to configure FortiWebs basic network settings. Once
this is done, you will be able to place FortiWeb on your network, and use FortiWeb through your network.
Until the FortiWeb appliance is configured with an IP address and connected to your
network, you may prefer to connect the FortiWeb appliance directly to your
management computer, or through a switch, in a peer network that is isolated from
your overall network. This will improve security during setup. However, isolation is not
required.
URL https://192.168.1.99/
Administrator admin
Account
Password
Requirements
1. On your management computer, configure the Ethernet port with the static IP address 192.168.1.2 with a
netmask of 255.255.255.0.
2. Using the Ethernet cable, connect your computers Ethernet port to the FortiWeb appliances port1.
3. Start your browser and enter the following URL:
https://192.168.1.99/
(Remember to include the s in https://.)
If you do not see the login page due to an SSL cipher error during the connection, and you are connecting to
the trial license of FortiWeb-VM or a LENC version of FortiWeb, then your browser must be configured to
accept encryption of 64-bit strength or less during the handshake. (RC2, RC4, and DES with less than 64-bit
strength is supported. AES and 3DES is not supported in these versions.)
ssl_error_no_cypher_overlap
you may need to enter about:config in the URL bar, then set security.ssl3.rsa.rc4_40_md5 to true.
To support HTTPS authentication, the FortiWeb appliance ships with a self-signed security certificate, which
it presents to clients whenever they initiate an HTTPS connection to the FortiWeb appliance. When you
connect, depending on your web browser and prior access of the FortiWeb appliance, your browser might
display two security warnings related to this certificate:
l The certificate is not automatically trusted because it is self-signed, rather than being signed by a valid
certificate authority (CA). Self-signed certificates cannot be verified with a proper CA, and therefore might be
fraudulent. You must manually indicate whether or not to trust the certificate.
l The certificate might belong to another web site. The common name (CN) field in the certificate, which usually
contains the host name of the web site, does not exactly match the URL you requested. This could indicate
server identity theft, but could also simply indicate that the certificate contains a domain name while you have
entered an IP address. You must manually indicate whether this mismatch is normal or not.
Both warnings are normal for the default certificate. SSL v3 and TLS v1.0 are supported.
4. Verify and accept the certificate, either permanently (the web browser will not display the self-signing warning
again) or temporarily. You cannot log in until you accept the certificate.
For details on accepting the certificate, see the documentation for your web browser.
5. In the Name field, type admin, then click Login. (In its default state, there is no password for this account.)
Login credentials entered are encrypted before they are sent to the FortiWeb appliance. If your login is
successful, the web UI appears. To continue by updating the firmware, see Updating the firmware on page
108. Otherwise, to continue by setting an administrative password, see Changing the admin account
password on page 122.
IP Address 192.168.1.99
Administrator
admin
Account
Password
Alternatively, you can access the CLI via SSH and a public-private key pair. However, to use this option, you first
access the CLI using the CLI Console widget (part of the web UI status dashboard) or via SSH and password to
upload the public key. See To connect to the CLI using an SSH connection and public-private key pair on page
106.
If you are not connecting for the first time, nor have you just reset the configuration to
its default state or restored the firmware, administrative access settings may have
already been configured. In this case, access the CLI using the IP address,
administrative access protocol, administrator account and password already
configured, instead of the default settings.
Requirements
The following procedures describe connection using PuTTY software; steps may vary
with other terminal emulators.
1. Using the RJ-45-to-DB-9 or null modem cable, connect your computers serial communications (COM) port to
the FortiWeb appliances console port.
Serial line to connect to COM1 (or, if your computer has multiple serial ports, the
name of the connected serial port)
Data bits 8
Stop bits 1
Parity None
5. In the Category tree on the left, go to Session (not the sub-node, Logging) and from Connection type,
select Serial.
6. Click Open.
7. Press the Enter key to initiate a connection.
The login prompt appears.
8. Type admin then press Enter twice. (In its default state, there is no password for the admin account.)
The CLI displays the following text, followed by a command line prompt:
Welcome!
You can now enter commands. To continue by updating the firmware, see Updating the firmware on page
108. Otherwise, to continue by setting an administrative password, see Changing the admin account
password on page 122. For information about how to use the CLI, see the FortiWeb CLI Reference.
Requirements
1. On your management computer, configure the Ethernet port with the static IP address 192.168.1.2 with a
netmask of 255.255.255.0.
2. Using the Ethernet cable, connect your computers Ethernet port to the FortiWeb appliances port1.
3. Verify that the FortiWeb appliance is powered on.
4. On your management computer, start PuTTY.
Initially, the Session category of settings is displayed.
8. Select Open.
The SSH client connects to the FortiWeb appliance.
The SSH client may display a warning if this is the first time you are connecting to the FortiWeb appliance and
its SSH key is not yet recognized by your SSH client, or if you have previously connected to the FortiWeb
appliance but it used a different IP address or SSH key. If your management computer is directly connected to
the FortiWeb appliance with no network hosts between them, this is normal.
9. Click Yes to verify the fingerprint and accept the FortiWeb appliances SSH key. You cannot log in until you
accept the key.
10. Type admin and press Enter. (by default, this account has no password..)
FortiWeb#
You can now enter commands. To continue by updating the firmware, see Updating the firmware on page
108. Otherwise, to continue by setting an administrative password, see Changing the admin account
password on page 122.
For information about how to use the CLI, see the FortiWeb CLI Reference.
To connect to the CLI using an SSH connection and public-private key pair
4. Use the following CLI command to copy the public key to FortiWeb using the CLI commands:
config system admin
edit admin
set sshkey <sshkey>
end
where <sshkey> is the public key data.
5. To log in using the private key, open a connection to the CLI using SSH (see To connect to the CLI using an
SSH connection and password on page 105).
6. When FortiWeb displays the CLI prompt, use the following command to log in using the public key:
ssh -i <privatekey>
where <privatekey> is the name of the private key stored on your management computer.
For information about how to use the CLI, see the FortiWeb CLI Reference.
Your new FortiWeb appliance comes with the latest operating system (firmware) when shipped. However, if a
new version has been released since your appliance was shipped, you should install it before you continue the
installation.
Fortinet periodically releases FortiWeb firmware updates to include enhancements and address issues. After you
register your FortiWeb appliance, FortiWeb firmware is available for download at:
https://support.fortinet.com
Installing new firmware can overwrite attack signature packages using the versions of the packages that were
current at the time that the firmware image was built. To avoid repeat updates, update the firmware before
updating your FortiGuard packages.
New firmware can also introduce new features which you must configure for the first time.
For late-breaking information specific to the firmware release version, see the Release Notes available with that
release.
In addition to major releases that contain new features, Fortinet releases patch
releases that resolve specific issues without containing new features and/or changes
to existing features. It is recommended to download and install patch releases as soon
as they are available.
Before you can download firmware updates for your FortiWeb appliance, you must first
register your FortiWeb appliance with Fortinet Technical Support. For details, go to
https://support.fortinet.com/ or contact Fortinet Technical Support.
See also
1. Download the firmware file from the Fortinet Technical Support web site:
https://support.fortinet.com/
2. Connect your management computer to the FortiWeb console port using a RJ-45-to-DB-9 serial cable or a
null-modem cable.
3. Initiate a connection from your management computer to the CLI of the FortiWeb appliance.
For details, see Connecting to the web UI or CLI on page 100.
4. Connect port1 of the FortiWeb appliance directly or to the same subnet as a TFTP server.
5. Copy the new firmware image file to the root directory of the TFTP server.
6. If necessary, start your TFTP server. (If you do not have one, you can temporarily install and run one such as
tftpd (Windows, Mac OS X, or Linux) on your management computer.)
Because TFTP is not secure, and because it does not support authentication and
could allow anyone to have read and write access, you should only run it on trusted
administrator-only networks, never on computers directly connected to the Internet. If
possible, immediately turn off tftpd off when you are done.
7. Verify that the TFTP server is currently running, and that the FortiWeb appliance can reach the TFTP server.
To use the FortiWeb CLI to verify connectivity, enter the following command:
execute ping 192.168.1.168
You have only three seconds to press a key. If you do not press a key soon enough, the
FortiWeb appliance reboots and you must log in and repeat the execute reboot
command.
If you successfully interrupt the startup process, the following messages appears:
[G]: Get firmware image from TFTP server.
[F]: Format boot device.
[B]: Boot with backup firmware and set as default.
[Q]: Quit menu and continue to boot with default firmware.
[H]: Display this list of options.
Enter G,F,B,Q,or H:
11. Type G to get the firmware image from the TFTP server.
The following message appears:
Enter TFTP server address [192.168.1.168]:
12. Type the IP address of the TFTP server and press Enter.
The following message appears:
Enter local address [192.168.1.188]:
13. Type a temporary IP address that can be used by the FortiWeb appliance to connect to the TFTP server.
The following message appears:
Enter firmware image file name [image.out]:
14. Type the firmware image file name and press Enter.
The FortiWeb appliance downloads the firmware image file from the TFTP server and displays a message
similar to the following:
MAC:00219B8F0D94
###########################
If the download fails after the integrity check with the error message:
but the firmware matches the integrity checksum on the Fortinet Technical Support
web site, try a different TFTP server.
15. Type R.
The FortiWeb image is loaded into memory and uses the current configuration, without saving the new
firmware image to disk.
16. To verify that the new firmware image was loaded, log in to the CLI and type:
get system status
See also
l Installing firmware
l Installing alternate firmware
Installing firmware
You can use either the web UI or the CLI to upgrade or downgrade the appliances operating system.
changing to
FortiWeb-VM4.32,build0530,110929
an earlier build number (530) and date (110929 means September 29, 2011), indicates that you are reverting.
Back up all parts of your configuration before beginning this procedure. Some backup
types do not include the full configuration. For full backup instructions, see Backups on
page 270.
Reverting to an earlier firmware version could reset settings that are not compatible
with the new firmware. For example, FortiWeb 5.0 configuration files are not
compatible with previous firmware versions. If you later decide to downgrade to
FortiWeb 4.4.6 or earlier, your FortiWeb appliance will lose its configuration.
Torestorethe configuration, you will need a backup that is compatible with the older
firmware.
If you are installing a firmware version that requires a different size of system partition,
you may be required to format the boot device before installing the firmware by re-
imaging the boot device. Consult the Release Notes. In that case, do not install the
firmware using this procedure. Instead, see Restoring firmware (clean install) on
page 901.
1. Download the firmware file from the Fortinet Technical Support web site:
https://support.fortinet.com/
2. Log in to the web UI of the FortiWeb appliance as the admin administrator, or an administrator account
whose access profile contains Read and Write permissions in the Maintenance category.
Updating firmware on an HA pair requires some additions to the usual steps for a
standalone appliance. For details, see Updating firmware on an HA pair on page 115.
4. In the System Information widget, in the Firmware Version row, click Update.
5. Click Browse to locate and select the firmware file that you want to install, then click OK.
6. Click OK.
Your management computer uploads the firmware image to the FortiWeb appliance. The FortiWeb appliance
installs the firmware and restarts. The time required varies by the size of the file and the speed of your
network connection.
If you are downgrading the firmware to a previous version, and the settings are not
fully backwards compatible, the FortiWeb appliance may either remove incompatible
settings, or use the features default values for that version of the firmware. You may
need to reconfigure some settings.
7. Clear the cache of your web browser and restart it to ensure that it reloads the web UI and correctly displays
all interface changes. For details, see your browser's documentation.
8. To verify that the firmware was successfully installed, log in to the web UI and go to System> Status>
Status.
In the System Information widget, the Firmware Version row indicates the currently installed firmware
version.
9. If you want to install alternate firmware on the secondary partition, follow Installing alternate firmware on
page 116.
10. Continue with Changing the admin account password on page 122.
Installing firmware replaces the current attack definitions with those included with the
firmware release that you are installing. If you are updating or rearranging an existing
deployment, after you install new firmware, make sure that your attack definitions are
up-to-date. For more information, see Manually initiating update requests on page
199.
1. Download the firmware file from the Fortinet Technical Support web site:
https://support.fortinet.com/
2. Connect your management computer to the FortiWeb console port using a RJ-45-to-DB-9 serial cable or a
null-modem cable.
Updating firmware on an HA pair requires some additions to the usual steps for a
standalone appliance. For details, see Updating firmware on an HA pair on page 115.
3. Initiate a connection from your management computer to the CLI of the FortiWeb appliance, and log in as the
admin administrator, or an administrator account whose access profile contains Read and Write
permissions in the Maintenance category.
4. Connect port1 of the FortiWeb appliance directly or to the same subnet as a TFTP server.
5. Copy the new firmware image file to the root directory of the TFTP server.
6. If necessary, start your TFTP server. (If you do not have one, you can temporarily install and run one such as
tftpd (Windows, Mac OS X, or Linux) on your management computer.)
Because TFTP is not secure, and because it does not support authentication and
could allow anyone to have read and write access, you should only run it on trusted
administrator-only networks, never on computers directly connected to the Internet. If
possible, immediately turn off tftpd off when you are done.
7. Verify that the TFTP server is currently running, and that the FortiWeb appliance can reach the TFTP server.
To use the FortiWeb CLI to verify connectivity, enter the following command:
execute ping 192.168.1.168
8. Enter the following command to download the firmware image from the TFTP server to the FortiWeb
appliance:
execute restore image tftp <name_str> <tftp_ipv4>
where <name_str> is the name of the firmware image file and <tftp_ipv4> is the IP address of the
TFTP server. For example, if the firmware image file name is image.out and the IP address of the TFTP
server is 192.168.1.168, enter:
execute restore image tftp image.out 192.168.1.168
or:
9. Type y.
The FortiWeb appliance downloads the firmware image file from the TFTP server. The FortiWeb appliance
installs the firmware and restarts:
MAC:00219B8F0D94
###########################
If the download fails after the integrity check with the error message:
but the firmware matches the integrity checksum on the Fortinet Technical Support
web site, try a different TFTP server.
The time required varies by the size of the file and the speed of your network connection.
If you are downgrading the firmware to a previous version, the FortiWeb appliance
reverts the configuration to default values for that version of the firmware. You will
need to reconfigure the FortiWeb appliance or restore the configuration file from a
backup. For details, see Connecting to the web UI or CLI on page 100 and, if you opt
to restore the configuration, Restoring a previous configuration on page 275.
10. To verify that the firmware was successfully installed, log in to the CLI and type:
get system status
11. If you want to install alternate firmware on the secondary partition, follow Installing alternate firmware on
page 116.
12. Continue with Changing the admin account password on page 122.
Installing firmware replaces the current FortiGuard packages with those included with
the firmware release that you are installing. If you are updating or rearranging an
existing deployment, after you install new firmware, make sure that your attack
definitions are up-to-date. For more information, see Manually initiating update
requests on page 199.
See also
This update procedure is only valid for upgrading from FortiWeb4.0MR4 or newer.
If you are upgrading from FortiWeb 4.0 MR3, for example, the active appliance will
not automatically send the new firmware to the standby; you must quickly connect to
the standby and manually install the new firmware while the originally active appliance
is upgrading and rebooting. Alternatively, switch the appliances out of HA mode,
upgrade them individually, then switch them back into HA mode.
Instead, switch out of HA, downgrade each appliance individually, then switch them
back into HA mode.
1. Verify that both of the members in the HA pair are powered on and available on all of the network interfaces
that you have configured.
If required ports are not available, HA port monitoring could inadvertently trigger an
additional failover and traffic interruption during the firmware update.
3. Install the firmware on the primary appliance. For details, see Installing firmware on page 110. When
installing via the web UI, a message will appear after your web browser has uploaded the file:
Sending the new firmware file to the standby. Please wait and keep the web
GUI untouched...
Closing your browser window or using the back or forward buttons can interrupt the
upgrade process, resulting in a split brain problem both the upgrade of the initial
master and HA will be interrupted, because both appliances will believe they are the
main appliance.
The primary appliance will transmit the firmware file to the standby appliance over its HA link.The standby
appliance will upgrade its firmware first; on the active appliance, this will be recorded in an event log message
such as:
Member (FV-1KC3R11111111) left HA group
After the standby appliance reboots and indicates via the HA heartbeat that it is up again, the primary
appliance will begin to update its own firmware. During that time, the standby appliance will temporarily
become active and process your networks traffic. After the original appliance reboots, it indicates via the HA
heartbeat that it is up again. Which appliance will assume the active role of traffic processing depends on your
configuration (see How HA chooses the active appliance on page 60):
l If Override is enabled, the cluster will consider your Device Priority setting. Therefore both appliances usually
make a second failover in order to resume their original roles.
l If Override is disabled, the cluster will consider uptime first. The original primary appliance will have a smaller
uptime due to the order of reboots during the firmware upgrade. Therefore it will not resume its active role;
instead, the standby will remain the new primary appliance. A second failover will not occur.
Reboot times vary by the appliance model, and also by differences between the original firmware and the
firmware you are installing, which may require the installer to convert the configuration and/or disk partitioning
schemes to be compatible with the new firmware version.
See also
l Installing firmware
l Configuring a high availability (HA) FortiWeb cluster
1. Download the firmware file from the Fortinet Technical Support web site:
https://support.fortinet.com/
2. Log in to the web UI of the FortiWeb appliance as the admin administrator, or an administrator account
whose access profile contains Read and Write permissions in the Maintenance category.
Updating firmware on an HA pair requires some additions to the usual steps for a
standalone appliance. For details, see Updating firmware on an HA pair on page 115.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Maintenance category. For details, see Permissions on page 69.
4. In the Firmware area, in the row of the alternate partition, click Upload and Reboot.
The Firmware Upgrade/Downgrade dialog appears.
5. Click Browse to locate and select the firmware file that you want to install, then click OK.
6. Click OK.
Your management computer uploads the firmware image to the FortiWeb appliance. The FortiWeb appliance
installs the firmware and restarts. The time required varies by the size of the file and the speed of your
network connection.
If you are downgrading the firmware to a previous version, and the settings are not
fully backwards compatible, the FortiWeb appliance may either remove incompatible
settings, or use the features default values for that version of the firmware. You may
need to reconfigure some settings.
7. Clear the cache of your web browser and restart it to ensure that it reloads the web UI and correctly displays
all interface changes. For details, see your browser's documentation.
8. To verify that the firmware was successfully installed, log in to the web UI and go to System> Status>
Status.
In the System Information widget, the Firmware Version row indicates the currently installed firmware
version.
1. Download the firmware file from the Fortinet Technical Support web site:
https://support.fortinet.com/
2. Connect your management computer to the FortiWeb console port using a RJ-45-to-DB-9 serial cable or a
null-modem cable.
3. Initiate a connection from your management computer to the CLI of the FortiWeb appliance, and log in as the
admin administrator, or an administrator account whose access profile contains Read and Write
permissions in the Maintenance category.
4. Connect port1 of the FortiWeb appliance directly or to the same subnet as a TFTP server.
5. Copy the new firmware image file to the root directory of the TFTP server.
6. If necessary, start your TFTP server. (If you do not have one, you can temporarily install and run one such as
tftpd (Windows, Mac OS X, or Linux) on your management computer.)
Because TFTP is not secure, and because it does not support authentication and
could allow anyone to have read and write access, you should only run it on trusted
administrator-only networks, never on computers directly connected to the Internet. If
possible, immediately turn off tftpd off when you are done.
7. Verify that the TFTP server is currently running, and that the FortiWeb appliance can reach the TFTP server.
To use the FortiWeb CLI to verify connectivity, enter the following command:
execute ping 192.168.1.168
You have only 3 seconds to press a key. If you do not press a key soon enough, the
FortiWeb appliance reboots and you must log in and repeat the execute reboot
command.
If you successfully interrupt the startup process, the following messages appears:
[G]: Get firmware image from TFTP server.
[F]: Format boot device.
[B]: Boot with backup firmware and set as default.
[Q]: Quit menu and continue to boot with default firmware.
[H]: Display this list of options.
Enter G,F,B,Q,or H:
10. Type G to get the firmware image from the TFTP server.
The following message appears:
Enter TFTP server address [192.168.1.168]:
11. Type the IP address of the TFTP server and press Enter.
The following message appears:
Enter local address [192.168.1.188]:
12. Type a temporary IP address that can be used by the FortiWeb appliance to connect to the TFTP server.
The following message appears:
Enter firmware image file name [image.out]:
13. Type the firmware image file name and press Enter.
The FortiWeb appliance downloads the firmware image file from the TFTP server and displays a message
similar to the following:
MAC:00219B8F0D94
###########################
If the download fails after the integrity check with the error message:
but the firmware matches the integrity checksum on the Fortinet Technical Support
web site, try a different TFTP server.
14. Type B.
The FortiWeb appliance saves the backup firmware image and restarts. When the FortiWeb appliance
reboots, it is running the primary firmware.
See also
Each appliance can have up to two firmware versions installed. Each firmware version is stored in a separate
partition. The partition whose firmware is currently running is noted with a white check mark in a green circle in
the Active column.
Install firmware onto the alternate partition (see Installing alternate firmware on page 116).
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Maintenance category. For details, see Permissions on page 69.
3. Click OK.
A message appears instructing you to refresh your browser in a few minutes after the appliance has booted
the other firmware.
1. Install firmware onto the alternate partition (see Installing alternate firmware on page 116).
2. Connect your management computer to the FortiWeb console port using a RJ-45-to-DB-9 serial cable or a
null-modem cable.
3. Initiate a connection from your management computer to the CLI of the FortiWeb appliance, and log in as the
admin administrator, or an administrator account whose access profile contains Read and Write
permissions in the Maintenance category.
You have only 3 seconds to press a key. If you do not press a key soon enough, the
FortiWeb appliance reboots and you must log in and repeat the execute reboot
command.
If you successfully interrupt the startup process, the following messages appears:
[G]: Get firmware image from TFTP server.
[F]: Format boot device.
[B]: Boot with backup firmware and set as default.
[Q]: Quit menu and continue to boot with default firmware.
[H]: Display this list of options.
Enter G,F,B,Q,or H:
See also
Unlike other administrator accounts, the admin administrator account exists by default and cannot be deleted.
The admin administrator account is similar to a root administrator account. This administrator account always
has full permission to view and change all FortiWeb configuration options, including viewing and changing all
other administrator accounts. Its name and permissions cannot be changed.
Before you connect the FortiWeb appliance to your overall network, you should configure the admin account with
a password to prevent others from logging in to the FortiWeb and changing its configuration.
Set a strong password for the admin administrator account, and change the password
regularly. Failure to maintain the password of the admin administrator account could
compromise the security of your FortiWeb appliance. As such, it can constitute a
violation of PCI DSS compliance and is against best practices. For improved security,
the password should be at least eight characters long, be sufficiently complex, and be
changed regularly. To check the strength of your password, you can use a utility such
as Microsofts password strength meter.
5. In the New Password field, enter a password with sufficient complexity and number of characters to deter
brute force and other attacks.
6. In the Confirm Password field, enter the new password again to confirm its spelling.
7. Click OK.
8. Click Logout.
The FortiWeb appliance logs you out. To continue using the web UI, you must log in again. The new
password takes effect the next time that administrator account logs in.
where <new-password_str> is the password for the administrator account named admin.
The FortiWeb appliance logs you out. To continue working in the CLI, you must log in again using the new
password. The new password will take effect only for newly initiated sessions in the CLI or web UI.
You can either manually set the FortiWeb system time or configure the FortiWeb appliance to automatically keep
its system time correct by synchronizing with a Network Time Protocol (NTP) server.
Alternatively, go to System > Status > Status. In the System Information widget, in the System Time
row, click Change.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Maintenance category. For details, see Permissions on page 69.
2. From Time Zone, select the time zone where the FortiWeb appliance is located.
3. If you want FortiWeb to automatically synchronize its clock with an NTP server (recommended), configure
these settings:
Synchronize with NTP Select this option to automatically synchronize the date and time of the
Server FortiWeb appliances clock with an NTP server, then configure the Server
and Sync Interval fields before you click Apply.
Server Type the IP address or domain name of an NTP server or pool, such as
pool.ntp.org. To find an NTP server that you can use, go to
http://www.ntp.org.
Sync Interval Enter how often in minutes the FortiWeb appliance should synchronize its
time with the NTP server. For example, entering 1440 causes the FortiWeb
appliance to synchronize its time once a day.
NTP requires that FortiWeb be able to connect to the Internet on UDP port 123.
Otherwise, select Set Time, then manually set the current date and time. If you want FortiWeb to
automatically adjust its own clock when its time zone changes between daylight saving time (DST) and
standard time, enable Automatically adjust clock for daylight saving changes.The clock will be
initialized with your manually specified time when you click OK.
4. Click OK.
If you manually configured the time, or if you enabled NTP and the NTP query for the current time succeeds,
the new clock time should appear in System time. (If the query reply is slow, you may need to wait a couple
of seconds, then click Refresh to update the display in System time.)
If the NTP query fails, the system clock will continue without adjustment. If FortiWebs time was 3 hours late,
for example, the time will still be 3 hours late. Verify your DNS server IPs, your NTP server IP or name,
routing, and that your firewalls or routers do not block or proxy UDP port 123.
where:
l <timezone_index> is the index number of the time zone in which the FortiWeb appliance is located (to view the
list of valid time zones and their associated index numbers, enter a question mark)
l {<server_fqdn> | <server_ipv4>} is a choice of either the IP address or fully qualified domain name
(FQDN) of the NTP server, such as pool.ntp.org
If your NTP query succeeds, the new clock time should appear when you enter the command:
get system status
If the NTP query fails, the system clock will continue without adjustment. If FortiWebs time was 3 hours late, for
example, the time will still be 3 hours late. Verify your DNS server IPs, your NTP server IP or name, routing, and
that your firewalls or routers do not block or proxy UDP port 123.
To manually configure the FortiWeb appliances system time and disable the connection to an NTP server, enter
the following commands:
config system global
set ntpsync disable
set timezone <timezone_index>
set dst {enable | disable}
end
execute time <time_str>
l <timezone_index> is the index number of the time zone in which the FortiWeb appliance is located (to view the
list of valid time zones and their associated index numbers, enter a question mark)
l dst {enable| disable} is a choice between enabling or disabling daylight saving time (DST) clock
adjustments
l <time_str> is the time for the time zone in which the FortiWeb appliance is located according to a 24-hour clock,
formatted as hh:mm:ss (hh is the hour, mm is the minute, and ss is the second)
l <date_str> is the date for the time zone in which the FortiWeb appliance is located, formatted as yyyy-mm-dd
(yyyy is the year, mm is the month, and dd is the day)
See also
Once the FortiWeb appliance is mounted and powered on, you have physically connected the FortiWeb appliance
to your overall network, and you have connected to either the FortiWeb appliances web UI or CLI, you must
configure the operation mode.
You will usually set the operation mode once, during installation or when using the SetupWizard. Exceptions
include if you install the FortiWeb appliance in offline protection mode for evaluation or transition purposes,
before deciding to switch to another mode for more feature support in a permanent deployment. (See also
Switching out of offline protection mode on page 269.)
The physical topology must match the operation mode. For details, see Planning the
network topology on page 84 and How to choose the operation mode on page 87.
FortiWeb models that use Data Plane Development Kit (DPDK) for packet processing (for example, models
3000E, 3010E and 4000E) reboot automatically when you change the operation mode to or from offline
protection.
Back up your configuration before changing the operation mode. (See Backups on
page 270.) Changing modes deletes any policies not applicable to the new mode, all
static routes, V-zone IPs, TCP SYN flood protection settings, and VLANs. You also
must re-cable your network topology to suit the operation mode, unless you are
switching between the two transparent modes, which have similar network topology
requirements.
Alternatively, go to System> Status> Status, then, in the System Information widget, next to Operation
Mode, click Change.
2. From Operation Mode, select one of the following modes:
l Reverse Proxy
l Offline Protection
l True Transparent Proxy
l Transparent Inspection
l WCCP
For details, see How to choose the operation mode on page 87.
If you are changing to true transparent proxy, transparent inspection mode, or WCCP, also configure Default
Gateway with the IP address of the next hop router and specify the Management IP value. FortiWeb assigns
this management IP address to port1.
3. Click Apply.
4. If you have not yet adjusted the physical topology to suit the new operation mode, see Planning the network
topology on page 84. You may also need to reconfigure IP addresses, static routes, bridges, and virtual
servers, and enable or disable SSL on your web servers.
Back up your configuration before changing the operation mode. (See Backups on
page 270.) Changing modes deletes any policies not applicable to the new mode, all
static routes, V-zone IPs, and VLANs. You may also need to re-cable your network
topology to suit the operation mode. Exceptions may include switching between the
two transparent modes, which have similar network topology requirements.
2. If you are changing to true transparent proxy, transparent inspection, or WCCP mode, also enter the following
commands:
config system settings
set gateway <gateway_ipv4>
end
where <gateway_ipv4> is the IP address of the gateway router (see Adding a gateway on page 179).
FortiWeb will use the gateway setting to create a corresponding static route under config router
static with the first available index number. Packets will egress through port1, the hard-coded
management network interface for the transparent and WCCP operation modes.
3. If you have not yet adjusted the physical topology to suit the new operation mode, see Planning the network
topology on page 84. You may also need to reconfigure IP addresses, static routes, bridges, and virtual
servers, and enable or disable SSL/TLS on your web servers.
See also
By default, FortiWeb appliances are each a single, standalone appliance. They operate independently.
If you have purchased more than one, however, you can configure the FortiWeb appliances to form an active-
passive or active-active high availability (HA) FortiWeb cluster. This improves availability so that you can
achieve 99.999% service level agreement (SLA) uptimes regardless of, for example, hardware failure or
maintenance periods.
If you have multiple FortiWeb appliances but do not need failover, you can still
synchronize the configuration. This can be useful for cloned network environments and
externally load-balanced active-active HA. See Configuring a high availability (HA)
FortiWeb cluster on page 130.
You can use the FortiWeb WCCP feature to create an active-active HA cluster. You
synchronize the cluster members using FortiWeb's configuration synchronization
feature so that each cluster member is ready to act as backup if the other appliance is
not available. The WCCP server provides load balancing between the HA pair and
redirects all traffic to one cluster member if the other member is unavailable. For more
information, see Example: Using WCCP with multiple FortiWeb appliances on page
155.
HA requirements
l For active-passive HA, you need two identical physical FortiWeb appliances; for active-active HA, you need two or
more (up to eight) identical physical FortiWeb appliances. (i.e., the same hardware model and firmware version (for
example, both appliances could be a FortiWeb3000C running FortiWeb5.3.4))
l Redundant network topology: if the active or master appliance fails, physical network cabling and routes must be
able to redirect web traffic to the standby or slave appliances (see Topologies for high availability (HA) clustering on
page 97)
l At least one physical port on each HA appliance connected directly, via crossover cables, or through switches (see
HA heartbeat & synchronization on page 57)
l For FortiWeb-VM:
l A valid license for all cluster members. You cannot configure HA with trial licences.
l Configure the vNetwork interfaces that carry heartbeat and synchronization traffic to operate in
promiscuous mode and accept MAC address changes.
l Ensure the cluster members have the same number of ports and are configured with the same amount of
memory and vCPUs.
FortiWeb-VM supports HA. However, if you do not wish to use the native HA, you can
use your hypervisor or VM environment manager to install your virtual appliances over
a hardware cluster to improve availability. For example, VMware clusters can use
vMotion or VMware HA.
Active-pastive HA topology and failover IP address transfer to the new active appliance
Heartbeat
Links
port3 port4
FortiGate Switch
port1 port2
For best fault tolerance, make sure that your topology is fully redundant, with no single
points of failure.
The style of FortiWeb HA is active-passive: one appliance is elected to be the active appliance (also called the
primary, main, or master), applying the policies for all connections. The other is a passive standby (also called the
secondary, or slave), which assumes the role of the active appliance and begins processing connections only if
the active appliance fails.
The active and standby appliances detect failures by communicating through a heartbeat link that connects the
two appliances in the HA pair. Failure is assumed when the active appliance is unresponsive to the heartbeat
from the standby appliance for a configured amount of time:
If the active appliance fails, a failover occurs: the standby becomes active. To do this, the standby takes all IP
addresses of the unresponsive appliance: it notifies the network via ARP to redirect traffic for that virtual MAC
address (VMAC) to its own network interfaces. (In transparent modes, this includes the management IP.
Additionally, at Layer2, switches are notified that the VMAC is now connected to a different physical port. So
even though in these modes the interfaces usually are transparent bridges without IPs, ARP traffic will still occur
due to failover.)
Time required for traffic to be redirected to the new active appliance varies by your networks responsiveness to
changeover notification and by your configuration:
Total failover time = ARP Packet Numbers x ARP Packet Interval + Network responsiveness + Heartbeat
timeout
When the former active appliance comes back online, it may or may not assume its former active role. For an
explanation, see How HA chooses the active appliance on page 60. (At this time, when an appliance is rejoining
the cluster, FortiWeb will also send gratuitous ARP packets. This helps to ensure that traffic is not accidentally
forwarded to both the current and former active appliance in cases where the cluster is connected through 2
switches.)
Active-pastive HA topology and failover IP address transfer to the new active appliance shows an example HA
network topology with IP address transfer from the active appliance to the standby appliance upon failover. In this
example, the primary heartbeat link is formed by a crossover cable between the two port3 physical network ports;
the secondary heartbeat link is formed between the two port4 physical network ports.
To configure FortiWeb appliances that are operating in HA mode, you usually connect only to the active
appliance. The active units configuration is almost entirely synchronized to the passive appliance, so that
changes made to the active appliance are propagated to the standby appliance, ensuring that it is prepared for a
failover.
However, you can use the HA setting for a cluster member to configure it with an independent management port.
You can then use the IP address of the port to directly manage the cluster member.
Tasks that can require you to access a cluster member directly include:
l connecting to a standby appliance in order to view log messages recorded about the standby appliance itself on its
own hard disk
l connecting to a standby appliance to configure settings that are not synchronized (see Configuration settings that
are not synchronized by HA on page 59)
Active-active HA topology
port 1 port 2
port 3
Slave
port 1
port 2
Heartbeat
FortiGate port 3
Switch port 3
port 1 port 2
Web Servers
Slave
An active-active HA cluster created in Reverse Proxy and True Transparent Proxy modes cab be consisted of
more than two FortiWeb appliances (up to eight). Note that this is not the active-active HA deployed in WCCP
mode (see Example: Using WCCP with multiple FortiWeb appliances on page 155) or an external HA/load
balancer (see Example network topology: transparent proxy mode with configuration synchronization and
external HA via FortiADC). All the cluster members are operating as an active appliances together to
simultaneously handle the traffic between clients and the back web servers. In an active-active HA cluster, one of
the member appliances will be selected as the master appliance, while the others are slaves. The master
appliance in an active-active HA cluster plays the role as the central controller to receive traffic from clients and
back web servers, and distribute the traffic to all the cluster members (including itself) according specified load-
balancing algorithm so that each FortiWeb appliance performs the security services to protect the traffic. Similar
to the active-passive HA deployment, the operation of active-active HA cluster requires heartbeat detection,
configuration and session synchronization between the cluster members. If the master appliance fails, one of the
slaves will take it over. The heartbeat interfaces of all the HA appliances must be connected directly with
crossover cables or through switches to carry the heartbeat and synchronization traffic between the HA cluster
members.
Load-balancing in Active-active HA
There are three load-balancing algorithms available for master appliance to distribute received traffic over the
available cluster members:
l By source IP: consistently distribute the traffic coming from a source to the same cluster member (the default
algorithm).
l By connections: dynamically distribute traffic to a cluster member who has the fewest connections processing.
l Round-Robin: distribute traffic among the available members in a circular order.
All the cluster members, including the master appliance, are the candidates for the algorithms, unless failure is
detected on any of them. Traffic distribution is based on TCP/UDP sessions, which means once the first packet of
a TCP/UDP session is assigned to a cluster member, the subsequent packets of the session will be consistently
distributed to the same appliance during a time period. For more details, see How to change the load-balancing
algorithm for an active-active HA cluster.
Although algorithm By source IP distribute the subsequent traffic coming from the
same source IP address to a fix cluster member, it performs weighted round-robin to
determine the cluster member for the first packet coming from the IP address. You can
configure the weights between the cluster members through the CLI command set
weight in system ha. See FortiWeb CLI Reference for details.
Fail-over in Active-active HA
An active-active HA cluster performs the same heartbeat detection and configuration synchronization
mechanisms as an active-passive HA pair (see HA heartbeat & synchronization and Active-pastive HA topology
and failover). If a slave failure is detected, the slave appliance will be ignored by the master for its traffic
distribution. If the master fails, one of the slave appliances will take it over as a master immediately (see How HA
chooses the active appliance on page 60.). After the original master recovers from failure, it becomes the slave
unit. Note that all the sessions distributed to a cluster appliance will be lost if the appliance goes fail.
Once the master appliance fails and a slave takes it over, the subsequent traffic of all the original and new
sessions will be transferred to the new master for distribution (those sessions distributed to the original master
appliance by itself are not included, since the original master lost them while it failed). To distribute the original
sessions in the original way, the new master has to know how they are mapped. To provide a seamless takeover
for this, a master appliance must maintain the mapping information (called session information as well) for all the
sessions and synchronize (see Heartbeat Interface) it to all the other cluster members all the time, so that when a
slave becomes the master the subsequent traffic of the original sessions can be destined to where they were.
Note that active-passive HA pair will not maintain the session synchronization.
To configure HA
1. If the HA cluster will use FortiGuard services, license all FortiWeb appliances in the HA group, and register
them with the Fortinet Technical Support web site:
https://support.fortinet.com/
If you license only the primary appliance in an HA group, after a failover, the secondary
appliance will not be able to use the FortiGuard service. This could cause traffic to be
scanned with out-of-date definitions, potentially allowing newer attacks.
3. Physically link the FortiWeb appliances that will be members of the HA cluster.
For both active-active and active-passive HA cluster, you must link at least one of their ports (e.g. port4 to
port4) for heartbeat and synchronization traffic between members of the cluster. You can either:
l link two appliances directly via a crossover cable (for only two appliances in a cluster)
l link the appliances through a switch (for more than two appliances in a cluster)
If a switch is used to connect the heartbeat interfaces, the heartbeat interfaces must be reachable by Layer 2
multicast.
For example, you might link port3 to port3 on the other appliance, and link port4
to port4 on the other appliance, then configure both appliances to use those network
interfaces for heartbeat and synchronization.
If you link HA appliances through switches, to improve fault tolerance and reliability,
link the ports through two separate switches. Do not connect these switches to your
overall network, which could introduce a potential attack point, and could also allow
network load to cause latency in the heartbeat, which could cause an unintentional
failover.
By default, each FortiWeb appliance operates as a single, standalone appliance: only the Configured HA
mode drop-down list appears, with the Standalone option selected.
6. From Configured HA mode, select Active-Passive if you want to create an active-passive HA group, or
select Active-Actiev if you want to create an active-active HA group.
Group-name Type a name to identify the HA pair if you have more than one.
Device Priority Type the priority of the appliance when selecting the active-passive primary (or active-
active master) appliance in the HA cluster. (On active-passive standby or active-active
slave devices, this setting can be reconfigured using the CLI command execute ha
manage <serial-number_str> <priority_int>. For details, see the
FortiWeb CLI Reference.)
This setting is optional. The smaller the number, the higher the priority. The valid
range is 0 to 9. The default is 5.
Note: By default, unless you enable Override, uptime is more important than this
setting. For details, see How HA chooses the active appliance on page 60.
Override Enable to make Device Priority a more important factor than uptime when selecting
the main appliance. See How HA chooses the active appliance on page 60.
Reserve Specifies whether the network interface you select provides administrative access
Management Port to this appliance when it is a member of the HA cluster.
for Cluster
Member When this option is selected, you can access the configuration for this cluster
member using the IP address of the specified network interface. The interface
<interface name> configuration, including administrative access and other settings, is not
synchronized with other cluster members.
You cannot configure routing for the port you select. To allow your management
computer to connect with the web UI and CLI, ensure it is on the same subnet as
the port. (Alternatively, you can configure a source IP NAT on the router or
firewall that modifies the management computer's source IP.)
All the members of the HA cluster must have the same group ID. If you have
more than one HA cluster on the same network, each HA cluster must have a different
groupID.
Detection Interval Type the number of 100-millisecond intervals to set the pause between each
heartbeat packet that the one FortiWeb appliance sends to the other FortiWeb
appliances in the HA cluster. This is also the amount of time that a FortiWeb appliance
waits before expecting to receive a heartbeat packet from the other appliances.
This part of the configuration is synchronized between the all the appliances in a
cluster.
The valid range is 1 to 20 (that is, between 100 and 2,000 milliseconds).
Note: Although this setting is synchronized between all the appliances, you should
initially configure all the appliances with the same Detection Interval to prevent
inadvertent failover from occurring before the initial synchronization.
Heartbeat Lost Type the number of times one of HA appliances retries the heartbeat and waits to
Threshold receive HA heartbeat packets from the other HA appliances before assuming that
the other appliances have failed.
l Increase the failure detection threshold if a failure is detected when none has
actually occurred. For example, during peak traffic times, if the master appliance is
very busy, it might not respond to heartbeat packets in time, and the slave
appliances may assume that the master appliance has failed.
l Reduce the failure detection threshold or detection interval if administrators and
HTTP clients have to wait too long before being able to connect through the master
appliance, resulting in noticeable down time.
The valid range is from 1 to 60.
Note: Although this setting is synchronized between all the appliances, you
should initially configure all the appliances with the same Heartbeat Lost
Threshold to prevent inadvertent failover from occurring before the initial
synchronization.
Port Monitor Mark the check boxes of one or more network interfaces that each directly correlate
with a physical link. These ports will be monitored for link failure.
Port monitoring (also called interface monitoring) monitors physical network ports to
verify that they are functioning properly and linked to their networks. If the physical
port fails or the cable becomes disconnected, a failover occurs. You can monitor
physical interfaces, but not VLAN subinterfaces or 4-port switches.
If you select a link aggregate interface, failover occurs only if all the physical network
interfaces in the logical interface fail. For more information, see Link aggregation on
page 172.
Note: To prevent an unintentional failover, do not configure port monitoring until you
configure HA on all the appliances in the HA cluster, and have plugged in the cables to
link the physical network ports that will be monitored.
Heartbeat Select which port(s) on this appliance that the all the appliances will use to send
Interface heartbeat signals and synchronization data (configuration synchronization for active-
passive HA, or configuration and session synchronization for active-active HA)
between each other (i.e. the HA heartbeat link).
Connect this port to the same port number on the other HA cluster members. (e.g., If
you select port3 for the primary heartbeat link, connect port3 on this appliance to
port3 on the other appliances.)
At least one heartbeat interface must be selected on each appliance in the HA cluster.
Ports that currently have an IP address assigned for other purposes (that is, virtual
servers or bridges) cannot be re-used as a heartbeat link.
Tip: If enough ports are available, you can select both a primary heartbeat interface
and a secondary heartbeat interface on each appliance in the HA pair to provide
heartbeat link redundancy. (You cannot use the same port as both the primary and
secondary heartbeat interface on the same appliance, as this is incompatible with the
purpose of link redundancy.)
Note: If a switch is used to connect the heartbeat interfaces, the heartbeat interfaces
must be reachable by Layer 2 multicast.
Note: The master appliance use the heartbeat interface to synchronize its session
table to other appliances in an active-active HA cluster by default. However, you
can use extra interfaces for the session synchronization by configuring set
session-sync-dev <port_number> in CLI command config system ha.
Moreover, the appliance synchronizes sessions to others in unicase by default, but you
can choose broadcast for it by configuring set session-sync-broadcast
{enable|disable} in CLI command config system ha. Broadcast will be
suggested if a active-active HA cluster contains many appliances. For details, see the
FortiWeb CLI Reference.
8. Click Apply.
All the appliances join the HA cluster by matching their Group ID. They begin to send heartbeat and
synchronization traffic to each other through their heartbeat links.
To determine which appliance currently has the role of the main appliance, on System> Config> HA-
Config, in the HA Member table, view the HA Role column:
l main The appliance in this row is currently active. The active appliance applies policies to govern the traffic
passing to your web servers. Also called the primary, master, or main appliance.
l standby The appliance in this row is currently passive, and is not actively applying policies. The passive
appliance listens to heartbeat traffic and port monitoring for signs that the main appliance may have become
unresponsive, at which point it will assume the role of the main appliance. Also called the secondary or standby
appliance.
If both appliances believe that they are the main:
l Test the cables and/or switches in the heartbeat link to verify that the link is functional.
l Verify that you have selected the heartbeat port or ports in Heartbeat Interface. Make sure that the primary and
secondary link is not crossed (that is, the primary heartbeat interface is not connected to the secondary
heartbeat interface on the other appliance).
l Verify that the Group ID matches on both appliances.
l Verify that the ports on Port Monitor are linked and up (available).
l If the heartbeat link passes through switches and/or routers, you may need to adjust the time required after a
reboot to assess network availability before electing the main appliance. For details, see the boot-time
<seconds_int> setting in the FortiWeb CLI Reference.
l For debugging logs, use the diagnose system ha status and diagnose debug application
hatalk level commands. For details, see the FortiWeb CLI Reference.
9. To monitor the HA cluster for failover, you can use SNMP (see Configuring an SNMP community on page
787), log messages, and alert email (see Configuring logging on page 752).
ARP Packet Type the number of times that the FortiWeb appliance will broadcast extra address
Numbers resolution protocol (ARP) packets when it takes on the main role. (Even though a new
NIC has not actually been connected to the network, FortiWeb does this to notify the
network that a new physical port has become associated with the IP address and
virtual MAC of the HA pair.) This is sometimes called using gratuitous ARP packets to
train the network, and can occur when the main appliance is starting up, or during a
failover. Also configure ARP Packet Interval.
l Increase the number of times the main appliance sends gratuitous ARP packets if
your HA pair takes a long time to fail over or to train the network. Sending more
gratuitous ARP packets may help the failover to happen faster.
l Decrease the number of times the main appliance sends gratuitous ARP packets if
your HA pair has a large number of VLAN interfaces and virtual domains. Because
gratuitous ARP packets are broadcast, sending them may generate a large amount
of network traffic. As long as the HA pair still fails over successfully, you could reduce
the number of times gratuitous ARP packets are sent to reduce the amount of traffic
produced by a failover.
ARP Packet Type the number of seconds to wait between each broadcast of ARP packets.
Interval
Normally, you do not need to change this setting. Exceptions include:
l Decrease the interval if your HA pair takes a long time to fail over or to train the
network. Sending ARP packets more frequently may help the failover to happen
faster.
l Increase the interval if your HA pair has a large number of VLAN interfaces and
virtual domains. Because gratuitous ARP packets are broadcast, sending them may
generate a large amount of network traffic. As long as the HA pair still fails over
successfully, you could increase the interval between when gratuitous ARP packets
are sent to reduce the rate of traffic produced by a failover.
Note: FortiWeb's Session Management (see Session Management) is not supposed by the active-active
HA deployment with the algorithm By connections or Round-robin being used for the load-balancing.
If your HA link passes through switches and/or routers, and inadvertent failovers occur
when rebooting the HA pair, you can increase the maximum time to wait for a
heartbeat signal after a reboot by configuring boot-time<limit_int>. See the
FortiWeb CLI Reference.
After completing your HA deployment, you can check the HA topology, information, and statistics of each HA unit.
Go to System > Status > HA Topology and click View HA Statistics. The following information is displayed:
See also
Configuration synchronization provides the ability to duplicate the configuration from another FortiWeb appliance
without using FortiWeb high availability (HA). The synchronization is unilateral push: it is not a bilateral
synchronization. It adds any missing items, and overwrites any items that are identically named, but does not
delete unique items on the target FortiWeb, nor does it pull items from the target to the initiating FortiWeb.
Replicating the configuration can be useful in some scenarios where you cannot use, or donot want, FortiWeb
HA:
l External active-active HA (load balancing) could be provided by the firewall, the router, or an HTTP-aware load
balancer such as FortiADC , since active-active HA is not provided by FortiWeb itself.
l External active-passive HA (failover) could be provided by a specialized failover device, instead of the FortiWebs
themselves, for network load distribution, latency, and performance optimization reasons. The failover device must
monitor for live routes.
l Multiple identical non-HAFortiWeb appliances in physically distant locations with the same network scheme
might be required to have the same (maybe with a few extra different) server policies, and therefore management
could be simplified by configuring one FortiWeb and then replicating that to the others.
In such cases, you may be able to save time and preserve your existing network topology by synchronizing a
FortiWeb appliances configuration with another FortiWeb. This way, you do not need to individually configure
each one, and do not need to use FortiWeb HA.
Example network topology: Configuration synchronization with multiple identical FortiWeb appliances
(non-HA)
FortiGate FortiWeb
Client
Web
Server
Farm 1
Switch
Router
Configuration
Synchronization
FortiWeb
Router Web
Server
Farm 2
FortiGate Switch
FortiWeb
Administrator
FortiGate
Web
Server Switch
Farm 3
If you require such features, either use FortiWeb HA instead, or augment configuration
synchronization with an external HA/load balancing device such as FortiADC.
Like HA, due to hardware-based differences in valid settings, configuration synchronization requires that both
FortiWeb appliances be of the same model. You cannot, for example, synchronize a FortiWeb-VM and
FortiWeb1000D.
You can configure which port number the appliance uses to synchronize its configuration. See Config-Sync on
page 75.
Synchronize each time you change the configuration, and are ready to propagate the changes. Unlike
FortiWeb HA, configuration synchronization is not automatic and continuous. Changes will only be pushed when
you manually initiate it.
Back up your system before changing the operation mode (see Backups on
page 270). Synchronizing the configuration overwrites the existing
configuration, and cannot be undone without restoring the configuration
from a backup.
To access this part of the web UI, your administrator's account access profile must have Read and
Writepermission to items in the Network Configuration category. For details, see Permissions on page 69.
This feature is not available if ADOMs are enabled.
2. In Peer FortiWeb IP, type the IP address of the target FortiWeb appliance that you want to receive
configuration items from your local FortiWeb appliance.
3. In Peer FortiWeb Port, type the port number that the target FortiWeb appliance uses to listen for
configuration synchronization. The default port is 8333.
4. In Peer FortiWeb 'admin' user password, type the password of the administrator account named admin
on the other FortiWeb appliance.
Full For all operation modes except WCCP, synchronizes all configuration
except:
l System
l Policy > Server Policy
l ServerObjects> Server
l ServerObjects> Service
For a detailed list of settings that are excluded from a partial
synchronization, including CLI-only settings, see the FortiWeb CLI
Reference.
This option is not available if the FortiWeb appliance is operating in reverse proxy
mode. See also Supported features in each operation mode on page 88.
To test the connection settings, click Test. Results appear in a pop-up window. If the test connection to the
target FortiWeb succeeds, this message should appear:
Service is available...
verify that:
7. Click Yes.
The FortiWeb appliance sends its configuration to the other, which synchronizes any identically-named
policies and settings. Time required varies by the size of the configuration and the speed of the network
connection. When complete, this message should appear:
Config. synchronized successfully.
See also
You can configure FortiWeb as a Web Cache Communication Protocol (WCCP) client. This configuration allows a
FortiGate configured as a WCCP server to redirect HTTP and HTTPStraffic to FortiWeb for inspection.
If your WCCP configuration includes multiple WCCP clients, the WCCP server can balance the traffic load among
the clients. In addition, it detects when a client fails and redirects sessions to clients that are still available.
WCCP was originally designed to provide web caching with load balancing and fault tolerance and is described by
the Web Cache Communication Protocol Internet draft.
This feature requires the operation mode to be WCCP. See Setting the operation mode on page 127.
For information on connecting and configuring your network devices for WCCP mode, see Topology for WCCP
mode on page 96.
For detailed information on configuring FortiGate and other Fortinet devices to act as a WCCP service group, see
the FortiGate WCCP topic in the FortiOS Handbook.
1. Ensure the operation mode is WCCP. See Setting the operation mode on page 127.
2. Configure the network interface that communicates with the FortiGate (the WCCP server) to use the WCCP
Protocol. See Configuring the network settings on page 160.
Service ID Specifies the service ID of the WCCP service group that this WCCP client
belongs to.
For other types of traffic (for example, HTTPS), the valid range is 51 to
255. (Do not use 1 to 50, which are reserved by the WCCP standard.)
Cache ID Specifies the IP address of the FortiWeb interface that communicates with
the WCCP server.
Ensure that the WCCP protocol is enabled for the specified network
interface. See Configuring the network settings on page 160.
Group Address Specifies the IP addresses of the clients for multicast WCCP
configurations. The multicast address allows you to configure a WCCP
service group with more than 8 WCCP clients.
Router List Specifies the IP addresses of the WCCP servers in the WCCP service
group. You can specify up to 8 servers.
Port Specifies the port numbers of the sessions that this client inspects.
Authentication Specifies whether communication between the WCCP server and client is
encrypted using the MD5 cryptographic hash function.
Password Specifies the password used by the WCCP server and clients. All servers
and clients in the group use the same password.
Service Priority Specifies the priority that this service group has. If more than one service
group is available to scan the traffic specified by Port and Protocol, the
WCCP server transmits all the traffic to the service group with the highest
Service Priority value.
Service Protocol Specifies the protocol of the network traffic the WCCP service group
transmits.
Cache Engine Method Specify how the WCCP server redirects traffic to FortiWeb.
Primary Hash Specifies that hashing scheme that the WCCPserver uses in combination
with the Weight value to direct traffic, when the WCCP service group has
more than one WCCPclient.
Weight Specifies a value that the WCCPserver uses in combination with the
Primary Hash value to direct traffic, when the WCCP service group has
more than one WCCPclient.
Bucket Format Specifies the hash table bucket format for the WCCP cache engine.
Although you can set different values for settings such as Service Priority and
Primary Hash for each WCCP client in a service group, the settings in the WCCP
client with the lowest Cache ID value have priority.
For example, if a WCCP service group has two WCCP clients with cache IDs
172.22.80.99 and 172.22.80.100, the group uses the WCCP client settings for
172.22.80.99.
6. Click OK.
7. Optionally, use the following CLI command to route traffic back to the client instead of the WCCP server. You
cannot enable this feature using the web UI.
config system wccp
edit <service-id>
set return-to-sender enable
next
end
8. Create a WCCP server pool. See Creating a server pool on page 359.
9. Create a server policy in which Deployment Mode is WCCP Servers and the server pool is the WCCPpool
you created earlier.
Example output:
--------------------WCCP Service ID 52-------------------------
WCCP_server_list: 1 WCCP server in total
0. 172.22.80.1
receive_id:13290 change_number:7
WCCP client seen by this WCCP Server:
0. 172.22.80.99 weight:0 (*Designated WCCP Client)
1. 172.22.80.100 weight:0
WCCP service options:
priority: 0
protocol: 6
port: 80, 443
primary-hash: src-ip, dst-ip
192.168.1.5/24
Web Web
Server 2 Server 1
Client 192.168.1.4/24
port2
192.168.1.1/24
port1
Switch
non-HTTP
port3 FortiGate
172.22.80.1/24
HTTP
and
HTTPS
Scanned
HTTP and
HTTPS
port3
172.22.80.100/24
FortiWeb
The following command sets the IP address and enables WCCP for port3 on the firewall running FortiOS 5.2.x:
config system interface
edit "port3"
set ip 172.22.80.1 255.255.255.0
set wccp enable
next
end
On the firewall, the following command specifies a WCCP service group using a service group ID (52), the
firewall interface that supports WCCP (172.22.80.1), and the interface the FortiWeb uses for WCCP
communication (172.22.80.100).
config system wccp
edit "52"
set router-id 172.22.80.1
set server-list 172.22.80.100 255.255.255.0
next
end
The following firewall policies specify the traffic that FortiGate routes to the FortiWeb for scanning:
l A port1 to port2 policy that accepts HTTP and HTTPS traffic and for which WCCP is enabled.
l A port1 to port2 policy that accepts HTTP and HTTPS traffic and for which WCCP is not enabled. This policy
maintains traffic flow when the WCCP client is not available (for example, if FortiWeb is rebooting).
l A port3 to port2 policy that accepts scanned HTTP and HTTPS traffic from the FortiWeb.
config firewall policy
edit 1
set srcintf "Port1"
set dstintf "Port2"
set srcaddr "all"
set dstaddr "192.168.1.4" "192.168.1.5"
set action accept
set schedule "always"
set service "HTTP" "HTTPS"
set wccp enable
next
edit 2
set srcintf "Port1"
set dstintf "Port2"
set srcaddr "all"
set dstaddr "192.168.1.4" "192.168.1.5"
set action accept
set schedule "always"
set service "HTTP" "HTTPS"
next
edit 3
set srcintf "Port3"
set dstintf "Port2"
set srcaddr "all"
set dstaddr "192.168.1.4" "192.168.1.5"
set action accept
set schedule "always"
set service "HTTP" "HTTPS"
next
end
On the FortiWeb, WCCP is enabled for the interface that connects FortiWeb to the firewall.
The WCCP client configuration on FortiWeb adds it to the WCCP service group 52, specifies the interface used
for WCCP client functionality (172.22.80.100) and the WCCP server (172.22.80.1).
The destination servers are members of a WCCPserver pool. This pool is selected in the WCCP Servers server
policy that FortiWeb applies to the traffic it receives from the firewall via WCCP.
However, FortiOS 5.4 also allows you to configure WCCP communication with FortiWeb using its External
Security Devices settings. This example creates the same environment as Example: Using WCCP with FortiOS
5.2.x.
FortiGate configuration:
l WCCP is enabled for port3 on the firewall running FortiOS 5.4 (172.22.80.1).
l In the System > External Security Devices settings, HTTP Service is enabled. For FortiWeb IPs, the
FortiWeb acting as a WCCP client is specified.
l The service ID is 51. This is the only service ID that the firewall can use for WCCP clients configured using the web
UI.
l In the Security Profiles > Web Application Firewall settings, for Inspection Device, select External.
l In the Policy & Objects > IPv4 Policy settings, configure a policy for which Web Application Firewall is enabled.
l A second policy for which Web Application Firewall is not enabled to maintain traffic flow when the WCCP client
is not available
l A third policy accepts scanned HTTP and HTTPS traffic from the FortiWeb.
FortiWeb configuration:
Configuration is the same as Example: Using WCCP with FortiOS 5.2.x, except the service ID value is 51. This is
the only service ID value you can use when you configure WCCP communication using the FortiOS 5.4 External
Security Devices settings.
192.168.1.5/24
Web Web
Server 2 Server 1
Clie
Cl
Client
ient
ie nt 192.168.1.4/24
port2
192.168.1.1/24
port1
Switch
non-HTTP
FortiGate
port3
172.22.80.1/24
HTTP
and
HTTPS
Scanned
HTTP and
HTTPS
port3
172.22.80.99/24
To create this configuration, you first configure FortiWeb A and use the configuration synchronization feature to
"push" the configuration to FortiWeb B. (See Configuring FortiWeb to receive traffic via WCCP on page 146.) You
then complete the configuration for FortiWeb B. The Config-Synchronization feature does not synchronize the
following configuration when the operating mode is WCCP:
You can link the FortiGate and FortiWeb appliances in this topology without using a switch. Instead, you can link
the FortiWeb appliances to FortiGate directly and use the following commands to create a switch on the firewall:
config system interface
edit "port3"
set vdom "root"
set vlanforward enable
In this example, a router running Cisco IOS routes HTTP and HTTPS traffic destined for the back-end servers to a
FortiWeb for scanning.
192.168.1.5/24
Web Web
Server 2 Server 1
Client 192.168.1.4/24
GigabitEthernet2
GigabitEthernet1 192.168.1.1/24
Switch
non-HTTP
Cisco Router
GigabitEthernet3
172.22.80.1/24
HTTP
and
HTTPS Scanned
HTTP and
HTTPS
port3
172.22.80.100/24
FortiWeb
You create the WCCP server configuration using a series of Cisco IOS commands.
Because the WCCP configuration is standardized, FortiWeb can work interchangeably with different WCCP
servers s long as they have the same WCCP configuration. Thus, theFortiWeb WCCPclient configuration mostly
the same as the one described in Example: Using WCCP with FortiOS 5.2.x.
Configure a WCCP access list that routes HTTP and HTTPS requests for the subnet used by the back-end servers
to FortiWeb:
Router(config)# ip access-list extended wccp_acl
Router (config-ext-nacl) # permit tcp any 192.168.1.0 0.0.0.255 eq www 443
Router (config-ext-nacl) # exit
If the service group uses a multicast address, register the router to the multicast address you specified earlier
(239.0.0.0):
Router(config)# ip multicast-routing distributed
Router(config)# interface GigabitEthernet3
Router(config)# ip wccp 52 group-listen
Router(config)# ip pim sparse-dense-mode
The System> Config> WCCP Clientconfiguration for this example is different from the one described in
Example: Using WCCP with FortiOS 5.2.x in the following two ways:
l If the service group uses a multicast address, you specify a value for Group Address instead of for Router List.
l You enable Authentication and specify a password.
For example:
Otherwise, network interface, WCCP client and server pool and policy configuration is the same as the one found
in Example: Using WCCP with FortiOS 5.2.x.
When shipped, each of the FortiWeb appliances physical network adapter ports (or, for FortiWeb-VM, vNICs) has
a default IP address and netmask. If these IP addresses and netmasks are not compatible with the design of your
unique network, you must configure them.
You also must configure FortiWeb with the IP address of your DNS servers and gateway router.
You can use either the web UI or the CLI to configure these basic network settings.
If you are installing a FortiWeb-VM virtual appliance, and you followed the instructions
in the FortiWeb-VM Install Guide, you have already configured some of the settings
for port1. To fully configure all of the network interfaces, you must complete this
chapter.
How should you configure the other network interfaces? Should you add more? Should each have an IP address?
That varies. In some cases, you may not want to assign IP addresses to the other network interfaces.
Initially, each physical network port (or, on FortiWeb-VM, a vNIC) has only one network interface that directly
corresponds to it that is, a physical network interface. Multiple network interfaces (subinterfaces or virtual
interfaces) can be associated with a single physical port, and vice versa (redundant interfaces/NIC
teaming/NIC bonding or aggregated links). These can provide features such as link failure resilience or multi-
network links.
VLAN Subnetwork
Releationships of Interfaces
Physical vlanA Bandwidth
Network Interface Network Divided
Interface
Logical Types =1 Port/n
port1 port2
Link
Bridging Aggregation
Network Bandwidth
bridge3 Interface agg4 Multiplied
Bandwidth = 1 Port x n
= 1 Port
FortiWeb does not currently support IPSec VPN virtual interfaces nor redundant links.
If you require these features, implement them separately on your FortiGate, VPN
appliance, or firewall.
Usually, each network interface has at least one IP address and netmask. However, this is not true for bridges.
Bridges (V-zones) allow packets to travel between the FortiWeb appliances physical network ports over a physical
layer link, without an IP layer connection with those ports.
l the FortiWeb appliance operates in true transparent proxy or transparent inspection mode, and
l you want to deploy FortiWeb between incoming connections and the web server it is protecting, without changing
your IP address scheme or performing routing or network address translation (NAT)
For bridges, do not assign IP addresses to the ports that you will connect to either the web server or to the overall
network. Instead, group the two physical network ports by adding their associated network interfaces to a bridge.
Configure each network interface that will connect to your network or computer (see Configuring the network
interfaces on page 162 or Configuring a bridge (V-zone) on page 175). If you want multiple networks to use the
same wire while minimizing the scope of broadcasts, configure VLANs (see Adding VLAN subinterfaces on page
168).
See also
If this FortiWeb will belong to a FortiWeb HA cluster, do not configure any network
interface that will be used as an HA heartbeat and synchronization link. If you are re-
cabling your network and must configure it, connect and switch to the new HA link
first. Failure to do so could cause unintentional downtime, failover, and ignored IP
address configuration. To switch the HA link, see Configuring a high availability (HA)
FortiWeb cluster on page 130.
To customize the network interface information that FortiWeb displays when you go to System> Network
>Interface, right-click the heading row. Select and clear the columns you want to display or hide, and then click
Apply.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Network Configuration category. For details, see Permissions on page 69.
If the network interfaces Status column is Bring Up, its administrative status is
currently down and it will not receive or emit packets, even if you otherwise configure
it. To bring up the network interface, click the Bring Up link.
This Status column is not the detected physical link status; it is the
administrative status that indicates whether you permit network interface to
receive and/or transmit packets.
2. Double-click the row of the network interface that you want to modify.
The Edit Interface dialog appears. Name displays the name and media access control (MAC) address of this
network interface. The network interface is directly associated with one physical link as indicated by its name,
such as port2.
In HA, it may use a virtual MAC instead. See HA heartbeat & synchronization on page 57 and Configuring a
high availability (HA) FortiWeb cluster on page 130.
Addressing Mode Specify whether FortiWeb acquires an IPv4/IPv6 address for this network
interface using DHCP.
IP/Netmask Type the IP address and subnet mask, separated by a forward slash (/),
such as 192.0.2.2/24 for an IPv4 address or
2001:0db8:85a3:::8a2e:0370:7334/64 for an IPv6 address.
The IP address must be on the same subnet as the network to which the
interface connects. Two network interfaces cannot have IP addresses on
the same subnet.
Administrative Access Enable the types of administrative access that you want to permit to this
interface.
HTTPS Enable to allow secure HTTPS connections to the web UI through this
network interface. To configure the listening port number, see Global web
UI & CLI settings on page 73.
Note: Disabling PING only prevents FortiWeb from receiving ICMP type8
(ECHO_REQUEST) and traceroute-related UDP.
HTTP Enable to allow HTTP connections to the web UI through this network
interface. To configure the listening port number, see Global web UI & CLI
settings on page 73.
SSH Enable to allow SSH connections to the CLI through this network interface.
SNMP Enable to allow SNMP queries to this network interface, if queries have
been configured and the sender is a configured SNMP manager. To
configure the listening port number and configure queries and traps, see
SNMP traps & queries on page 785.
TELNET Enable to allow Telnet connections to the CLI through this network
interface.
FortiWeb Enable to allow FortiWeb Manager to connect to this appliance using this
Manager network interface.
WCCP Protocol Select if the interface is used to communicate with a FortiGate unit
configured as a WCCP server.
See Setting the operation mode on page 127 and Configuring FortiWeb to
receive traffic via WCCP on page 146.
Optional.
4. Click OK.
If you were connected to the web UI through this network interface, you are now disconnected from it.
5. To access the web UI again, in your web browser, modify the URL t to match the new IP address of the
network interface. For example, if you configured the network interface with the IP address 10.10.10.5, you
would browse to: https://10.10.10.5
If the new IP address is on a different subnet than the previous IP address, and your computer is directly
connected to the FortiWeb appliance, you may also need to modify the IP address and subnet of your
computer to match the FortiWeb appliances new IP address.
end
where:
HTTP and Telnet connections are not secure, and can be intercepted by a third party.
If possible, enable this option only for network interfaces connected to a trusted
private network, or directly to your management computer. Failure to restrict
administrative access through this protocol could compromise the security of your
FortiWeb appliance.
If you were connected to the CLI through this network interface, you are now disconnected from it.
To access the CLI again, in your terminal client, modify the address to match the new IP address of the network
interface. For example, if you configured the network interface with the IP address 172.16.1.20, you would
connect to that IP address.
If the new IP address is on a different subnet than the previous IP address, and your computer is directly
connected to the FortiWeb appliance, you may also need to modify the IP address and subnet of your computer
to match the FortiWeb appliances new IP address.
You can add a virtual local area network (VLAN) subinterface to a network interface or bridge on the FortiWeb
appliance, up to a maximum of 512 VLAN in total.
Similar to a local area network (LAN), use a IEEE 802.1q VLAN to reduce the size of a broadcast domain and
thereby reduce the amount of broadcast traffic received by network hosts, improving network performance.
VLANs are not designed to be a security measure, and should not be used where
untrusted devices and/or individuals outside of your organization have access to the
equipment. VLAN tags are not authenticated, and can be ignored or modified by
attackers. VLAN tags rely on the voluntary compliance of the receiving host or switch.
Unlike physical LANs, VLANs do not require you to install separate hardware switches and routers to achieve this
effect. Instead, VLAN-compliant switches, such as FortiWeb appliances, restrict broadcast traffic based upon
whether its VLAN ID matches that of the destination network. As such, VLAN trunks can be used to join physically
distant broadcast domains as if they were close.
The VLAN ID is part of the tag that is inserted into each Ethernet frame in order to identify traffic for a specific
VLAN. VLAN header addition is handled automatically by FortiWeb appliances, and does not require that you
adjust the maximum transmission unit (MTU). Depending on whether the device receiving a packet operates at
Layer2 or Layer3 of the network, this tag may be added, removed, or rewritten before forwarding to other nodes
on the network.
Cisco Discovery Protocol (CDP) is supported for VLANs, including when FortiWeb is operating in either of the
transparent modes.
If your FortiWeb model uses Data Plane Development Kit (DPDK) for packet processing (for example, models
3000E, 3010E and 4000E), you cannot use VLANsubinterfaces as a data capture port for offline protection mode.
For these models, remove any VLANconfiguration on an interface before you use it for data capture. These
models fully support the capture and transmission of VLAN traffic.
Name Type the name (for example, vlan100) of this VLAN subinterface that can be
referenced by other parts of the configuration. Do not use spaces or special
characters. The maximum length is 15 characters.
Tip: The name cannot be changed once you save the entry. For a workaround,
see Renaming entries on page 81.
Interface Select the name of the physical network port with which the VLAN subinterface
will be associated.
VLAN ID Type the VLAN ID , such as 100, of packets that belong to this VLAN
subinterface.
l If one physical network port (that is, a VLAN trunk) will handle multiple
VLANs, create multiple VLAN subinterfaces on that port, one for each VLAN
ID that will be received.
l If multiple different physical network ports will handle the same VLANs, on
each of the ports, create VLAN subinterfaces that have the same VLAN IDs.
The valid range is between 1 and 4094 and must match the VLAN ID
added by the IEEE 802.1q-compliant router or switch connected to the
VLAN subinterface.
Addressing Mode Specify whether FortiWeb acquires an IPv4/IPv6 address for this VLAN using
DHCP.
IP/Netmask Type the IP address/subnet mask associated with the VLAN, if any. The IP
address must be on the same subnet as the network to which the interface
connects. Two network interfaces cannot have IP addresses on the same
subnet.
Administrative Access Enable the types of administrative access that you want to permit to this
interface.
HTTPS Enable to allow secure HTTPS connections to the web UI through this network
interface. To configure the listening port number, see Global web UI & CLI
settings on page 73.
SSH Enable to allow SSH connections to the CLI through this network interface.
SNMP Enable to allow SNMP queries to this network interface, if queries have been
configured and the sender is a configured SNMP manager. To configure the
listening port number and configure queries and traps, see SNMP traps &
queries on page 785.
TELNET Enable to allow Telnet connections to the CLI through this network
interface.
FortiWeb Enable to allow FortiWeb Manager to connect to this appliance using this
Manager network interface.
WCCP Protocol Select if the interface is used to communicate with a FortiGate unit configured
as a WCCP server.
See Setting the operation mode on page 127 and Configuring FortiWeb to
receive traffic via WCCP on page 146.
4. Click OK.
Your new VLAN is initially hidden in the list of network interfaces.
To expand the network interface listing in order to view all of a ports associated VLANs, click the + (plus sign)
the name of the port.
See also
l IPv6 support
l Network interface or bridge?
l Configuring a bridge (V-zone)
l Link aggregation
l Configuring DNS settings
l Adding a gateway
l Fail-to-wire for power loss/reboots
l Global web UI & CLI settings
Link aggregation
You can configure a network interface that is the bundle of several physical links via either the web UI or the CLI.
Link aggregation (also called NIC teaming/bonding or link bundling) forms a network interface that queues and
transmits over multiple wires (also called a port channel), instead of only a single wire (as FortiWeb would
normally do with a single network interface per physical port). This multiplies the bandwidth that is available to
the network interface, and therefore is useful if FortiWeb will be inline with your network backbone.
Link aggregation on FortiWeb complies with IEEE 802.3ad and distributes Ethernet frames using a modified
round-robin behavior. If a port in the aggregate fails, traffic is redistributed automatically to the remaining ports
with the only noticeable effect being a reduced bandwidth. When broadcast or multicast traffic is received on a
port in the aggregate, reverse traffic will return on the same port.
When link aggregation uses a round-robin that considers only Layer2, Ethernet frames that comprise an HTTP
request can sometimes arrive out of order. Because network protocols at higher layers often do not gracefully
handle this (especially TCP, which may decrease network performance by requesting retransmission when the
expected segment does not arrive), FortiWebs frame distribution algorithm is configurable.
For example, if you notice that performance with link aggregation is not as high as you expect, you could try
configuring FortiWeb to queue related frames consistently to the same port by considering the IP session
(Layer3) and TCP connection (Layer4), not simply the MAC address (Layer2).
You must also configure the router, switch, or other link aggregation control protocol (LACP)-compatible device
at the other end of FortiWebs network cables to match, with identical:
l link speed
l duplex/simplex setting
l ports that can be aggregated
This will allow the two devices to use the cables between those ports to form a trunk, not an accidental Layer2
(link) network loop. FortiWeb will use LACP to:
l detect suitable links between itself and the other device, and form a single logical link
l detect individual port failure so that the aggregate can redistribute queuing to avoid a failed port
Name Type the name (such as agg) of this logical interface that can be
referenced by other parts of the configuration. Do not use spaces or special
characters. The maximum length is 15 characters.
Tip: The name cannot be changed once you save the entry. For a
workaround, see Renaming entries on page 81.
Lacp-rate Select the rate of transmission for the LACP frames (LACPUs) between
FortiWeb and the peer device at the other end of the trunking cables,
either:
Note: This must match the setting on the other device. If the rates do not
match, FortiWeb or the other device could mistakenly believe that the
others ports have failed, effectively disabling ports in the trunk.
Algorithm Select the connectivity layers that will be considered when distributing
frames among the aggregated physical ports.
l layer2 Consider only the MAC address. This results in the most even
distribution of frames, but may be disruptive to TCP if packets frequently
arrive out of order.
l layer2_3 Consider both the MAC address and IP session. Queue
frames involving the same session to the same port. This results in
slightly less even distribution, and still does not guarantee perfectly
ordered TCP sessions, but does result in less jitter within the session.
l layer3_4 Consider both the IP session and TCP connection. Queue
frames involving the same session and connection to the same port.
Distribution is not even, but this does prevent TCP retransmissions
associated with link aggregation.
Addressing Mode Specify whether FortiWeb acquires an IPv4/IPv6 address for this aggregate
using DHCP.
IP/Netmask Type the IP address/subnet mask associated with the aggregate. The
IP address must be on the same subnet as the network to which the
interface connects. Two network interfaces cannot have IP addresses
on the same subnet.
4. Click OK.
Your new aggregate appears in the list of network interfaces.
next
end
where:
See also
Bridges allow network connections to travel through the FortiWeb appliances physical network ports without
explicitly connecting to one of its IP addresses. Due to this nature, bridges are configured only when FortiWeb is
operating in either true transparent proxy or transparent inspection mode.
Bridges on the FortiWeb appliance support IEEE 802.1d spanning tree protocol (STP) by forwarding bridge
protocol data unit (BPDU) packets, but do not generate BPDU packets of their own. Therefore, in some cases,
you might need to manually test the bridged network for Layer2 loops. Also, you may prefer to manually design a
tree that uses the minimum cost path to the root switch for design and performance reasons.
True bridges typically have no IP address of their own. They use only media access control (MAC) addresses to
describe the location of physical ports within the scope of their network and do network switching at Layer2 of the
OSI model.
You can configure FortiWeb to monitor the members of bridge. When monitoring is enabled, if a network
interface that belongs to the bridge goes down, FortiWeb automatically brings down the other members.
When the operation mode is true transparent proxy, by default, traffic that travels through a bridge to the back-
end servers preserves the MAC address of the source.
If you are using FortiWeb with front-end load balancers that are in a high availability cluster that connects via
multiple bridges, this mechanism can cause switching problems on failover.
To avoid this problem, the config system v-zone command allows you to configure FortiWeb to use the
MAC address of the FortiWeb network interface instead. The option is not available in the web UI. For more
information, see the FortiWeb CLI Reference.
1. If you have installed a physical FortiWeb appliance, plug in network cables to connect one of the physical
ports in the bridge to your protected web servers, and the other port to the Internet or your internal network.
Because port1 is reserved for connections with your management computer, for physical appliances, this
means that you must plug cables into at least 3 physical ports:
To use fail-to-wire, the bridge must be comprised of the ports that have hardware
support for fail-to-wire. For example, on FortiWeb1000C, this is port3 and port4. See
Fail-to-wire for power loss/reboots on page 719 and the QuickStart Guide for your
model.
2. If you have installed FortiWeb-VM, configure the virtual switch (vSwitch). For details, see the FortiWeb-VM
Install Guide.
3. Go to System> Network> V-zone.
This option is not displayed if the current operating mode does not support bridges.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Network Configuration category. For details, see Permissions on page 69.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 15 characters. The name cannot be changed once you save the
entry. See Renaming entries on page 81.
Interface name Displays a list of network interfaces that you can add to a bridge.
To remove a network interface from the bridge, select its name, then click
the left arrow.
6. Click OK.
The bridge appears in System> Network> V-zone.
7. To configure FortiWeb to automatically bring down all members of this v-zone when one member goes down,
select Member Monitor.
8. To use the bridge, select it in a policy (see Configuring a server policy on page 677).
1. If you have installed a physical FortiWeb appliance, connect one of the physical ports in the bridge to your
protected web servers, and the other port to the Internet or your internal network.
Because port1 is reserved for connections with your management computer, for physical appliances, this
means that you must connect at least 3 ports:
2. If you have installed FortiWeb as a virtual appliance (FortiWeb-VM), configure the virtual switch. For details,
see the FortiWeb-VM Install Guide.
set interfaces ?
l set monitor {enable | disable} is an optional setting that specifies whether FortiWeb automatically
brings down all members of this v-zone when one member goes down.
4. To use the bridge, select it in a policy (see Configuring a server policy on page 677).
See also
Adding a gateway
Static routes direct traffic exiting the FortiWeb appliance based upon the packets destination you can specify
through which network interface a packet leaves and the IP address of a next-hop router that is reachable from
that network interface. Routers are aware of which IP addresses are reachable through various network pathways
and can forward those packets along pathways capable of reaching the packets ultimate destinations. Your
FortiWeb itself does not need to know the full route, as long as the routers can pass along the packet.
You must configure FortiWeb with at least one static route that points to a router, often a router that is the
gateway to the Internet. You may need to configure multiple static routes if you have multiple gateway routers
(e.g. each of which should receive packets destined for a different subset of IP addresses), redundant routers
(e.g. redundant Internet/ISP links), or other special routing cases.
However, often you will only need to configure one route: a default route.
True transparent and transparent inspection operation modes require that you specify
the gateway when configuring the operation mode. In that case, you have already
configured a static route. You do not need to repeat this step.
For example, if a web server is directly attached to one physical port on the FortiWeb, but all other destinations,
such as connecting clients, are located on distant networks, such as the Internet, you might need to add only one
route: a default route that indicates the gateway router through which FortiWeb sends traffic towards the Internet.
If your management computer is not directly attached to one of the physical ports of
the FortiWeb appliance, you may also require a static route so that your management
computer is able to connect with the web UI and CLI.
When you add a static route through the web UI, the FortiWeb appliance evaluates the route to determine if it
represents a different route compared to any other route already present in the list of static routes. If no route
having the same destination exists in the list of static routes, the FortiWeb appliance adds the static route, using
the next unassigned route index number.
The index number of the route in the list of static routes is not necessarily the same as
its position in the routing table (diagnose network route list).
You can also configure FortiWeb to route traffic to a specific network interface/gateway combination based on a
packets source and destination IP address, instead of the static route configuration. For more information, see
Creating a policy route on page 183.
Destination IP/Mask Type the destination IP address and network mask of packets that will be
subject to this static route, separated by a slash (/).
Gateway Type the IP address of the next-hop router where the FortiWeb forwards
packets subject to this static route. This router must know how to route
packets to the destination IP addresses that you have specified in
Destination IP/Mask, or forward packets to another router with this
information.
For a direct Internet connection, this is the router that forwards traffic
towards the Internet, and could belong to your ISP.
Interface Select the name of the network interface through which the packets subject
to the static route will egress towards the next-hop router.
Making a default route for your FortiWeb is a typical best practice: if there is no other,
more specific static route defined for a packets destination IP address, a default route
will match the packet, and pass it to a gateway router so that any packet can reach its
destination.
If you do not define a default route, and if there is a gap in your routes where no route
matches a packets destination IP address, packets passing through the FortiWeb
towards those IP addresses will, in effect, be null routed. While this can help to ensure
that unintentional traffic cannot leave your FortiWeb and therefore can be a type of
security measure, the result is that you must modify your routes every time that a new
valid destination is added to your network. Otherwise, it will be unreachable. A default
route ensures that this kind of locally-caused destination unreachable problem does
not occur.
4. Click OK.
The FortiWeb appliance should now be reachable to connections with networks indicated by the mask.
5. To verify connectivity, from a host on the routes destination network, attempt to connect to the FortiWeb
appliances web UI via HTTP and/or HTTPS. (At this point in the installation, you have not yet configured a
policy, and therefore, if in reverse proxy mode, cannot test connectivity through the FortiWeb.)
By default, in reverse proxy mode, FortiWebs virtual servers will not forward non-
HTTP/HTTPS traffic to your protected web servers. (Only traffic picked up and
allowed by the HTTP reverse proxy will be forwarded.) You may be able to provide
connectivity by either deploying in a one-arm topology where other protocols bypass
FortiWeb, or by enabling FortiWeb to route other protocols. See also Topology for
reverse proxy mode on page 90 and the config router setting command in
the FortiWeb CLI Reference.
If the connectivity test fails, you can use the CLI commands:
execute ping <destination_ip4>
to determine if a complete route exists from the FortiWeb to the host, and
execute traceroute <destination_ipv4>
to determine the point of connectivity failure.
Also enable PING on the FortiWebs network interface, or configure an IP address on the bridge, then use the
equivalent tracert or traceroute command on the host (depending on its operating system) to test
routability for traffic traveling in the opposite direction: from the host to the FortiWeb.
l If these tests fail, or if you do not want to enable PING, first examine the static route configuration on both the
host and FortiWeb.
You may also need to verify that the physical cabling is reliable and not loose or broken, that there are no IP
address or MAC address conflicts or blacklisting, and otherwise rule out problems at the physical, network, and
transport layer.
l If these tests succeed, a route exists, but you cannot connect using HTTP or HTTPS, an application-layer
problem is preventing connectivity.
Verify that you have enabled HTTPS and/or HTTP on the network interface. Also examine routers and firewalls
between the host and the FortiWeb appliance to verify that they permit HTTP and/or HTTPS connectivity
between them. Finally, you can also use the CLI command:
to verify that the daemons for the web UI and CLI, such as sshd, newcli, and httpsd are running and not
overburdened. For details, see the FortiWeb CLI Reference.
l <route_index> is the index number of the route in the list of static routes
l <gateway_ipv4> is the IP address of the gateway router
l <interface_name> is the name of the network interface through which packets will egress, such as port1
The FortiWeb appliance should now be reachable to connections with networks indicated by the mask.
2. To verify connectivity, from a host on the network applicable to the route, attempt to connect to the FortiWeb
appliances web UI via HTTP and/or HTTPS. (At this point in the installation, you have not yet configured a
policy, and therefore, if in reverse proxy mode, cannot test connectivity through the FortiWeb.)
By default, in reverse proxy mode, FortiWebs virtual servers will not forward non-
HTTP/HTTPS traffic to your protected web servers. (Only traffic picked up and
allowed by the HTTP reverse proxy will be forwarded.) You may be able to provide
connectivity by either deploying in a one-arm topology where other protocols bypass
FortiWeb, or by enabling FortiWeb to route other protocols. See also Topology for
reverse proxy mode on page 90 and the config router setting command in
the FortiWeb CLI Reference.
If the connectivity test fails, you can use the CLI commands:
execute ping
to determine if a complete route exists from the FortiWeb to the host, and
execute traceroute
to determine the point of connectivity failure. For details, see the FortiWeb CLI Reference. Also enable ping
on the FortiWeb (see To configure a network interfaces IPv4 address via the CLI on page 167), then use the
equivalent tracert or traceroute command on the host (depending on its operating system) to test
routability for traffic traveling in the opposite direction: from the host to the FortiWeb.
l If these tests fail, or if you do not want to enable PING, first examine the static route configuration on both the
host and FortiWeb.
To display all routes with their priorities, enter the CLI command:
You may also need to verify that the physical cabling is reliable and not loose or broken, that there are no IP
address or MAC address conflicts or blacklisting, and otherwise rule out problems at the physical, network, and
transport layer.
l If these tests succeed, a route exists, but you cannot connect using HTTP or HTTPS, an application-layer
problem is preventing connectivity.
Verify that you have enabled http and/or http on the network interface (To configure a network interfaces
IPv4 address via the CLI on page 167). Also examine routers and firewalls between the host and the FortiWeb
appliance to verify that they permit HTTP and/or HTTPS connectivity between them. Finally, you can also use
the CLI command:
to verify that the daemons for the web UI and CLI, such as sshd, newcli, and httpsd are running and not
overburdened. For details, see the FortiWeb CLI Reference.
See also
In most cases, you use policy routes when FortiWeb is operating in reverse proxy mode. In this mode, FortiWeb
opens its own HTTP connection to the back-end server (a server pool member) and does not transmit the clients
request to the pool member. Because the pool members reply contains no incoming interface information that
FortiWeb can use to route the reply, you do not specify an incoming interface value to match. Instead, the policy
route specifies a source address (for example, the virtual servers IP address), outgoing interface, and gateway
only. In other operating modes (true transparent inspection, transparent inspection, and offline protection),
specifying an incoming interface in the policy route configures FortiWeb to act as a router.
Incoming Interface Select the interface on which FortiWeb receives packets it applies this
routing policy to.
Source address/mask Enter the source IP address and network mask to match.
(IPv4/IPv6)
When a packet matches the specified address, FortiWeb routes it
according to this policy.
Destination address/mask Enter the destination IP address and network mask to match.
(IPv4/IPv6)
When a packet matches the specified address, FortiWeb routes it
according to this policy.
Outgoing Interface Select the interface through which FortiWeb routes packets that match the
specified IP address information.
Gateway Address Enter the IP address of the next-hop router where FortiWeb forwards
(IPv4/IPv6) packets that match the specified IP address information.
Ensure this router knows how to route packets to the destination IP address
or forwards packets to another router with this information.
A gateway address is not required for the particular routing policies used as
static routes in an one-arm topology, see Notice for using policy route in
an one-arm topology. Please leave this blank for one-arm topology.
Priority Enter a value between 1 and 200 that specifies the priority of the route.
When packets match more than one policy route, FortiWeb directs traffic to
the route with the lowest value.
3. Click OK.
Take the one-arm with reverse proxy mode as an example, a policy route might be set for updating the signature
and virus databases through the Internet. In this example, packets that FortiWeb forwards for reverse proxy mode
within subnet 192.0.2.0/24 might match the policy route first rather than the static route, and so that the packets
might be directed to incorrect path (which result in a failed reverse proxy). Therefore, no matter what the
configurations you have for the policy routes, we strongly suggest an extra policy route being set (for this
example) like
Destination address/mask = 192.0.2.0/24
Outgoing Interface = port3
Priority = 10
Configuration of the particular policy route is a static route for choosing port 3 as the path to forward packets
destined to subnet 192.0.2.0/24. To make sure all the packets are evaluated against the particular policy routes
before other normal policy routes, those particular policy routes must be assigned a higher (or the highest) priority
than other policy routes'. This particular policy route, with a higher (or the highest) priority and no gateway being
specified, essentially reverses the fact that policy routes have higher priority than static routes.
See also
l Adding a gateway
FortiWeb's Static Routes configuration directs outgoing traffic based on packet destination. However, some
environments require you to also use the Policy Route settings to route outgoing traffic based on source IP
address, the incoming interface, or both.
For example, if your FortiWeb receives traffic from more than one gateway, it is possible for request and reply
packets in the same TCP connection to use different gateways (asymmetric routing), which can break the
connection. Policy-based routing can correct this problem by ensuring that replies to clients use the same
interface as the original request.
For example, a FortiWeb has a default static route that forwards traffic for any destination to 1.1.1.254, which is
the gateway for ISP1. However, the appliance also has a virtual server with the address 2.2.2.2 that receives
traffic from the ISP2 gateway, which has an IP address of 2.2.2.254.
A client request destined for the virtual server 2.2.2.2 arrives from the client with the IP address 4.4.4.4. In
reverse proxy mode, FortiWeb opens a connection to the server pool member on behalf of the client. The pool
members reply contains the destination provided by FortiWeb (4.4.4.4) but not the interface associated with the
request. Using the Static Route settings only, FortiWeb routes the reply to gateway 1.1.1.254 for all
destinations, which does not have the correct state information for the TCP connection.
Reply
From: 2.2.2.2
To: 4.4.4.4
Virtual Server
ISP 2
2.2.2.2
2.2.2.254 port2
Request
Client From: 4.4.4.4
To: 2.2.2.2
4.4.4.4
The following Policy Route settings fix this asymmetric routing issue by directing outgoing traffic based on the
source IP. Because all incoming traffic for virtual server 2.2.2.2 arrives on the IP2 gateway 2.2.2.254, you
configure FortiWeb to route all replies from 2.2.2.2 to that gateway. In addition, the configuration directs any
outgoing traffic from the virtual server with an IP address 1.1.1.1 (which receives traffic over the default gateway)
to the default gateway:
config router policy
edit 1
set src 1.1.1.1/24
set gateway 1.1.1.254
set oif port1
next
edit 2
set src 2.2.2.2/24
set gateway 2.2.2.254
set oif port2
next
end
Request
From: 3.3.3.3 Virtual Server
To: 1.1.1.1 1.1.1.1
ISP 1 port1
1.1.1.254
Client Reply
3.3.3.3 From: 1.1.1.1
To: 3.3.3.3
Reply
From: 2.2.2.2
To: 4.4.4.4
ISP 2
2.2.2.254 Virtual Server
Request
Client From: 4.4.4.4 2.2.2.2
4.4.4.4 To: 2.2.2.2 port2
Your Internet service provider (ISP) may supply IP addresses of DNS servers, or you may want to use the IP
addresses of your own DNS servers. You must provide unicast, non-local addresses for your DNS servers. Local
host and broadcast addresses will not be accepted.
Incorrect DNS settings or unreliable DNS connectivity can cause issues with other
features, including FortiGuard services and NTP system time.
To change settings in this part of the web UI, your administrator's account access profile must have Write
permission to items in the Network Configuration category. For details, see Permissions on page 69.
2. In Primary DNS Server, type the IP address of the primary DNS server.
3. In Secondary DNS Server, type the IP address of the secondary DNS server.
4. In Local Domain Name, type the name of the local domain to which the FortiWeb appliance belongs, if any.
This field is optional. It will not appear in the Host: field of HTTP headers for client connections to your
protected web servers.
5. Click Apply.
The appliance will query the DNS servers whenever it needs to resolve a domain name into an IP address,
such as for NTP system time, FortiGuard services, or web servers defined by their domain names (domain
servers).
6. To verify your DNS settings, in the CLI, enter the following commands:
execute traceroute <server_fqdn>
DNS tests may not succeed until you have completed Adding a gateway on page 179.
If the DNS query for the domain name succeeds, you should see results that indicate that the host name
resolved into an IP address, and the route from FortiWeb to that IP address:
traceroute to www.example.com (192.0.43.10), 30 hops max, 60 byte packets
...
If the DNS query fails, you will see an error message such as:
traceroute: unknown host www.example.com
CFG_CLI_INTERNAL_ERR
Verify your DNS server IPs, routing, and that your firewalls or routers do not block or proxy UDP port 53.
where:
<local-domain_str> is the name of the local domain to which the FortiWeb appliance belongs, if any
The local domain name is optional. It will not appear in the Host: field of HTTP headers for connections to
protected web servers.
The appliance will query the DNS servers whenever it needs to resolve a domain name into an IP address,
such as for NTP or web servers defined by their domain names (domain servers).
2. To verify your DNS settings, in the CLI, enter the following commands:
execute traceroute <server_fqdn>
DNS tests may not succeed until you have completed Adding a gateway on page
179.
If the DNS query for the domain name succeeds, you should see results that indicate that the host name
resolved into an IP address, and the route from FortiWeb to that IP address:
traceroute to www.example.com (192.0.43.10), 30 hops max, 60 byte packets
...
If the DNS query fails, you will see an error message such as:
traceroute: unknown host www.example.com
CFG_CLI_INTERNAL_ERR
Verify your DNS server IPs, routing, and that your firewalls or routers do not block or proxy UDP port 53.
See also
Most exploits and virus exposures occur within the first 2months ofaknown vulnerability. Most botnets consist of
thousands of zombie computers whose IP addresses are continuously changing. Everyday, spilled account
credentials are used to launch credential stuffing attacks. To keep your defenses effective against the evolving
threat landscape, Fortinet recommends FortiGuard services. Newvulnerabilities, botnets, and stolen account
credentials are discovered and new signatures are built by Fortinet researchers every day.
Without these updates, your FortiWeb cannot detect the newest threats.
After you have subscribed to FortiGuard services (see Appendix E: How to purchase and renew FortiGuard
licenses), configure your FortiWeb appliance to connect to the Internet so that it can reach the world-wide
FortinetDistribution Network (FDN) in order to:
You must first register the FortiWeb appliance with the Fortinet Technical Support web
site, https://support.fortinet.com/, to receive service from the FDN. The FortiWeb
appliance must also have a valid Fortinet Technical Support contract which includes
service subscriptions, and be able to connect to the FDN. For port numbers required
for license validation and update connections, see Appendix A: Port numbers on page
904.
1. If your FortiWeb appliance must connect to the Internet through an explicit (non-transparent) webproxy,
configure the proxy connection (see Accessing FortiGuard via a web proxy).
The appliance will attempt to validate its license when it boots. If the appliance could not connect because
proxy settings were not configured, or due to any other connectivity issue that you have since resolved, you
can reboot the appliance to re-attempt license validation.
3. In the FortiGuard Information widget, look at the Security Service row, Antivirus Service row, IP
Reputation Service row, and Credential Stuffing Defense Service row.
l Valid At the last attempt, the FortiWeb appliance was able to successfully contact the FDN and validate its
FortiGuard license. Continue with Scheduling automatic signature updates on page 196.
l Expired At the last attempt, the license was either expired or FortiWeb was unable to determine license
status due to network connection errors with the FDN.
Your FortiWeb appliance cannot detect the latest vulnerabilities and compliance
violations unless it is licensed and has network connectivity to download current
definitions from the FortiGuard service.
C:\Users\cschwartz>nslookup update.fortiguard.net
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
Name: fds1.fortinet.com
Addresses: 209.66.81.150
209.66.81.151
208.91.112.66
Aliases: update.fortiguard.net
l On FortiWeb, use execute ping and execute traceroute to verify that connectivity from FortiWeb to
the Internet and FortiGuard is possible. Check the configuration of any NAT or firewall devices that exist
between the FortiWeb appliance and the FDN or FDS server override.
1. If your FortiWeb appliance must connect to the Internet (and therefore FDN) through an explicit (non-
transparent) webproxy, configure the proxy connection (see Accessing FortiGuard via a web proxy).
3. If you want your FortiWeb appliance to connect to a specific FDS other than the default for its time zone,
enable Override default FortiGuard address and enter the IP address and port number of an FDS in the
format <FDS_ipv4>:<port_int>, such as 10.0.0.1:443.
4. Click Apply.
5. Click Update Now.
The FortiWeb appliance tests the connection to the FDN and, if any, the server you specified to override the
default FDN server. Time required varies by the speed of the FortiWeb appliances network connection, and
by the number of timeouts that occur before the connection attempt is successful or the FortiWeb appliance
determines that it cannot connect. If you have enabled logging in:
If the connection test did not succeed due to license issues, you would instead see this log message:
FortiWeb is unauthorized
For more troubleshooting information, enter the following commands:
diagnose debug enable
diagnose debug application fds 8
These commands display cause additional information in your CLI console. For example:
FortiWeb # [update]: Poll timeout.
FortiWeb # *ATTENTION*: license registration status changed to 'VALID',please logout and
re-login
For example, poll (license and update request) timeouts can be caused by incorrectly configured static routes
and DNS settings, links with high packet loss, and other basic connectivity issues. Unless you override the
behavior with a specific FDS address (enable and configure Override default FortiGuard address),
FortiWeb appliances connect to the FDN by connecting to the server nearest to the FortiWeb appliance by its
configured time zone. Timeouts can therefore also be caused by incorrect time zone.
See also
Fortinets FortiGuard Global Security Research Team continuously monitor detections of new and older viruses.
When a specific virus has not been detected for one year, it is considered to be dormant. It is possible that a new
outbreak could revive it, but that is increasingly unlikely as time passes due to replacement of vulnerable
hardware and patching of vulnerable software. Therefore dormant virusess signatures are removed from the
Regular database, but preserved in the Extended signature database.
If your FortiWebs performance is more critical than the risk of these dormant viruses, you can choose to omit
signatures for obsolete viruses by selecting the Regular database on System> Config> FortiGuard.
Selecting the virus database and buffer size on System> Config> FortiGuard
Regular Virus Database Select to use only the signatures of viruses and greyware that have been
detected by FortiGuards networks to be recently spreading in the wild.
Extended Virus Database Select to use all signatures, regardless of whether the viruses or greyware
are currently spreading.
Use FortiSandbox Malware Enable to use FortiSandbox's malware signature database to enhance
Signature Database FortiWeb's virus detection in addition to using the regular virus
database or extended virus database.
Maximum Antivirus Buffer Type the maximum size in kilobytes (KB) of the memory buffer that
Size FortiWeb uses to temporarily undo the compression that a client or web
server has applied to traffic, in order to inspect and/or modify it. See
Configuring temporary decompression for scanning & rewriting on page
651. The maximum acceptable value here is 204800 for the 1000D,
2000D, 3000D, 4000D, and E series. For other platforms, the maximum
acceptable value is 102400.
See also
The FortiWeb appliance connects to the proxy using the HTTP CONNECT method, as described in RFC2616.
Fortinet releases FortiGuard updates according to the best frequency for each technology.
l Antivirus Multiple times per day. Updates are fast to test and low risk, while viruses can spread quickly and the
newest ones are most common.
l IP reputation Once per day (approximately). Some time is required to make certain of an IP addresss
reputation, but waiting too long would increase the probability of blacklisting innocent DHCP/PPPoE clients that re-
use an IP address previously leased by an attacker.
l Attack, data type, suspicious URL, and data leak signatures Once every 1-2 weeks (approximately).
Signatures must be tuned to be flexible enough to match heuristic permutations of attacks without triggering false
positives in similar but innocent HTTP requests/responses. Signatures must then be thoroughly tested to analyze
any performance impacts and mismatches that are an inherent risk in feature-complete regular expression engines.
Many exploits and data leaks also continue to be relevant 2years or more, much longer than most viruses. This
increases the value and makes it worthwhile to optimize, tuning each signature to be both flexible and high-
performance.
l Geography-to-IP mappings Once every month (approximately). These change rarely. FortiWeb can poll for
these updates and automatically apply them through the FortiGuard Distribution Servers; however, you must
manually upload the updates (see Updating data analytics definitions on page 806) if your deployments do not have
an Internet connection.
See also
For example, you might schedule update requests every night at 2AM local time, when traffic volume is light.
1. Verify that the FortiWeb appliance has a valid license and can connect to the FDN, or (ifdestination NAT is
used, for example) the IP address that you are using to override the default IPs for FDN servers. For details,
see To determine your FortiGuard license status on page 190 and To verify FortiGuard update connectivity on
page 192.
The page informs you if you are not registered or if registration has expired. If your registration is active,
continue scheduling updates; otherwise, click Register or Renew.
5. Click Apply.
The FortiWeb appliance next requests an update according to the schedule.
At the scheduled time, FortiWeb starts the update. Under Current update status, the following information
is displayed:
l The name of the update package that is currently downloading, the start time of the download operation, and
the percentage complete.
l A Refresh button, which allows you to update the package download status information.
l If FortiWeb is downloading an anti-virus package, a Stop button.
This option is useful if, for example, the download is slow and you want to stop it and try again later. It can
also be useful if you want to stop the scheduled update and instead update your anti-virus package using a file
you have manually downloaded from the Fortinet Technical Support web site (Uploading signature &
geography-to-IP updates on page 201.)
Results of the update activity appear in Security Service in the FortiGuard Information widget. If you have
enabled logging in:
If the FortiWeb appliance cannot successfully connect, it records a log with a message that varies by the
cause of the error, such as:
FortiWeb is unauthorized .
Once the attack signature update is complete, FortiWeb immediately begins to use them. No reboot is
required.
See also
1. Before manually initiating an update, first verify that the FortiWeb appliance has a valid license and can
connect to the FDN or override server. For details, see To determine your FortiGuard license status on page
190 and To verify FortiGuard update connectivity on page 192.
Your update request has been sent. Your database will be updated in a few minutes. Please check
your update page for the status of the update.
After the update starts, under Current update status, the following information is displayed:
The name of the update package that is currently downloading, the start time of the download operation, and
the percentage complete.
A Refresh button, which allows you to update the package download status information.
This option is useful if, for example, the download is slow and you want to stop it and try again later. It can
also be useful if you want to stop the scheduled update and instead update your anti-virus package using a file
you have manually downloaded from the Fortinet Technical Support web site (Uploading signature &
geography-to-IP updates on page 201.)
Results of the update activity appear in FortiWeb Security Service in the FortiGuard Information widget.
If you have enabled logging in:
If the FortiWeb appliance cannot successfully connect, it will record a log with a message that varies by the
cause of the error, such as:
FortiWeb is unauthorized.
Once the attack signature update is complete, FortiWeb will immediately begin to use them. No reboot is
required.
recently discovered variations of these attacks, and that it knows about the current statuses of all IP addresses on
the public Internet.
After restoring the firmware of the FortiWeb appliance, you should install the most currently available packages
through FortiGuard. Restoring firmware installs the packages that were current at the time the firmware image
file was made: they may no longer be up-to-date.
This does not, however, update geography-to-IP mappings, which still must be
uploaded manually.
1. Download the file from the Fortinet Technical Support web site:
https://support.fortinet.com/
2. Log in to the web UI of the FortiWeb appliance as the admin administrator, or an administrator account
whose access profile contains Read and Write permissions in the Maintenance category.
5. Click the Browse button (its name varies by browser) and select the signatures file, then click OK.
Your browser uploads the file. Time required varies by the size of the file and the speed of your network
connection. Once the attack signature update is complete, FortiWeb will immediately begin to use them. No
reboot is required.
See also
FortiGate appliances can maintain a list of source IPs that it prevents from interacting with the network and
protected systems. You can configure FortiWeb to receive this list of IP addresses at intervals you specify. Then,
you configure an inline protection profile to detect the IP addresses in the list and take an appropriate action.
This feature is available only if the operating mode is reverse proxy or true transparent proxy.
FortiGate IP Address Specify the FortiGate IP address that is used for administrative access.
FortiGate Port Specify the port that the FortiGate uses for administrative access via
HTTPs.
Protocol Specify whether the FortiGate and FortiWeb communicate securely using
HTTPS.
Administrator Name Specify the name of the administrator account that FortiWeb uses to
connect to the FortiGate.
Administrator Password Specify the password for the FortiGate administrator account that
FortiWeb uses.
Schedule Frequency Specify how often FortiWeb checks the FortiGate for an updated list of
banned source IP addresses, in hours. The valid range is 1 to 5.
See also
As the last step in the setup sequence, you must configure at least one policy.
Keep in mind:
l Change policy settings with care. Changes take effect immediately after you click OK.
l When you change any server policy, you should retest it.
l FortiWeb appliances apply policies, rules, and scans in a specific order. This decides each outcome. (See
Sequence of scans on page 35.) Review the logic of your server policies to make sure they deliver the web
protection and features you expect.
This section contains examples to get you started:
1. Create a virtual server on the FortiWeb appliance (ServerObjects> Server> VirtualServer). When used
by a policy, it receives traffic from clients.
2. Define your web server within a Single Server server pool using its IP address or domain name
(ServerObjects> Server> ServerPool). When used by a policy, a server pool defines the IP address of
the web server that FortiWeb forwards accepted client traffic to.
When you use an auto-learning profile, any inline protection profile that you use with it
should have Session Management enabled.
Traffic should now pass through the FortiWeb appliance to your server. If it does not, see Troubleshooting on
page 843. Auto-learning gathers data based upon the characteristics of requests and responses that it
observes.
4. Use the auto-learning report to determine whether auto-learning has observed enough URLs, parameters,
and attacks (AutoLearn> AutoLearnReport; see Auto-learning on page 207).
To be able to scan secure traffic, however, you must also configure FortiWeb to decrypt it, and therefore must
provide it with the servers certificate and private key.
To distribute load among multiple servers, however, instead of specifying a single physical server in the server
pool, you specify a group of servers (serverfarm or server pool).
Similarly, if there is a proxy or load balancer between FortiWeb and your web
servers, you may need to configure your server pool for a single web server (the
proxy or load balancer), not a Server Balance pool.
1. Define multiple web servers by either their IP address or domain name in a Server Balance server pool
(ServerObjects> Server> ServerPool). When used by a policy, it tells the FortiWeb appliance how to
distribute incoming web connections to those destination IP addresses. In the server pool configuration, do
the following:
Traffic should now pass through the FortiWeb appliance and be distributed among your servers. If it does not,
see Troubleshooting on page 843.
Auto-learning
Auto-learning can teach you a great deal about the threats your web assets face. It also helps you to understand
your web applications structures and how end-users use them. Most importantly, though, auto-learning can help
you to quickly tailor FortiWebs configuration to suit your web applications.
For data centers, colocation centers, and complex web applications, auto-learning-
assisted configuration can save significant amounts of time compared to purely
manual configuration. However, auto-learning is also resource-intensive and can
decrease performance while gathering data. For strategies on minimizing the impact
to your network, see Running auto-learning on page 237 and Regular expression
performance tips on page 826.
Auto-learning discovers the URLs and other characteristics of HTTP and/or HTTPS sessions by observing traffic
that is passing to your web servers. To learn about whether the request is legitimate or a potential attack attempt,
it performs the following tasks:
See also
IPv6 support
By default, auto-learning assumes that your web applications use the most common URL structure:
l All parameters follow after a question mark (?). They do not follow a hash (#) or other separator character.
l If there are multiple name-value pairs, each pair is separated by an ampersand (&). They are not separated by a
semi-colon (;) or other separator character.
l All paths before the question mark (?) are static they do not change based upon input, blending the path
with parameters (sometimes called a dynamic URL).
always has that same path. After a person logs in, the pages URL doesnt become:
/app/marco/main
or
/app#deepa
For another example, the URL does not dynamically reflect inventory, such as:
/app/sprockets/widget1024894
Some web applications, however, embed parameters within the path structure of the URL, or use unusual or non-
uniform parameter separator characters. If you do not configure URL replacers for such applications, it
can cause your FortiWeb appliance to gather auto-learning data incorrectly. This can cause the following
symptoms:
Auto-learning would continue to create new URLs as new users are added to OWA. Auto-learning would also
expend extra resources learning about URLs and parameters that are actually the same. Additionally, auto-
learning may not be able to fully learn the application structure, as each user may not request the same URLs.
To solve this, you would create a URL replacer that recognizes the user name within the OWA URL as if it were a
standard, suffixed parameter value so that auto-learning can function properly.
See also
In the web UI, these interpreter plug-ins are called URL replacers.
URL replacers match the URL as it appears in the HTTP header of the clients request (using the regular
expression in URL Path) and interpret it into this standard URL formulation:
Type Custom-Defined
New URL $0
Param Change $1
so then the URL will be understood by auto-learning, and displayed in the report, as:
/application?setting=value
Need a refresher on regular expressions? See Regular expression syntax on page 918,
What are back-references? on page 924, and Cookbook regular expressions on page
926. You can also use the examples in this section, such as Example: URL interpreter
for WordPress on page 216.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Autolearn Configuration category. For details, see Permissions on page 69.
Name Type a unique name that can be referenced by other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
l Predefined Use one of the predefined URL replacers which you select
in Application Type.
l Custom-Defined Define your own URL replacer by configuring URL
Path, New URL, Param Change, and New Param.
Application Type Select one of the predefined URL interpreter plug-ins for well-known
web applications:
l JSP Use the URL replacer designed for Java server pages (JSP) web
applications, where parameters are often separated by semi-colons (;).
l OWA User the URL replacer designed for default URLs in
Microsoft Outlook Web App (OWA), where user name and directory
parameters are often embedded within the URL:
(^/public/)(.*)
(^/exchange/)([^/]+)/*(([^/]+)/(.*))*
The pattern does not require a slash (/). However, it must at least
match URLs that begin with a slash as they appear in the HTTP
header, such as /index.html. Do not include the domain name,
such as www.example.com.
To test the regular expression against sample text, click the >> (test)
icon. This opens the Regular Expression Validator window where
you can fine-tune the expression (see Regular expression syntax on
page 918, What are back-references? on page 924 and Cookbook
regular expressions on page 926)
Note: If this URL replacer will be used sequentially in its set of URL
replacers, instead of being mutually exclusive, this regular expression
should match the URL produced by the previous interpreter, not the
original URL from the request.
Param Change Type either the parameters literal value, such as user1, or a back-
reference (such as$0) defining how the value will be interpreted.
New Param Type either the parameters literal name, such as username, or a
back-reference (such as$2) defining how the parameters name will
be interpreted in the auto-learning report. The maximum length is 255
characters.
6. Click OK.
7. Group the URL replacers in an application policy (see Grouping URL interpreters on page 221).
8. Select the application policy in one or more auto-learning profiles (see Configuring an auto-learning profile on
page 234).
9. Select the auto-learning profiles in server policies (see Configuring a server policy on page 677).
See also
which uses semi-colons as parameter separators (;) in the URL, a behavior typical to JSP applications. You
would create a URL replacer to recognize the JSP applications parameters: the semi-colons.
Type Predefined
The predefined JSP interpreter plug-in will interpret the URL as:
/app/login.jsp?p4=66aaaaa&p1=111&p2=123&p3=5555
See also
When a client sends requests to Microsoft Outlook Web App (OWA), many of its URLs use structures like this:
/exchange/tom/index.html
/exchange/jane.doe/memo.EML
/exchange/qinlu/2012/1.html
These have user name parameters embedded in the URL. In order for auto-learning to recognize the parameters,
you must either:
l Set Type to Predefined and Application Type to OWA. This predefined auto-learning URL interpreter
will match and recognize parameters in all default URLs.
l Create your own custom URL interpreters.
A custom URL replacer for those URLs could look like this:
Example: URL replacer for Microsoft Outlook Web App User name structure #1
URL interpreter
Name OWAusername1
Type Custom-Defined
Param Change $1
Then the URLs would be recognized by auto-learning as if OWA used a more conventional parameter structure
like this:
/exchange/index.html?username1=tom
/exchange/memo.EML?username1=jane.doe
/exchange/2012/1.html?username1=qinlu
Notably, OWA can also include other parameters in the URL, such as a mail folders name. Also, OWA can
include the user name and folder in more than one way. Therefore multiple URL interpreters are required to
match all possible URL structures. In addition to the first URL replacer, you would also configure the following
URL replacers and group them into a single set (an auto-learning application policy) in order to recognize all
possible URLs.
Example: URL replacer for Microsoft Outlook Web App Folder name structure #1
URL interpreter
Name OWAfoldername1
Type Custom-Defined
New URL $0
Results /exchange/?folder1=archive-folders/2011
Example: URL replacer for Microsoft Outlook Web App User name structure #2
URL interpreter
Name OWAusername2
Type Custom-Defined
New URL $0
Param Change $1
Results /exchange/?username2=jane.doe
Example: URL replacer Microsoft Outlook Web App Folder name structure #2
URL interpreter
Name OWAfoldername2
Type Custom-Defined
New URL $0
Results /public/?folder2=imap-share-folders/memos
See also
If the HTTP request URL from a client is a slash-delimited chain of multiple parameters, like either of these:
/wordpress/2012/06/05
/index/province/ontario/city/ottawa/street/moodie
In this URL format, there are 3 parameter values (with or without their names) in the URL:
l param1
l param2
l param3
Because each interpreter can only extract a single parameter, you would create 3 URL interpreters, and group
them into a set where they are used sequentially a chain. Eachinterpreter would use the interpreted
output of the previous one as its input, until all parameters had been extracted, at which point the last
interpreter would output both the last parameter and the final interpreted URL. FortiWeb would then append
parameters back onto the interpreted URL in the standard structure before storing them in the auto-learning data
set.
l the web application includes parameters in the same sequential order, and
l all parameters are always present
If parameter order or existence vary, this URL interpreter will not work.
Requests will not match the URL interpreter set if either param2 or param3
come first, or if any of the parameters are missing. On the opposite end of the
spectrum, if the URL interpreter used regular expression capture groups such as
(.*) to match anything in any order, i.e.:
/index/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/
then the regular expression would be too flexible: auto-learning might mistakenly
match and learn some of param3s possible values for param2, and so on.
Name slash-parameter3
Type Custom-Defined
Param Change $2
Name slash-parameter2
Type Custom-Defined
Param Change $1
Name slash-parameter1
Type Custom-Defined
Param Change $0
Until you add the URL interpreters to a group, FortiWeb doesnt know the sequential order.
These URL interpreters will not function correctly if they are not used in that
order, because each interpreters input is the output from the previous one. So you
must set the priorities correctly when referencing each of those interpreters in the set
of URL interpreters (Grouping URL interpreters on page 221).
Priority 0
Priority 1
Priority 2
Then the URL will be interpreted by auto-learning as if the application used a more conventional and easily
understood URL/parameter structure:
/index?param1=value1¶m2=value2¶m3=value3
See also
l mutually exclusive, where the set contains expressions for all possible URL structures, but only one of the URL
replacers will match a given requests URL
l sequential, where the set contains expressions to interpret multiple parameters in a single given URL; each
interpreters URL input is the URL output of the previous interpreter, and they each parse the URL until all
parameters have been extracted; sequential order of interpreters is determined by the URL interpreters Priority in
the set
1. Before you create an application policy, first create the URL replacers that it will include (see Configuring URL
interpreters on page 209).
4. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. Click OK.
6. Click Create New.
A dialog appears.
7. From Plugin Name, select an existing URL replacer from the drop-down list.
Rule order affects URL replacer matching and behavior. FortiWeb appliances
evaluate URLs for a matching URL replacer starting with the smallest ID number
(greatest priority) rule in the list, and continue towards the largest number in the
list.
8. Click OK.
9. Repeat the previous steps for each URL replacer you want added to the policy.
10. Select the application policy in an auto-learning profile (see Configuring an auto-learning profile on page 234).
11. Select the auto-learning profiles in server policies (see Configuring a server policy on page 677).
See also
l Predefined A regular expression set included with the firmware. These match common data types. Cannot be
modified except via FortiGuard, but can be copied and used as the basis for a custom data type. Can be used by
both auto-learning profiles and input rules.
l Custom A regular expression that you have configured to detect any data patterns that cannot be recognized by
the predefined set. Can be modified. Can be used by input rules, but cannot be used by auto-learning profiles.
See also
Predefined data type patterns cannot be used directly. Instead, they must be grouped before they can be used in
other areas of the configuration. For details, see Grouping predefined data types on page 227.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Server Policy Configuration category. For details, see Permissions on page 69.
Pattern The regular expression used to detect the presence of the data type.
Parameter values must match the regular expression in order for an auto-
learning profile to successfully detect the data type, or for an input rule to
allow the input.
A description of what the data type is. It may include examples of values
Description
that match the regular expression.
Select the blue arrow beside a pattern to expand the entry and display
the individual rules contained in the entry.
l Address Canadian postal codes and United States ZIP code and
ZIP+4 codes.
l Canadian Postal Code Canadian postal codes such as K2H7B8 or
k2h7b8. Does not match hyphenations such as K2H-7B8.
l Canadian Province Name and Abbrev. Modern and older names
and abbreviations of Canadian provinces in English, as well as some
abbreviations in French, such as Quebec, PEI, Sask, and Nunavut. Does
not detect province names in French, such as Qubec.
l Canadian Social Insurance Number Canadian Social Insurance
Numbers (SIN) such as 123-456-789.
l Chinese Postal Code Chinese postal codes such as 610000.
l Country Name and Abbrev. Country names, codes, and
abbreviations as they are known in English, such as CA, Cote dIvoire,
Brazil, Russian Federation, and Brunei.
l Credit Card Number American Express, Carte Blanche, Diners
Club, enRoute, Japan Credit Bureau (JCB), Master Card, Novus, and
Visa credit card numbers.
l Date/Time Dates and times in various formats such as +13:45 for
time zone offsets, 1:01 AM, 1am, 23:01:01, and 01.01.30 AM for times,
and 31.01.2009, 31/01/2009, 01/31/2000, 2009-01-3, 31-01-2009, 1-31-
2009, 01 Jan 2009, 01 JAN 2009, 20-Jan-2009 and February 29, 2009 for
dates.
l Denmark Postal Code Danish postal code (postnumre) such as
DK-1499 and dk-1000. Does not match codes that are not prefixed by
DK-, nor numbers that do not belong to the range of valid codes, such as
123456 or dk 12.
l Email Email addresses such as
[email protected]
l GPA A students grade point average, such as 3.5, based upon the
0.0-to-4.0 point system, where an A is worth 4points and an F is worth
0points. Does not match GPAs weighted on the 5 point scale for honors,
IB, or AP courses, such as 4.1. The exception is 5.5, which it will match.
l GUID A globally unique identifier used to identify partition types in the
hard disks master boot record (MBR), such as BFDB4D31-3E35-4DAB-
AFCA-5E6E5C8F61EA. Partition types are relevant on computers which
boot via EFI, using the MBR, instead of an older-style BIOS.
See also
For example, if you include the Email data type in the data type group, auto-learning profiles that use the data
type group might discover that your web applications use a parameter named username whose value is an
email address.
The predefined data type group, named predefine-data-type-group, cannot be edited or deleted.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Server Policy Configuration category. For details, see Permissions on page 69.
3. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
4. In Type, mark the check box of each predefined data type that you want to include in the set, such as Email
or Canadian Social Insurance Number.
If you know that your networks HTTP sessions do not include a specific data type,
omit it from the data type group to improve performance. The FortiWeb appliance will
not expend resources scanning traffic for that data type.
To examine the regular expressions for each data type, see Predefined data types on page 223.
5. Click OK.
6. To use a data type group, select it when configuring either an auto-learning profile (see Configuring an auto-
learning profile on page 234) or input rule (see Validating parameters (input rules) on page 597).
See also
FortiWeb appliances can compare each request URL with regular expressions that define known administrative
URLs, and log and/or block these requests.
l Predefined Regular expressions included with the firmware. These match common administrative URLs, and
URLs for back-end data such as caches. Cannot be modified except via FortiGuard updates, but can be copied and
used as the basis for a custom definitions of sensitive URLs.
l Custom A regular expression that you have configured to detect any suspicious access attempts by URL that
cannot be recognized by the predefined set. Can be modified.
Both types can be grouped into a set that can be used in auto-learning profiles.
See also
or access to its back-end cache, data files, or Berkeley databases, such as:
/local/notesdata
Normally, requests for these URLs should only originate from a trusted network such as your management
computers, not from the Internet. (Exceptions include hosting providers, whose clients around the globe
configure their own web applications.) Therefore these requests are a good candidate for URL access control
rules.
Many signatures exist for popular web servers and applications such as Apache, nginx IIS, Tomcat, and
Subversion. Known suspicious request URLs can be updated. See Connecting to FortiGuard services on page
190.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Server Policy Configuration category. For details, see Permissions on page 69.
To display the patterns it contains, click the blue arrow next to the
name.
When you click a blue arrow to expand a suspicious URL pattern, this
Pattern column displays the regular expression used to detect the presence of the
suspicious URL in a clients request.
Description When you click a blue arrow to expand a data type, this column displays a
description of the URLs matched by this pattern, such as Apache web
server administrative web UI files or IBM Lotus Domino data.
See also
3. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
4. In URL Expression, enter a regular expression that defines this suspicious URL, such as ^/my_admin_
panel.jsp.
To test the regular expression against sample text, click the >> (test) icon. This opens the Regular
Expression Validator window where you can fine-tune the expression (see Regular expression syntax on
page 918 and Cookbook regular expressions on page 926).
5. Click OK.
6. Group custom suspicious URL patterns (see Grouping custom suspicious request URLs on page 231).
7. Group custom and predefined suspicious URL groups together (see Grouping all suspicious request URLs on
page 232).
8. Select the supergroup when configuring an auto-learning profile (see Configuring an auto-learning profile on
page 234).
See also
1. Before you can create a custom suspicious URL rule, you must first define one or more custom suspicious
URLs (see Configuring custom suspicious request URLs on page 230).
4. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. Click OK.
6. Click Create New to add an entry to the set.
A dialog appears.
7. From Suspicious URL Name, select the name of a custom suspicious URL rule.
8. Click OK.
9. Repeat the previous steps for each custom suspicious URL rule you want added to the policy.
10. Group custom and predefined suspicious URL groups together (see Grouping all suspicious request URLs on
page 232).
11. Select the supergroup when configuring an auto-learning profile (see Configuring an auto-learning profile on
page 234).
See also
1. Before grouping all suspicious URL patterns, you must first group any custom suspicious URL groups that you
want to include. For details, see Grouping custom suspicious request URLs on page 231.
A dialog appears.
4. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. In Server Type, enable one or more of the predefined, web server-specific suspicious URL sets that you want
to detect.
To view detailed descriptions of the types of patterns that each suspicious URL type will detect, see
Predefined suspicious request URLs on page 229.
If you know that your network does not rely on one or more of the listed web server
types, disable scans for suspicious access to their administrative URLs in order to
improve performance.
6. From the Custom Suspicious Policy drop-down list, select a group of custom suspicious URLs, that you
have configured, if any.
7. Click OK.
8. To use a suspicious URL pattern, select it when configuring an auto-learning profile (see Configuring an auto-
learning profile on page 234).
See also
You cannot edit or delete Default Auto Learn Profile, the predefined auto-learning profile. If you do not want to
configure your own auto-learning profile, or are not sure how to, you can use this profile. Alternatively, use it as a
starting point by cloning it and then modifying the clone.
Default Auto Learn Profile assumes that you want to learn about all parameters, and allow web crawlers from
the search engines Google, Yahoo!, Baidu, and MSN/Bing.
Default Auto Learn Profile uses a predefined data type group, a predefined suspicious URL pattern, and other
settings that populate an auto-learning report with a complete data set. It does not use attack signatures that
could cause false positives.
You can also use an auto-learning report to generate a new auto-learning profile based
on existing data. For details, see Generating a profile from auto-learning data on page
254.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Autolearn Configuration category. For details, see Permissions on page 69.
Name Type a unique name that can be referenced by other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Data Type Group Select the name of a data type group to use, if any.
Suspicious URL Select the name of a suspicious URL pattern to use, if any.
Server Protection Exception Enter a percentage of detected attacks directed at a specific URL
Threshold relative to the total number of attacks for the entire web site.
FortiWeb still uses the signature to scan URLs that do not receive
attack traffic that exceeds this threshold. For example, if an average
of 50% of all requests to the web site match an attack signature, are
destined for a specific URL, and are actually harmless, you can adjust
this setting to 50.
5. Click OK.
6. In a server policy, select the auto-learning profile with its protection profile in Web Protection Profile and Auto
Learn Profile (see Configuring a server policy on page 677). If you do not want to change all Action settings
to Alert in each of the protection profiles components, also enable Monitor Mode.
7. To ensure that the appliance can learn about HTTP/HTTPS requests usual page order and other session-
related attacks and features, enable the Session Management option in the protection profile.
See also
Running auto-learning
After you have configured and applied auto-learning profiles, you can use them to collect data for an auto-
learning report, and to suggest a configuration.
1. Enable the server policy where you have selected the auto-learning policy for Auto Learn Profile .
2. Route traffic to or through the FortiWeb appliance, depending on your operation mode.
Time required varies by the rate of legitimate hits for each URL, the parameters that are included with each
hit, and the percentage of hits that are attack attempts detected by attack signatures. You can gauge traffic
volumes and hits using the Policy Summary widget (see Real Time Monitor widget on page 743).
For faster results, from an external IP, connect to the web site and access all
URLs that a legitimate client would. Provide valid parameters. This activity
populates auto-learning data with an initial, realistic set.
You can pause auto-learnings data gathering if necessary (see Pausing auto-learning for a URL on page
238).
4. Gauge progress by periodically reviewing the auto-learning report, which FortiWeb keeps up-to-date during
auto-learning (see Viewing auto-learning reports on page 238 and Generating a profile from auto-learning
data on page 254). If parameters are missing, auto-learning is not complete.
In those cases, you must manually configure FortiWeb protection settings for the
URL, rather than discovering recommended protection settings via auto-learning.
However, you may be able to re-use the settings recommended for other, shorter
URLs by auto-learning.
5. If there is an unusual number of attacks, there are false positives, or if some auto-learning data is incorrect,
you can do one of the following:
l fine-tune the auto-learning profile, delete the old auto-learning data, then return to the previous step (see
Removing old auto-learning data on page 258)
l fine-tune the parameters in the auto-learning report before generating protection profiles (see Overview tab on
page 243, Attacks tab on page 245, Visits tab on page 247, and Parameters tab on page 252)
l after the next step, adjust settings in the generated protection profiles
6. Continue with Generating a profile from auto-learning data on page 254.
l reduced performance
l a tree that contains many URLs that are actually forms of the same URL
l auto-learning data that is split among each observed permutation of the dynamic URL
To solve these problems, stop auto-learning for those URLs (right-click them in the auto-learning report and
select Stop Learning), then configure a URL replacer. For details, see How to adapt auto-learning to dynamic
URLs & unusualparameters on page 207.
If you decide later that the URLs were not, in fact, dynamic, you can resume auto-learning: right-click the URL in
the auto-learning report, then select Start Learning. Otherwise, for dynamic URLs, you can delete split auto-
learning data (see Removing old auto-learning data on page 258).
See also
Primarily, you use auto-learning reports to determine whether or not the auto-learning feature has collected
sufficient data to end the auto-learning phase of your installation, and transition to purely applying your security
policies (see Generating a profile from auto-learning data on page 254).
Sometimes, such as when you change the web applications that are installed on
your web servers, you may want to run additional phases of auto-learning.
To create a fresh auto-learning report, new protection profiles, or both, you can
reset the auto-learning report and delete its data. For details, see Removing old
auto-learning data on page 258.
Reports from auto-learning profile data can also provide information about your web servers traffic.
Whitelisted items are not be included in auto-learning reports. See Configuring the
global objectwhitelist on page 655.
Alternatively, for information on normal network traffic, you can use the data analytics
feature. See Viewing web site statistics on page 807.
To view auto-learning reports, the Adobe Flash Player browser plug-in is required.
1. Go to AutoLearn> AutoLearnReport.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Autolearn Configuration category. For details, see Permissions on page 69.
2. Mark the check box for the report you want to see.
3. Click View.
The report appears, with two panes:
l The left-hand pane enables you to navigate through the web sites and URLs that are the subjects of the report.
l The right-hand pane includes tabs that display the report data.
If a report contains multiple pages of results, click the arrows at the bottom of the page to move forward or
backwards through the pages of results.
See also
If URL rewriting is configured, the trees URL is the one requested by the client, not
the one to which it was rewritten before passing on.
If the tree contains many URLs that are actually forms of the same URL, or includes
sessions IDs, such as:
/app/login.asp;jsessionid=xxx;p1=111;p2=123?p3=5555&p4=66aaaaa
the web application may use dynamic URLs or unusual parameter separators, and
require a URL interpreter for auto-learning to function normally. For details, see Auto-
learning on page 207
You can change the display and content of data using the context menu. To do so, right-click the name of an item
in the navigation tree, then select a pop-up menu option:
Refresh the Tree Select to update the display in the navigation pane. If hosts or URLs have
been discovered since you last loaded the auto-learning report web page,
this will update the tree to reflect those new discoveries.
Select to show or hide HTTP sessions in the report by their HTTP request
Filter the Tree method and/or other attributes. A pop-up dialog appears. See Filtering an
auto-learning report.
Expand Current Node Select to expand the item and all of its subitems.
This option has no effect when right-clicking the name of the auto-
learning profile.
Select this option if you have determined that the item is a dynamic
URL. For details, see Pausing auto-learning for a URL on page 238.
Stop Learning
If you have erroneously categorized the URL as dynamic, to resume
learning, right-click the URL again and select Start Learning.
Clean Data Select to remove auto-learnings statistical data for this item. This
may be useful if either:
l You want to clear the data set to begin fresh for a new phase of auto-
learning.
l You know that the inputs required by a specific URL have changed since
you initially began learning about a web sites parameters. This could
happen when you upgrade a web application.
l The item was an instance of a dynamic URL, and you did not apply a
matching URL interpreter, and therefore the data was corrupted.
See Removing old auto-learning data on page 258.
Depending on its level in the navigation tree, an item may be either a server policy observing multiple hosts, a
single host, a common part of a path contained in multiple URLs, or a single requested file. Depending on the
part of the navigation tree that you select, the auto-learning report displays:
For example, to include only statistics for parts of the URL tree pertaining to HTTP POST requests to Java server
pages (JSP files), you would enter .jsp in the Search field under URL and enable POST under HTTP Method,
disabling in order to filter out all other HTTP methods.
See also
The report display pane contains several feature buttons above the report.
Setting
Description
name
Refresh Click to update the report display to reflect statistics, if any, that have been gathered since
you loaded the auto-learning report web page.
Generate Click to generate a web protection profile from the auto-learning profile. For instructions, see
Config Generating a profile from auto-learning data on page 254.
Generate Click to download a PDF copy of the report. A pop-up dialog appears. Type a file name for the
PDF PDF, then click OK.
Overview tab
The Overview tab provides a statistical summary for all sessions established with the host during the use of the
auto-learning profile, or since its auto-learning data was last cleared, whichever is shorter. The contents and
buttons of the Overview tab change depending on the level in the navigation tree.
Edit Protected Servers Click to open a dialog where you can select or deselect IP addresses
and/or domain names that will be members of the protected host
names group for the generated profile.
This button appears only when you select the policy in the navigation
pane.
Click to open a dialog where you can specify that the currently
selected URL will be allowed, and whether it will be regarded as a
start page for the generated profile. You can also select which action
to take if there is a rule violation:
l Alert & Deny Block the request (reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
Edit URL Page authentication pages (replacement messages) on page 720.
Attacks tab
The Attacks tab provides statistics in both tabular and graphical format on HTTP sessions that contained one of
the types of attacks that the web protection profile was configured to detect.
Sometimes, auto-learning reports may contain fewer attacks than you see in the
FortiWeb appliances attack logs. For details, see About the attack count on page 247.
Depending on the level of the item selected in the navigation pane, the Action and Enable columns may
appear. Using these settings, you can override the FortiWebs statistically suggested attack protection settings.
To display a pop-up list of an attack types protection profile settings estimated from current auto-learning data,
click the Detail icon. The dialog that appears may vary by the attack type. You can use it to manually override the
estimated settings.
l On Manually override the suggestion. In step 3, select which attack prevention signatures to enable. (Non-
selected signatures will be disabled.)
l Off Manually override the suggestion, and disable all attack prevention signatures for this type.
If the URL is not susceptible to a specific type of attack, select Off to improve
performance.
3. In the row for each attack type where you have set the drop-down list to Custom, click the Detail icon.
A dialog appears which lists the individual attack signatures for that attack category.
4. For each signature that you want to manually enable, mark its Status check box.
You must mark the Status check box of every signature that you want to enable.
Failure to select any signatures will effectively disable attack prevention, even though
you have selected On from the Enable drop-down lists for the attack category.
5. Click OK.
6. From each drop-down list in the Action column, select one of the following options:
l Alert Accept the request and generate an alert email and/or log message.
l Alert & Deny Block the request (or reset the connection) and generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client with the HTTP status code. See
Customizing error and authentication pages (replacement messages) on page 720.
l Send HTTP Response Block and reply to the client with an HTTP error message and generate an alert
email and/or log message.
You can customize the attack block page and HTTP error code that FortiWeb returns to the client. See
Customizing error and authentication pages (replacement messages) on page 720..
l Redirect Redirect the request to the URL that you specify in the protection profile and generate an alert
email and/or log message. Also configure Redirect URL and Redirect URL With Reason.
l Period Block Block subsequent requests from the client for a number of seconds. Also configure Block
Period. See also Monitoring currently blocked IPs on page 814.
You can customize the web page that FortiWeb returns to the client with the HTTP status code. See
Customizing error and authentication pages (replacement messages) on page 720.
If FortiWeb is deployed behind a NAT load balancer, when using Period Block, you
must also define an X-header that indicates the original clients IP (see Defining your
proxies, clients, & X-headers on page 386). Failure to do so may cause FortiWeb to
block all connections when it detects a violation of this type.
Sometimes, auto-learning reports may contain fewer attacks than you see in the FortiWeb appliances attack
logs.
In some cases, the count is low because the attack was attempted, but was targeted towards a URL that did not
actually exist on the server (that is, it resulted in an HTTP 404 File Not Found reply code). Because the
URL did not exist, the auto-learning report does not include it in its tree of requested URLs. In other words, the
attack was not counted in the report because it did not result in an actual page hit.
Visits tab
l When a policy is selected in the navigation tree, bar chart information about the most and least-used URLs
l When a host is selected, tabular information on HTTP return codes in the 400 and 500 series
l When the policy or a host is selected, tabular information on the rate of file requests (hits) by IP address and
content type
Buttons above the tables and charts allow you to edit the profile that auto-learning generates from the Visits tab
statistics.
Edit Allow Method Allows you to specify whether an HTTP request method is
allowed in the generated profile using one of the following
values:
Edit URL Access Click this button to open a dialog where you can select which
pages will be included in a URL access rule whose Action is
(In the Most hit URL table
Pass (i.e. allow the request and do not generate an attack log
and chart section)
message). To include the URL, click and drag it from the column
named Available on the right into the column on the left,
named URL Access rules with action 'Pass'.
This button appears only when you select the policy in the
navigation pane.
Click this button to open a dialog where you can select which
pages will be included in a URL access rule whose Action is
Pass (i.e. allow the request and do not generate an attack log
message). To include the URL, click and drag it from the column
Edit Start Page named Available on the right into the column on the left,
named URL Access rules with action 'Pass'.
This button appears only when you select the policy in the
navigation pane.
Edit URL Access Click this button to open a dialog where you can select which
pages will be included in a URL access rule whose Action is
(In the Least hit URL table
Alert & Deny (i.e. block the request and generate an alert
and chart section)
email and/or attack log message). To include the URL, click and
drag it from the column named Available on the right into the
column on the left, named URL Access rules with action
'Alert & Deny'.
Essentially, auto-learnings assumption in this case is that most
page hits are legitimate, so that URLs that are not frequently hit
possibly could be a back door or other hidden URL, and therefore
should not be accessible.
This button appears only when you select the policy in the
navigation pane.
Click this button to open a dialog where you can select which
pages will be included in a URL access rule whose Action is
Alert & Deny (i.e. block the request and generate an alert
email and/or attack log message). To include the URL, click and
drag it from the column named Available on the right into the
Edit URL Access column on the left, named URL Access rules with action
'Alert & Deny'.
(In the Suspicious URL
table and chart section) Essentially, auto-learnings assumption in this case is that
administrative URLs should not be accessible to the general
public on the Internet, so that requests for these URLs could be
a potential attack or scouting attempt, and should be blocked.
This button appears only when you select the policy in the
navigation pane.
Edit Content Type Allows you to specify which content types FortiWeb includes in
any Advanced Protection custom rule it generates using Most
(In the Most hit IP table
hit IP table data.
section)
By default, the following content types are selected:
l application/soap+xml
l application/xml(or)text/xml
l text/html
l text/plain
l application/json
The custom rule FortiWeb generates is designed to detect and
prevent web scraping (content scraping) activity.
For more information, see Most hit IP table and web scraping
detection on page 251.
The Most hit IP table displays the data that FortiWeb uses to automatically generate Advanced Protection
custom rules that target web scraping (also called content scraping, web harvesting, or web data extraction). Web
scraping is an automated process for collecting information from the web. In many cases, web scraping is
performed with the intention of re-using the content without authorization.
For efficiency, web scrapers scan web sites quickly, which generates a file request rate that is noticeably higher
than non-automated traffic. However, web scrapers also target dynamic web site content, represented by content
types such as XML, soap/XML, JSON, and text/plain, rather than static content like graphics files.
Therefore, for its web scraping custom rule data, FortiWeb collects statistics for both the rate of requests for files
(hit rate) and the type of content requested. By creating a rule that accounts for the content type, FortiWeb can
provide targeted protection against web scraping in addition to its DoS prevention features, which focus on rate
alone.
l The IP addresses that had the highest rate of requests for files (hit rate) during the auto-learning period
l Statistics on the types of content that clients requested
To determine the most-hit IP addresses, the auto-learning feature divides the auto-learning period into five-
minute observation periods. It records the total number of hits that individual IP addresses receive during each
five-minute period. The Visits tab displays information about the ten observation periods that had the highest
number of hits, including the source IP address and details about the content types of files.
When you generate a profile using the auto-learning report, FortiWeb generates an Advanced Protection custom
rule for each selected row in the Most hit IP table. (The first row is selected by default.) FortiWeb converts the
data in the row to a baseline maximum hit rate for a specific IP address and content type. When web scraping
activity generates a higher hit rate, it triggers the rule action.
l application/soap+xml
l application/xml(or)text/xml
l text/html
l text/plain
l application/json
Use Edit Content Type to customize the values that FortiWeb uses in the filter.
l Occurrence Matches requests for files that match the Content Type filter and exceed a threshold that
FortiWeb calculates using the values found in the Most hit IP table item.
For example, Most hit IP table contains an item with the following values. The values represent hit statistics
during an observation period that was among the top ten:
unrecognized content-
10 18.52%
type
Total 54 100%
This item generates an Advanced Protection custom rule with a Content Type filter that matches text/html
content (one of the default types) and an Occurrence filter with the following values:
Occurrence 44 The number of times clients requested this type of file from
the source IP during this top-ten observation period.
If the Most hit IP table has statistics for more than one of
the selected content types, the value is the total count for
all the content types.
Enable Selected Specifies that the filter matches when the number of hits of the
Percentage specified content types, expressed as a percentage of the total
Matching number of hits, exceeds the value of Percentage of Hits.
Traced By Source IP Most hit IP table data is based on hits by source IP, although
you can create an Occurrence filter based on User.
For more information about Advanced Protection custom rules, see Combination access control & rate limiting on
page 460.
Parameters tab
The Parameters tab provides tabular statistics on the parameters and their values as they appeared in HTTP
requests, as well as any parameters that were extracted from the URL by a URL interpreter.
This tab appears only for items that are leaf nodes in the navigation tree; that is, they represent a single
complete URL as it appeared in a real HTTP request, and therefore could have had those exact associated
parameters.
The Name column contains the name of the parameter, exactly as it was observed in the parameter or (for
parameters extracted by URL replacers) within the URL.
If the Name column contains part of a URL or the parameters value instead of its
name, verify the regular expression and back references used in your URL replacer.
Percentages in the Type Match and Required columns indicate how likely the parameter with that name is of
that exact data type, and whether or not the web application requires that input for that URL. The Min. Length
and Max. Length columns indicate the likely valid range of length for that inputs value. The Avg. Length
column indicates the average length for that inputs value. Together, the columns provide information on what is
likely the correct configuration of a profile for that URL.
For example, if Max. Length is 255 but Min. Length is 63 and Avg. Length is 64, before generating a
protection profile, you may want to investigate to determine whether 255 is indeed an appropriate maximum
input length, since it deviates so much from the norm. In this case, the intended minimum and maximum length
might really be 63, but a single malicious observed input had a maximum length of 255.
By default, when you generate a protection profile from auto-learning data, FortiWeb will use these statistics to
estimate appropriate input rules. However, if auto-learning suggestions are not appropriate, you can manually
override these estimates by using the Set icon and Custom check box before generating a protection profile. For
details, see Auto-learning on page 207.
Cookies tab
The Cookies tab provides tabular statistics on the name, value, expiry date, and associated URL (path) of each
cookie crumb that appeared in HTTP requests.
You can protect cookies that you see in this table using a cookie security policy (see Protecting against cookie
poisoning and other cookie-based attacks on page 482).
This tab appears only for hosts that use cookies, and for items that are leaf nodes in the navigation tree; that is,
they represent a single complete URL as it appeared in a real HTTP request, and therefore could have had
those exact cookies.
See also
In addition to the generated profile itself, the FortiWeb appliance also generates all rules and other auxiliary
configurations that the profile requires.
For example, FortiWeb observes HTTP PUT requests that require a password and a user name that is an email
address. When it generates a profile, it also uses the data types and maximum lengths of the arguments
observed in the HTTP sessions to generate the required parameter validation rules and input rules.
You can edit the generated profiles and auxiliary configurations or use them as the starting point for additional
configuration.
1. Go to AutoLearn> AutoLearnReport.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Autolearn Configuration category. For details, see Permissions on page 69.
2. Mark the check box in the row that corresponds to the auto-learning profile whose data you want to view.
3. Click View.
The report appears.
Buttons and drop-down lists in the report display pane may vary. For most URLs, they enable you to adjust the
profile that FortiWeb generates.
Auto-learning suggests an appropriate configuration based upon the traffic that it observed. If a suggestion is
not appropriate, you can manually override it.
Overview tab
Edit Protected Click to open a pop-up dialog. Enable or disable the IP addresses and/or
Servers domain names that will be members of the generated protected host
names group. For details, see Defining your protected/allowed HTTP
Host: header names on page 349.
This appears only if you have selected the name of the auto-learning
profile in the navigation pane.
Edit URL Page Click to open a pop-up dialog. Enable or disable whether the currently
selected URL will be included in start pages and white/black IP list rules in
the generated profile. This appears only if you have selected a URL in the
navigation pane.
For more information on those rule types, see Specifying URLs allowed to
initiate sessions on page 591 and Access control on page 453.
Attacks Tab
Action and Enable Select from the Enable drop-down list to enable or disable detection of
each type of attack, and select from Action which action that the
generated profile will take. The availability of these lists varies with the
level of the item selected in the navigation pane.
For details, see the actions in Configuring a protection profile for inline
topologies on page 658 or Configuring a protection profile for an out-of-
band topology or asynchronous mode of operation on page 669.
Visits Tab
Edit Allow Method Click to open a pop-up dialog. Change the Status option to select which
HTTP request methods to allow in the generated profile. This appears
only if you have selected a profile in the navigation pane.
Edit URL Access Click to open a pop-up dialog. This appears only if you have selected a
profile in the navigation pane.
Edit Start Page Click to open a pop-up dialog. This appears only if you have selected a
profile in the navigation pane.
Edit Exception Click to open a pop-up dialog. This appears only if you have selected a
Method URL in the navigation pane.
Most hit IP table: Click to edit the values that FortiWeb adds to the Content Type filter in an
Edit Content Type automatically generated Advanced Protection custom rule. This rule is
designed to detect web scraping (content scraping) activity.
For more information, see Most hit IP table and web scraping detection
on page 251.
Most hit IP table: Selects the data that FortiWeb uses to create an Occurrence filter in an
row selection Advanced Protection custom rule in the generated profile. This rule is
button designed to detect web scraping activity.
For more information, see Most hit IP table and web scraping detection
on page 251.
Parameters tab
Set Type the data type and maximum length of the parameter, and indicate
whether or not the parameter is required input. These settings will appear
in the generated parameter validation rule and input rules. For details,
see Validating parameters (input rules) on page 597 and Preventing
zero-day attacks on page 597.
Caution: Before you leave the page, mark the Custom check boxes for
rows where you have clicked this icon. Failure to do so will cause
FortiWeb appliance to discard your settings when you leave the page.
Custom Before you click Set or leave the page, enable this option for each row whose
manual settings you want to save.
7. From Profile Type, select which type of web profile you want to generate, either Inline (to generate an inline
protection profile) or Offline (to generate an offline protection profile).
8. Click OK.
The generated profile appears in either:
Adjust configuration items used by the generated profile, such as input rules, when
necessary. Generated configuration items are based on auto-learning data current at
the time that the profile is generated. Data may have changed while you were
reviewing the auto-learning report, and/or after you have generated the
profiles.
If you do not configure any settings, by default, the FortiWeb appliance generates a profile that allows the
HTTP GET method and any other methods whose usage exceeded the threshold, and adds the remaining
methods to an allowed method exception. It also creates start page rules and trusted IP rules for the most
commonly requested URLs, and blacklist IP addresses that commonly requested suspicious URLs. Attack
signatures are disabled or exceptions added according to your configurations in Generating a profile from
auto-learning data and Generating a profile from auto-learning data.
For example, perhaps you will install or update a web application or web server, resulting in new structures and
different vulnerabilities.
However, for most day-today use, auto-learning should be disabled and your protection profiles fully applied.
1. To apply a profile generated by auto-learning, select it in Web Protection Profile in a server policy (see
Configuring a server policy on page 677).
2. If, during auto-learning, any Action in the protection profile or its auxiliary components was set to Alert &
Deny or Alert & Erase, verify that those same actions are applied in the protection profile that you
generated from auto-learning data. (Incomplete session data due to those actions may have caused auto-
learning to be unable to detect those attack types.)
3. If necessary, either:
l Manually adjust the generated profile and its components to suit your security policy. For more serious
violations, instead of setting Action to Alert, use a blocking or redirecting option such as Alert & Deny.
l Run a second auto-learning phase to refine your configuration: select the newly generated protection profile in
Web Protection Profile, clear the previous phases auto-learning data (see Removing old auto-learning data),
then revisit Running auto-learning.
4. Modify the policy to select your newly generated profile in Web Protection Profile.
5. To validate the configuration, test it (see Testing your installation on page 265.)
6. When you are done collecting auto-learning data and generating your configuration, to improve performance,
disable auto-learning by deselecting the auto-learning profile in Auto Learn Profile in all server
policies.
See also
Alternatively, you can remove auto-learning data by, when the auto-learning profiles
report is open, right-clicking the node in the left-hand pane, then selecting Clean Data
1. Go to AutoLearn> AutoLearnReport.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Autolearn Configuration category. For details, see Permissions on page 69.
2. Either:
l To select one or more reports, mark the check box next to them.
l To select all reports, mark the check box in the check box columns heading.
3. Click Clean Data.
See also
You can use XML-format reports from third-party web vulnerability scanners to automatically generate FortiWeb
protection profiles that contain rules and policies that are appropriate for your environment.
For example, if the scanner report detects an SQL injection vulnerability, FortiWeb can automatically create a
custom access control rule that matches the appropriate URL, parameter, and signature. It adds the generated
rule to either an existing protection profile or a new one.
You can generate rules for all vulnerabilities in the report when you import it. Alternatively, you can manually
select which vulnerabilities to create rules for after you import the report.
When you automatically create rules, you can select which ADOMto add the generated rules to.
Depending on the contents of the report, FortiWeb generates rules of the following types:
You can upload a WhiteHat Sentinel scanner report using either a report file you have downloaded manually or
directly import the file from the WhiteHat portal using the RESTful API. Importing a scanner file from the
WhiteHat portal requires the API key and application name that WhiteHat provides.
4. To view the application name, navigate to the Assets tab. The application name is the NAME value. For
example:
3. The API key will be gave in the Response Body if the username and password are authorized.
Scanner Type Select the type of scanner report you want to import.
API Key If Scanner Type is WhiteHat and Method is REST API, enter the
API Key that WhiteHat provides. See WhiteHat Sentinel scanner
report requirements on page 260.
Application Name If Scanner Type is WhiteHat and Method is REST API, enter the
application name that WhiteHat provides. See WhiteHat Sentinel scanner
report requirements on page 260.
Upload File Allows you to navigate to and select a scanner report file to upload.
Currently, you can upload XML-format files only.
Generate FortiWeb Rules Specifies whether FortiWeb generates a corresponding rule for each
Automatically reported vulnerability when it imports the scanner report.
ADOM Name Select the ADOMthat FortiWeb adds the generated rules to.
Profile Type Specifies whether FortiWeb adds the generated rules to an inline or offline
protection profile.
Merge the Report to Specifies whether FortiWeb adds the generated rules to an existing
Existing Rule protection profile or creates a new profile for them.
Rule Name Specifies the name of the protection profile to add the generated rules to or
the name of a new protection profile.
Action Specifies the action that FortiWeb takes when it detects a vulnerability.
You can specify different actions for high-, medium-, and low-level
vulnerabilities.
Alert Accept the request and generate an alert email and/or log
message.
Deny Block the request (or reset the connection) and generate an alert
email and/or log message.
4. Click OK.
FortiWeb uploads the file and adds the report contents to the list of imported reports.
5. If you did not generate rules for all the vulnerabilities, you can create rules for individual vulnerabilities. Select one
or more of them, click Mitigate, and then complete the settings in the dialog box.
6. Use the link in the Profile Name column to view the protection profile that contains a generated rule or policy. The
link in the Rule Name column allows you to view the settings for that item.
7. To remove individual rules but preserve the corresponding vulnerability items in the list, select one or more
vulnerabilities, and then click Cancel.
You can use the Mitigate option to re-create the rule later, if needed.
8. To delete the imported report or an individual vulnerability, select the item to delete, and then click Delete.
FortiWeb prompts you to confirm that you want to delete any rules that are associated with the item. FortiWeb
does not delete the protection profile that contains the rules.
When the configuration is complete, test it by forming connections between legitimate clients and servers at
various points within your network topology.
In offline protection mode and transparent inspection mode, if your web server applies
SSL and you need to support Google Chrome browsers, you must disable Diffie-
Hellman key exchanges on the web server. These sessions cannot be inspected.
Examine the HTTP Throughput Monitor section of the Real Time Monitor widget on System> Status>
Status. If there is no traffic, you have a problem. See Connectivity issues on page 880.
If a connection fails, you can use tools included in the firmware to determine whether the problem is local to the
appliance or elsewhere on the network. See Troubleshooting on page 843. Also revisit troubleshooting
recommendations included with each features instructions.
If you have another FortiWeb appliance, you can use its web vulnerability scanner to
verify that your policies are blocking attacks as you expect. For details, see
Vulnerability scans on page 703.
You may need to refine the configuration (see Expanding the initial configuration).
Once testing is complete, finish your basic setup with either Switching out of offline protection mode on page 269
or Backups on page 270. Your FortiWeb appliance has many additional protection and maintenance features you
can use. For details, see the other chapters in this guide.
Fix false positives that appear in your attack logs so that you can focus on genuine attacks.
l Examine your web protection profile (go to Policy > Web Protection Profile and view the settings in the
applicable offline or inline protection profile). Does it include a signature set that seems to be causing alerts for valid
URLs. If so, disable the signature to reduce false positives.
l If your web protection profile includes a signature set where the Extended Signature Set option is set to Full,
reduce it to Basic to see if that reduces false positives. See Specifying URLs allowed to initiate sessions on page
591.
l If your web protection profile includes HTTP protocol constraints that seem to be causing alerts for legitimate HTTP
requests, create and use exceptions to reduce false positives. See Configuring HTTP protocol constraint exceptions
on page 630.
l Most dialog boxes that accept regular expressions include the >> (test) icon. This opens the Regular Expression
Validator window, where you can fine-tune the expression to eliminate false positives.
l If you use features on the DoS Protection menu to guard against denial-of-service attacks, you could have false
positives if you set the thresholds too low. Every client that accesses a web application generates many sessions as
part of the normal process. Try adjusting some thresholds higher.
l To learn more about the behavior of regular expressions that generate alerts, enable the Retain Packet Payload
options in the logging configuration. Packet payloads provide the actual data that triggered the alert, which may
help you to fine tune your regular expressions to reduce false positives. See Logging on page 749 and Viewing log
messages on page 768.
l Denial of service attacks can tarnish your reputation and jeopardize service income.
l Hacked servers can behave erratically, decreasing uptime.
l Malicious traffic can decrease performance.
l Compromised web servers can be used as a stepping stone for attacks on sensitive database servers.
To verify your configuration, start by running a vulnerability scan. See Vulnerability scans on page 703. You may
also want to schedule a penetration test on a lab environment. Based upon results, you may decide to expand or
harden your FortiWebs initial configuration (see Hardening security on page 818).
l Begin monitoring the third-party cookies FortiWeb observes in traffic to your web servers. When FortiWeb finds
cookies, an icon is displayed on Policy> ServerPolicy> ServerPolicy for each affected server. If cookies are
threats (for example, if they are used for state tracking or database input) consider adding a cookie security policy to
the inline protection profiles for those servers. (See Protecting against cookie poisoning and other cookie-based
attacks on page 482.)
l Add any missing rules and policies to your protection profiles, such as:
l page access rules (see Enforcing page order that follows application logic on page 586)
l start page rules (see Specifying URLs allowed to initiate sessions on page 591)
l brute force login profiles (see Preventing brute force logins on page 506)
l rewriting policies (see Rewriting & redirecting on page 510)
l denial-of-service protection (see DoS prevention on page 487)
Especially if you began in offline protection mode and later transitioned to another operation
mode such as reverse proxy, new features may be available that were not supported in the
previous operation mode.
l Examine the Attack Event History in the Policy Summary widget on System> Status> Status. If you have
zero attacks, but you have reasonable levels of traffic, it may mean the protection profile used by your server policy
is incomplete and not detecting some attack attempts.
l Examine the Attack Log widget on System> Status> Status. If the list includes many identical entries, it likely
indicates false positives. If there are many entries of a different nature, it likely indicates real attacks. If there are no
attack log entries but the Attack Event History shows attacks, it likely means you have not correctly configured
logging. See Configuring logging on page 752.
You can create reports to track trends that may deserve further attention. See Data analytics on page 805,
Vulnerability scans on page 703, and Reports on page 791.
Switch only if you chose offline protection mode for evaluation or transition purposes when you first set up your
FortiWeb appliance, and now want to transition to a full deployment.
Back up your system before changing the operation mode. Changing modes
deletes policies not applicable to the new mode, static routes, and V-zone IP
addresses. You may also need to re-cable your network topology to suit the operation
mode.
2. Disconnect all cables from the physical ports except the cable to your management computer.
3. Reconfigure the network interfaces with the IP addresses and routes that they will need in their new topology.
4. Re-cable your network topology to match the new mode. See Planning the network topology on page 84.
5. Change the operation mode. See Setting the operation mode on page 127.
6. Go to System > Network > Route and select Static Route tab. If your static routes were erased, re-create
them. See Adding a gateway on page 179.
7. Go to System > Network > Interface. If your VLAN configurations were removed, re-create them. If you
chose one of the transparent modes, consider creating a v-zone bridge instead of VLANs. See Configuring a
bridge (V-zone) on page 175.
8. Go to Policy > Web Protection Policy and select Inline Protection Profile tab. Create new inline
protection profiles that reference the rules and policies in each of your previous offline protection profiles. See
Configuring a protection profile for inline topologies on page 658 and How operation mode affects server
policy behavior on page 654.
9. Go to Policy > Server Policy. Edit your existing server policies to reference the new inline protection
profiles instead of the offline protection profiles. See How operation mode affects server policy behavior on
page 654.
10. Watch the monitors on the dashboard to make sure traffic is flowing through your appliance in the new mode.
11. Since there are many possible configuration changes when switching modes, including additional available
protections, dont forget to retest. Prior testing is no longer applicable.
Backups
l troubleshoot a non-functional configuration by comparing it with this functional baseline (via a tool such as diff)
l rapidly restore your installation to a simple yet working point (see Restoring a previous configuration on page 275)
l batch-configure FortiWeb appliances by editing the file in a plain text editor, then uploading the finalized
configuration to multiple appliances (see Restoring a previous configuration on page 275)
After you have a working deployment, back up the configuration again after any changes. This ensures that you
can rapidly restore your configuration exactly to its previous state if a change does not work as planned.
You can configure the appliance to periodically upload a backup to an FTP server. See
To back up the configuration via the web UI to an FTP/SFTP server on page 272.
Your deployments configuration is comprised of a few separate components. To make a complete configuration
backup, you must include the:
There are multiple methods that you can use to create a FortiWeb configuration backup. Use whichever one suits
your needs:
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Maintenance category. For details, see Permissions on page 69.
Your browser downloads the configuration file. The download time varies by the size of the configuration and
the specifications of the appliances hardware as well as the speed of your network connection. It can take
several minutes.
Fortinet strongly recommends that you password-encrypt this backup, and store it in a
secure location. This method includes sensitive data such as your HTTPS certificates
private keys. Unauthorized access to private keys compromises the security of all
HTTPS requests using those certificates.
3. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
FTP Protocol Select whether to connect to the server using FTP or SFTP.
FTP Server Type either the IP address or fully qualified domain name (FQDN) of the
server. The maximum length is 127 characters.
FTP Directory Type the directory path on the server where you want to store the backup
file. The maximum length is 127 characters.
FTP Authentication Enable if the server requires that you provide a user name and password for
authentication, rather than allowing anonymous connections.
FTP User Type the user name that the FortiWeb appliance will use to
authenticate with the server. The maximum length is 127 characters.
FTP Password Type the password corresponding to the user account on the server.
The maximum length is 127 characters.
Encryption Enable to encrypt the backup file using 128-bit AES and a password.
Encryption Password Type the password that will be used to encrypt the backup file.
Days Select the specific days when you want the backup to occur.
Time Select the specific hour and minute of the day when you want the
backup to occur.
5. Click OK.
If you selected an immediate backup, the appliance connects to the server and uploads the backup.
Fortinet strongly recommends that you password-encrypt this backup, and store it in a
secure location. This method includes sensitive data such as your HTTPS certificates
private keys.
1. If necessary, start your TFTP server. (If you do not have one, you can temporarily install and run one such as
tftpd (Windows, Mac OS X, or Linux) on your management computer.)
Because TFTP is not secure, and because it does not support authentication and
could allow anyone to have read and write access, you should only run it on trusted
administrator-only networks, never on computers directly connected to the Internet. If
possible, immediately turn off tftpd off when you are done.
2. Log in to the CLI as the admin administrator using either the local console, the CLI Console widget in the
web UI, or an SSH or Telnet connection.
where:
Variable Description
Note: Domain names are currently not valid input with this command
if you choose the FTP protocol.
[<backup-password_str>] Optional. Type the password that will be used to encrypt the backup
file.
Caution: Do not lose this password. You will need to enter this same
password when restoring the backup file in order for the appliance to
successfully decrypt the file. If you cannot remember the password,
the backup cannot be used.
For example, the following command backs up a FortiWeb-3000Cs configuration file to a file named
FortiWeb-3000C.conf in the current directory on the TFTP server 172.16.1.10, encrypting the backup file
using the salt string P@ssw0rd1:
FortiWeb-3000C # exec backup full-config FortiWeb-3000c.conf tftp 172.16.1.10 P@ssw0rd1
Time required varies by the size of the database and the specifications of the appliances hardware, but could
take several minutes.
If you have downloaded configuration backups, you can upload one to revert the appliances configuration to that
point.
Uploading a configuration file can also be used to configure many features of the
FortiWeb appliance in a single batch: download a configuration file backup, edit the
file in a plain text editor, then upload the finalized configuration.
If you have made a configuration backup to an FTP server (see To back up the
configuration via the web UI to an FTP/SFTP server on page 272), you cannot restore
it here. Instead, restore it by using the executerestore command. See the
FortiWeb CLI Reference.
2. Select Restore.
Available options change to allow for file browsing.
3. Either type the path and file name of the file to restore in the From File field, or click Browse to locate the
file. (It has a .conf file extension.)
4. If the backup was encrypted, enable Decryption, then in Password, provide the password that was used to
encrypt the backup file.
6. To continue using the web UI, if you have not changed the IP address and static routes of the web UI, simply
refresh the web page and log in again.
Otherwise, to access the web UI again, in your web browser, modify the URL t to match the new IP address of
the network interface.
For example, if you configured port1 with the IP address 10.10.10.5, you would browse to:
https://10.10.10.5
If the new IP address is on a different subnet than the previous IP address, and your computer is directly
connected to the FortiWeb appliance, you may also need to modify the IP address and subnet of your
computer to match the FortiWeb appliances new IP address.
7. Upload any auxiliary configuration files such as certificates. (These are only included in the configuration
backup if you used the CLI or FTP/SFTP server backup. Otherwise, you must upload them again manually.)
Administrators
In its factory default configuration, FortiWeb has one administrator account named admin. This administrator
has permissions that grant full access to FortiWebs features.
To prevent accidental changes to the configuration, its best if only network administrators and if possible, only
a single person use the admin account. You can use the admin administrator account to configure more
accounts for other people. Accounts can be made with different scopes of access. If you require such role-based
access control (RBAC) restrictions, or if you simply want to harden security or prevent inadvertent changes to
other administrators areas, you can do so via access profiles. See Configuring access profiles on page 282.
Similarly, you can divide policies and protected host names and assign them to separate administrator accounts.
See Administrative domains (ADOMs) on page 62.
For example, you could create an account for a security auditor who must only be able to view the configuration
and logs, but not change them.
Administrators may be able to access the web UI, the CLI, and use ping/traceroute through the network,
depending on:
A dialog appears.
Note: This is the user name that the administrator must provide when
logging in to the CLI or web UI. If using an external authentication
server such as RADIUS or Active Directory, this name will be passed
to the server via the remote authentication query.
Admin User Group Select a remote authentication query set. See Grouping remote
authentication queries and certificates for administrators on page 284.
Trusted Host #1 Type the source IP address(es) and netmask from which the
administrator is allowed to log in to the FortiWeb appliance. If PING is
enabled, this is also a source IP address to which FortiWeb will
Trusted Host #2
respond when it receives a ping or traceroute signal.
To allow logins only from one computer, enter its IP address and 32-
or 128-bit netmask in all Trusted Host fields:
192.0.2.2/32
2001:0db8:85a3:::8a2e:0370:7334/128
Tip: If you allow login from the Internet, set a longer and more
complex Password, and enable only secure administrative access
protocols (HTTPS and SSH) to minimize the security risk. For
information on administrative access protocols, see Configuring the
network interfaces on page 162. Also restrict trusted hosts to IPs in
your administrators geographical area.
Tip: For improved security, restrict all trusted host addresses to single
IP addresses of computer(s) from which only this administrator will
log in.
Access Profile Select an existing access profile to grant permissions for this
administrator account. For more information on permissions, see
Configuring access profiles on page 282 and Permissions on page 69.
This option does not appear for the admin administrator account,
which by definition always uses the prof_admin access profile.
ATTRIBUTE Fortinet-Access-Profile 6
then set its value to be the name of the access profile that you want to
assign to this account. Finally, in the CLI, enter the command to
enable the override:
config system admin
edit "admin1"
set accprofile-override enable
end
Administrative Domain Select which existing ADOM to assign this administrator account to it,
and to restrict its permissions to that ADOM. For more information on
ADOMs, see Administrative domains (ADOMs) on page 62 and
Permissions on page 69.
5. Click OK.
See also
l Permissions
l Administrative domains (ADOMs)
When an administrator has only read access to a feature, the administrator can access the web UI page for that
feature, and can use the get and show CLI command for that feature, but cannot make changes to the
configuration. There are no Create or Apply buttons, or config CLI commands. Lists display only the View
icon instead of icons for Edit, Delete or other modification commands. Write access is required for modification
of any kind.
In larger companies where multiple administrators divide the share of work, access profiles often reflect the
specific job that each administrator does (role), such as user account creation or log auditing. Access profiles
can limit each administrator account to their assigned role. This is sometimes called role-based access control
(RBAC).
The prof_admin access profile, a special access profile assigned to the admin administrator account and
required by it, does not appear in the list of access profiles. It exists by default and cannot be changed or
deleted, and consists of essentially UNIX root-like permissions.
Even if you assign the prof_admin access profile to other administrators, they will
not have all of the same permissions as the admin account. The admin account has
some special permissions, such as the ability to reset administrator passwords, that
are inherent in that account only. Other accounts should not be considered a complete
substitute.
If you create more administrator accounts, whether to harden security or simply to prevent accidental
modification, create other access profiles with the minimal degrees and areas of access that each role requires.
Then assign each administrator account the appropriate role-based access profile.
For example, for an administrator whose only role is to audit the log messages, you might make an access profile
named auditor that only has Read permissions to the Log&Report area.
3. In Profile Name, type a unique name that can be referenced by other parts of the configuration. Do not use
spaces or special characters. The maximum length is 35 characters.
For each row associated with an area of the configuration, mark either the None, Read Only, or Read-Write
radio buttons to grant that type of permission. For a list of features governed by each access control area, see
Permissions on page 69.
Click the Read Only check box to select or deselect all read categories.
Click the Read-Write check box select or deselect all write categories.
Unlike the other rows, whose scope is an area of the configuration, the Maintenance row does not affect the
configuration. Instead, it indicates whether the administrator can do special system operations such as
changing the firmware.
5. Click OK.
See also
l Administrators
l Permissions
l Administrative domains (ADOMs)
When using LDAP, RADIUS queries or certificates to authenticate FortiWeb administrators, you must group
queries or certificates for administrator accounts into a single set so that it can be used when configuring an
administrator account.
1. Before you can add administrators to a group, you must first define an LDAP/RADIUS query or a PKI user
whose result set includes those administrator accounts. For details, see Configuring LDAP queries on page
298, Configuring RADIUS queries on page 303 and/or To create a PKI user on page 288.
4. In Name, type a name that can be referenced by other parts of the configuration, such as admin-remote-
auth1. Do not use special characters. The maximum length is 35 characters.
5. Click OK.
The Create New button for this item, below its name, will no longer be greyed out, indicating that it has
become available.
7. For User Type, select either the LDAP User, RADIUS User or PKI User query type.
8. From Name, select the name of an existing LDAP/RADIUS query or PKI user. (The contents of the drop-down
list vary by your previous selection in User Type.)
9. Click OK.
10. Repeat the previous steps for each query that you want to use when an account using this query group
attempts to authenticate.
11. To apply the set of queries, select the group name for Admin User Group when you configure an administrator
account (see Administrators on page 277).
If an administrator has forgotten or lost their password, or if you need to change an administrator accounts
password and you do not know its current password, you can reset the password.
If you forget the password of the admin administrator, you can reset the FortiWeb to its default state (including
the default administrator account and password) by restoring the firmware. For instructions, see Restoring
firmware (clean install) on page 901.
3. Mark the check box in the row of the account whose password you want to change.
4. Click Change Password.
A dialog appears.
5. The Old Password field does not appear for other administrator accounts if you are logged in as the admin
administrator. If you logged in using a different account, however, in the Old Password field, type the
current password for the account whose password you are resetting. (The admin account does not have an
old password initially.)
6. In the New Password and Confirm Password fields, type the new password and confirm its spelling.
7. Click OK.
If you change the password for the admin administrator account, the FortiWeb appliance logs you out. To
continue using the web UI, you must log in. The new password takes effect the next time that account logs in.
l If you connect to the Web UI through HTTPS, FortiWeb first verifies the certificate you provided.
l If your certificate is valid, then your access to Web UI will be granted (the username/password login page
will not be displayed).
l If you fail in the certificate authentication, you will be directed to the username/password login page.
l If you connect to the Web UI through HTTP, FortiWeb will only verify your access by the username/password.
However, FortiWeb can also operate with only the certificate-based authentication, as long as the option
(disabled by default) is enabled through Web UI or a CLI command:
l Go to System > Admin > Settings, and have Enable HTTPS Certificate Login checked (see Global web UI &
CLI settings),
l or login to the CLI and perform command as follow:
config system global
set https-cert-login <enable/disable>
end
When the HTTPS Certificate Login (https-cert-login) is enabled, the certificate-based authentication is
the only authentication method that FortiWeb uses to verify the Web UI accesses. The administrator's access to
the Web UI must be in HTTPS and a correct certificate must be provided for the authorization. The original
username/password authentication will be disabled (No username/password login page will be displayed). One
who fails in the certificate authorization fails to login to FortiWeb's Web UI.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Admin Users category. For details, see Permissions on page 69.
l Enable SCEP and in the field to the right of it, type the URL of the applicable Simple Certificate
Enrollment Protocol server. (SCEP allows routers and other intermediary network devices to obtain
certificates.)
To specify a specific CA, type an identifier in the field below the URL.
1. Go to User> PKIUser.
2. You can click Edit to edit the selected PKI user.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Auth Users category. For details, see Permissions on page 69.
Subject Enter the subject of the administrator's certificate, such as "C = US, ST
= Washington, O = yourorganization, CN = yourname".
5. Click OK.
To add the PKI user to an Admin group
1. Go to User> UserGroup> AdminGroup (see Grouping remote authentication queries and certificates
for administrators).
To access this part of the web UI, your administrator's account access profile must have Read and
Writepermission to items in the AuthUsers category. For details, see Permissions on page 69.
2. Click Create New.
A dialog appears.
3. In Name, type a name that can be referenced by other parts of the configuration, such as admin-remote-
auth1. Do not use special characters. The maximum length is 35 characters.
4. Click OK.
The Create New button for this item, below its name, will no longer be greyed out, indicating that it has
become available.
Users
Instead, they are used to add HTTP-based authentication and authorize each request from clients that are
connecting through FortiWeb to your protected web servers.
Best practices dictate that each person accessing your web sites should have his or her own account so that
security audits can reliably associate a login event with a specific person. Accounts should be restricted to URLs
for which they are authorized. Authorization may be derived from a persons role in the organization.
For example, a CFO would reasonably have access to all financial data, but a manufacturing technician usually
should not. Such segregation of duties in financial regulation schemes often translates to role-based access
control (RBAC) in information systems, which you can implement through FortiWebs HTTP authentication and
authorization rules.
For instructions, see Offloading HTTP authentication & authorization on page 294.
User authentication is not supported in all operation modes. See Supported features
in each operation mode on page 88.
See also
l Authentication styles
l Offloading HTTP authentication & authorization
l Example: Enforcing complex passwords
Authentication styles
Multiple different methods exist for end-users to authenticate with web sites. These methods have different
appearances and features.
When a web site requires authentication in order to authorize access to a URL, it replies with an HTTP 401
Authorization Required response. This elicits a prompt from the web browser.
If the user supplies credentials, his or her web browser includes them in a second request for the same page. If
the credentials are valid, the web server returns the requested URL; otherwise, it repeats its 401
Authorization Required response.
This type of authorization is handled at the web server layer of the hosts software stack, independently of the
static HTML, dynamic pages and runtime interpreters (PHP, ColdFusion, Python, etc.), or database (MySQL,
PostgreSQL, etc.) of the web applications it may host, and as a result can span multiple web applications. It also
may be offloaded to a FortiWeb (see Offloading HTTP authentication & authorization on page 294).
Because the HTTP protocol itself is essentially stateless no request is required to have knowledge of or be
related to any other request as a practical matter, many browsers cache this data so that users will not have to
re-enter the same user name and password over and over again, for every page that they visit on the web site.
(For this reason, one-time passwords are generally impractical. They effectively contradict the reusability of the
cache.) However, in payment for this initial convenience, logouts are basically impossible unless the user clears
his or her browsers cache and/or closes the window (which can also clear the cache).
Accounting, if any, of this type of authentication is handled by the web server (or, if you have offloaded
authentication to FortiWeb, it may be accounted for in logs, depending on your configuration of Alert Type).
This method does not rely on the mechanism defined in the HTTP protocol. Instead, when the user submits the
form, the web application uses form inputs to construct server-side sessions, client-side session cookies, or
parameters in the URL such as JSPSESSIONID in order to create statefulness.
This type of authorization occurs at the web application layer of the servers software stack. As a result, when
visiting different web applications on the same host, users may have to authenticate multiple times, unless the
web applications share a single sign-on (SSO) framework.
Authorization for each subsequent requested URL then occurs based upon whether the user is in the logged-in
state, or the logged-out state, and possibly other implemented conditions such as user groups and permissions.
Dynamic page content may change based upon knowledge of the users preferences. In addition to a logout
button, this method also often adds session timeouts. However, depending on the implementation, it often may
only work properly if the client supports and accepts cookies.
Accounting, if any, of this type of authentication is handled by the web application or servlet.
This type of authentication cannot be offloaded to FortiWeb, but can be protected using its features. For
example, you can use FortiWeb to enforce complex passwords by applying an input rule. Depending on your
operation mode (see Supported features in each operation mode on page 88), you might want to see:
l Protecting against cookie poisoning and other cookie-based attacks on page 482
l Blocking known attacks & data leaks on page 538
l Validating parameters (input rules) on page 597
l Preventing tampering with hidden inputs on page 607
l Preventing brute force logins on page 506
l Specifying URLs allowed to initiate sessions on page 591
If used within the content of HTTP, it is not as secure as HTTPS. For stronger
protection, use form-based authentication with HTTPS.
l entering a password is onerous due to password length/complexity policies or the nature of the device (e.g. small
touch screens on iPhone or Android smart phones, or highly secure environments)
l you control the endpoint devices, so it is possible to install personal certificates
If your clients will connect to your web sites using HTTPS, you can configure FortiWeb to require clients to
present a personal certificate during the handshake in order to confirm their identities. This is sometimes called
public key infrastructure (PKI) authentication (RFC 5280).
For details, see How to apply PKI client authentication (personal certificates) on page 425.
If a web site does not support RFC 2617 HTTP authentication on its own, nor does it provide HTML form-based
authentication, you can use a FortiWeb appliance to authenticate HTTP/HTTPS clients before they are permitted
to access a web page.
User authentication is not supported in all operation modes. See Supported features
in each operation mode on page 88.
l locally-defined accounts
l remotely-defined accounts whose credentials are confirmed with the authentication server via LDAP queries,
RADIUS queries, and/or NTLM queries
Based upon the:
FortiWeb then applies rules for that account to determine whether or not to authorize each of the users
HTTP/HTTPS requests.
HTTP-based authentication provided by your FortiWeb can be used in conjunction with a web site that already
has authentication. However, it is usually used as a substitute for a web site that lacks it, or where you have
disabled it in order to offload it to the FortiWeb for performance reasons.
Some compliance schemes, including PCI DSS, require that each person have sole
access to his or her account, and that that account be restricted from sensitive data
such as cardholder information unless it has a business need-to-know. Be aware of
such requirements before you begin. This can impact the number of accounts that you
must create, as well as the number and scope of authorization rules. Violations can be
expensive in terms of higher processing fees, being barred from payment transactions,
and, in case of a security breach, penalties of up to $500,000 per non-compliance.
4. Group authorization rules into an authorization policy. See Grouping authorization rules on page 314.
5. Select the authorization policy in an inline protection profile. See Configuring a protection profile for inline
topologies on page 658
6. Select the inline protection profile in a server policy. See Configuring a server policy on page 677.
1. If the clients initial request does not already include an Authorization: field in its HTTP header, the
FortiWeb appliance replies with an HTTP 401 Authorization Required response. The response
includes a WWW-Authenticate: field in the HTTP header that indicates which style of authentication to
use (basic, digest, or NTLM) and the name of the realm (usually the name, such as Restricted Area, of a set
of URLs that can be accessed using the same set of credentials).
2. The browser then prompts its user to enter a user name and password. (The prompt may include the name of
the realm, in order to indicate to the user which login is valid.) The browser includes the user-entered info in
the Authorization: field of the HTTP header when repeating its request.
Valid user name formats vary by the authentication server. For example:
5. Once the client has authenticated with the FortiWeb appliance, if FortiWeb applies no other restrictions and
the URL is found, it returns the web servers reply to the client.
If the clients browser is configured to do so, it can cache the realm along with the supplied credentials,
automatically re-supplying the user name and password for each request with a matching realm. This
provides convenience to the user; otherwise, the user would have to re-enter a user name and password for
every request.
Advise users to clear their cache and close their browser after an authenticated
session. HTTP itself is stateless, and there is no way to actively log out. HTTP
authentication causes cached credentials, which persist until the cache is cleared
either manually, by the user, or automatically, when closing the browser window or
tab. Failure to clear the cache could allow unauthorized persons with access to the
users computer to access the web site using their credentials.
Clear text HTTP authentication is not secure. All user names and data (and,
depending on the authentication style, passwords) are sent in clear text. If you require
encryption and other security features in addition to authorization, use HTTP
authentication with SSL/TLS (i.e. HTTPS) and disable HTTP. See HTTP Service and
HTTPS Service.
See also
1. Go to User> LocalUser.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the AuthUsers category. For details, see Permissions on page 69.
Note: This is not the user name that the person must provide when
logging in to the CLI or web UI.
User Name Type the user name that the client must provide when logging in, such
as user1.
4. Click OK.
5. To activate the user account, you must indirectly include it in a server policy that governs connections to your
web servers. Continue with Grouping users. (For an overview, see To configure and activate end-user
accounts on page 295.)
See also
l Grouping users
l Configuring LDAP queries
l Configuring RADIUS queries
l Configuring NTLM queries
If you use an LDAP query for administrators, separate it from the queries for regular
users. Do not combine administrator and user queries into a single entry.
Failure to separate queries will allow end-users to have administrative access the
FortiWeb web UI and CLI. If administrators are in the same directory but belong to a
different group than end-users, you can use Group Authentication to exclude end-
users from the administrator LDAP query.
Supported servers may implement the underlying technology and group membership in different ways, such as
with OpenLDAP, Microsoft Active Directory, IBM Lotus Domino, and Novell eDirectory. Match the distinguished
names (DN) and group membership attributes (Group Type) with your LDAP directorys schema.
If this query will be used to authenticate administrators, and your LDAP server is slow to answer, you may need to
adjust the authentication timeout setting to prevent the query from failing. See the FortiWeb CLI Reference. (For
end-user queries, configure Connection Timeout instead.)
1. Before you configure the query, if it will use a secure connection, you must upload the certificate of the CA
that signed the LDAP servers certificate. For details, see Uploading trusted CAs certificates on page 406.
Name Type a unique name that can be referenced in other parts of the
configuration.
Note: This is the name of the query only, not the administrator or
end-users account name/login. Administrator account names are
defined in Administrator.
Server IP/Domain Name Type the IP address or domain name of the LDAP server.
Server Port Type the port number where the LDAP server listens.
Common Name Identifier Type the identifier for the common name (CN) attribute (also called
the CNID) whose value is the user name.
uid=hlee,cn=users,dc=example,dc=com
then the CNID is uid.
Distinguished Name Specifies the Base DN from which the LDAP query starts. This DN is
the full path in the directory to the user account objects.
For example:
ou=People,dc=example,dc=com
or
cn=users,dc=example,dc=com
Bind Type Select one of the following LDAP query binding styles:
User DN Type the bind DN of an LDAP user account with permissions to query
the Distinguished Name.
For example:
cn=FortiWebA,dc=example,dc=com
For Active Directory, the UPN (User Principle Name) is often used
instead of a bind DN (for example, [email protected])
This field can be optional if your LDAP server does not require the
FortiWeb appliance to authenticate when performing queries.
This field may be optional if your LDAP server does not require the
FortiWeb appliance to authenticate when performing queries, and
does not appear if Bind Type is Anonymous or Simple.
Filter Type an LDAP query filter string that filters the querys results based
on any attribute in the record set.
For example:
(&(|(objectClass=user)(objectClass=group)
(objectClass=publicFolder)))
For syntax, see an LDAP query filter reference. If you do not want to
exclude any accounts from the query, leave this setting blank.
Group Authentication Enable to filter the query results, only allowing users to authenticate if
they are members of the LDAP group that you define in Group DN.
Users that are not members of that group will not be allowed to
authenticate. Also configure Group Type and Group DN.
This option appears only when Bind Type is Regular and Group
Authentication is enabled.
Group DN Type the value of the group membership attribute that query results
must have in order to be able to authenticate.
The value may vary by your directorys schema, but may be the
distinguished name such as ou=Groups,dc=example,dc=com or
a group ID (GID) such as 100.
This option appears only when Bind Typeis Regular and Group
Authentication is enabled. The maximum length is 255 characters.
Secure Connection Enable to connect to the LDAP servers using an encrypted connection, then
select the style of the encryption in Protocol.
l LDAPS
l STARTTLS
The option appears only when Secure Connection is enabled.
5. Click OK.
6. If you enabled Secure Connection, upload the certificate of the CA that signed the directory servers certificate
(see Uploading trusted CAs certificates on page 406).
7. Return to User> RemoteServer, select the LDAPUser tab, double-click the row of the query, then click
the Test LDAP button to verify that FortiWeb can connect to the server, that the query is correctly configured,
and that (if binding is enabled) the query bind is successful.
In username, type only the value of the CNID attribute, such as hlee, not the entire DN of the
administrators account. In password, type the password for the account.
8. If the query is for administrator accounts that you want to allow to access the FortiWeb webUI, select the
query in a remote authentication query group (see Grouping remote authentication queries and certificates for
administrators on page 284).
If the query is for user accounts that you want to allow to authenticate with web servers, to activate the user
account, you must indirectly include it in a server policy. Continue with Grouping users. (For an overview, see
To configure and activate end-user accounts on page 295.)
If the query is for a site publishing rule that offloads authentication for a web application to FortiWeb, you first
add it to an authorization server pool. See Adding servers to an authentication server pool.
See also
The following sample values are part of an LDP query for a Microsoft Active Directory (AD) domain server.
Common Name sAMAccountName In most cases, you use the Common Name
Identifier Identifier sAMAccountName as the
container. In some cases,
userPrincipalName is used, especially if
there is a domain forest.
Distinguished Name OU=CONTAINER, Specifies the Base DN from which the LDAP
(Base DN) DC=DOMAIN,DC=SUFFIX query starts.
If you use a RADIUS query for administrators, separate it from the queries for regular
users. Do not combine administrator and user queries into a single entry.
Failure to separate queries will allow end-users to have administrative access the
FortiWeb web UI and CLI.
Remote Authentication and Dial-in User Service (RADIUS) servers provide authentication, authorization, and
accounting functions. The FortiWeb authentication feature uses RADIUS user queries to authenticate and
authorize HTTP requests. (The HTTP protocol does not support active logouts, and can only passively log out
users when their connection times out. Therefore FortiWeb does not fully support RADIUS accounting.) RADIUS
authentication with realms (i.e. the person logs in with an account such as [email protected]) are supported.
To authenticate a user or administrator, the FortiWeb appliance sends the users credentials to RADIUS for
authentication. If the RADIUS server replies to the query with a signal of successful authentication, the client is
successfully authenticated with the FortiWeb appliance. If RADIUS authentication fails or the query returns a
negative result, the appliance refuses the connection.
If this query will be used to authenticate administrators, and your RADIUS server is slow to answer, you may need
to adjust the authentication timeout setting to prevent the query from failing. See the FortiWeb CLI Reference.
(For end-user queries, configure Connection Timeout instead.)
1. Before configuring the query, if you will configure a secure connection, you must upload the certificate of the
CA that signed the RADIUS servers certificate. For details, see Uploading trusted CAs certificates on page
406.
Name Type a unique name that can be referenced in other parts of the
configuration.
Note: This is the name of the query only, not the administrator or
end-users account name/login. Administrator account names are
defined in Administrator. End-user names are not defined in the
configuration; credentials provided by the person during login will be
used for the query.
Server Port Type the port number where the RADIUS server listens.
Server Secret Type the RADIUS server secret key for the primary RADIUS server. The
primary server secret key should be a maximum of 16 characters in length.
Secondary Server IP Type the IP address of the secondary RADIUS server, if applicable.
Secondary Server Port Type the port number where the RADIUS server listens.
Secondary Server Secret Type the RADIUS server secret key for the secondary RADIUS server. The
secondary server secret key should be a maximum of 16 characters in
length.
NAS IP Type the NAS IP address and Called Station ID (for more information about
RADIUS Attribute 31, see RFC 2548 Microsoft Vendor-specific RADIUS
Attributes). If you do not enter an IP address, the IP address that the
FortiWeb appliance uses to communicate with the RADIUS server will be
applied.
5. Click OK.
6. Return to User> RemoteServer, select the RADIUSServer tab, double-click the row of the query, then
click the Test RADIUS button to verify that FortiWeb can connect to the server, and that the query is
correctly configured.
7. If the query is for administrator accounts that you want to allow to access the FortiWeb web UI, select the
query in a remote authentication query group (see Grouping remote authentication queries and certificates for
administrators on page 284).
For access profiles, FortiWeb appliances support RFC 2548 Microsoft Vendor-specific
RADIUS Attributes. If you do not want to use them, you can configure them locally
instead. See Configuring access profiles on page 282.
If the query is for user accounts that you want to allow to authenticate with web servers, to activate the user
account, you must indirectly include it in a server policy. Continue with Grouping users. (For an overview, see
To configure and activate end-user accounts on page 295.)
If the query is for a site publishing rule that offloads authentication for a web application to FortiWeb, you first
add it to an authorization server pool. See Adding servers to an authentication server pool.
See also
FortiWeb can use NTLM queries to authenticate and authorize HTTP requests. For more information, see
Applying user groups to an authorization realm on page 311.
3. In Name, type a unique name that can be referenced by other parts of the configuration. This is the name of
the query only, not the end-users account name/login. Do not use spaces or special characters. The
maximum length is 35 characters.
4. For Server IP, type the IP address of the NTLM server to query.
5. For Port, type the TCP port number where the NTLM server listens for queries.
6. Click OK.
7. To activate the user account, you must indirectly include it in a server policy that governs connections to your
web servers. Continue with Grouping users. (For an overview, see To configure and activate end-user
accounts on page 295.)
The pool can contain one or more servers that use either LDAP or RADIUSto authenticate clients. You add LDAP
or RADIUS servers to an authentication server pool using the queries that correspond to the servers (see
Configuring LDAP queries on page 298 and Configuring RADIUS queries on page 303).
FortiWeb attempts to authenticate clients using the server at the top of the list of pool members, and then
continues to the next member down in the list if the authentication is unsuccessful, and so on. You can use the
list options to adjust the position of each item in the list.
2. Click Create New, enter a name for the pool, and then click OK.
3. Click Create New and complete the following settings:
Authentication Validation Select whether this pool member uses LDAP or RADIUS to
Method authenticate clients.
LDAP Server Select the name of the authentication query that FortiWeb uses to pass
credentials to your authentication server.
or
RADIUS Server
RSA SecurID Select to enable client authentication using a username and a RSA
SecurID authentication code only. Users are not required to enter a
password.
4. Click OK.
5. Add any other additional servers you want in the pool.
6. To use the pool, select it when you configure a site publish rule. For more information, see Offloaded
authentication and optional SSO configuration on page 324
Because FortiWeb determines the KDC to use based on the realm of the web application, you do not have to
specify the KDC in the site publish rule.
For more information, see Using Kerberos authentication delegation on page 321 and Offloaded authentication
and optional SSO configuration on page 324.
Name Enter a name that can be referenced by other parts of the configuration.
Delegated Realm Enter the domain of the domain controller (DC) that the Key Distribution
Center (KDC) belongs to. Typically the UPN (User Principle Name) used for
login has the format username@delegated_realm.
Shortname Enter the shortname for the realm you specified (This is optional). A
shortname is an alias of the delegated realm; it can be any set of
characters except for symbols "@", "/" and "\". For example, the shortname
can include the domain name of the realm that is not fully qualified. With a
shortname being configured, the format of UPN can be
username@shortname.
In most cases, the KDC is located on the same server as the DC.
Port Enter the port the KDC uses to listen for requests.
3. Click OK.
Grouping users
To denote which set of people is authorized to request specific URLs when configuring HTTP authentication
offloading, you must create user groups.
A user group can include a mixture of local end-user accounts, LDAP queries, RADIUS queries, and NTLM
queries. Therefore, on FortiWeb, a user group could be set of accounts, or it could be a set of queries instead.
1. Before you can configure a user group, you must first configure one or more local end-user accounts or
queries to remote authentication servers. See:
4. In Name, type a name that can be referenced by other parts of the configuration. Do not use special
characters. The maximum length is 35 characters.
8. In User Type, select the type of user or user query you want to add to the group. Available options vary with
the setting for the groups Auth Type option.
You can mix user types in the group. However, if the authentication rules Auth Type does not support a
given user type, all user accounts of that type will be ignored, effectively disabling them.
9. From User Name, select the name of an existing user account, LDAP query, or RADIUS query. Available
options vary by your selection in User Type.
See also
Alternatively, you can configure site publishing, which has the additional advantage of
optionally providing SSO for multiple web applications. See Single sign-on (SSO) (site
publishing) on page 317.
1. Before you can configure an authentication rule set, you must first configure any user groups that you want to
include. For details, see Grouping users on page 309.
If you want to apply rules only to HTTP requests for a specific real or virtual host, you must first define the web
host in a protected host names group. For details, see Defining your protected/allowed HTTP Host: header
names on page 349.
4. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. If you want to require that the Host: field of the HTTP request matches a protected host entry in order to
match the HTTP authentication rule, do the following:
User Group Select the name of an existing end-user group that is authorized to use the
URL in Auth Path.
User Realm Type the realm, such as Restricted Area, to which the Auth Path
belongs.
This field does not appear if Auth Type is NTLM, which does not
support HTTP-style realms.
9. Click OK.
10. Repeat the previous steps for each user that you want to add to the authentication rules.
11. Group the authentication rule in an authentication policy. For details, see Grouping authorization rules on
page 314.
Authentication policies also contain settings such as connection and cache timeouts that FortiWeb applies to all
requests authenticated using this authentication policy.
1. Before you can configure an authentication policy, you must first configure:
l end-users (see Configuring local end-user accounts on page 297, Configuring LDAP queries on page 298, or
Configuring NTLM queries on page 306)
l user groups (see Grouping users on page 309)
l one or more authorization rules to select the authorization mechanism, select the user group, and the set of
URLs that is the authorization realm (see Applying user groups to an authorization realm on page 311)
2. Go to ApplicationDelivery> Authentication and select the AuthenticationPolicy tab.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
Name Type a unique name that can be referenced in other parts of the
configuration.
Connection Timeout Type the connection timeout for the query to the FortiWebs query to
the remote authentication server in milliseconds.
Cache Timeout Type the number of seconds that authentication query results will be
cached.
6. Click OK.
7. Click Create New.
A dialog appears.
8. From the Auth Rule drop-down list, select the name of an authentication rule.
9. Click OK.
10. Repeat the previous steps for each individual rule that you want to add to the authentication policy.
11. To apply the authentication policy, select it in an inline protection profile that is included in a policy (see
Configuring a protection profile for inline topologies on page 658).
If you have enabled logging, you can also make reports such as Top Failed
Authentication Events By Day and Top Authentication Events By User to identify
hijacked accounts or slow brute force attacks. See Reports on page 791.
See also
If:
l your users will be accessing multiple web applications on your domain, and
l you have defined accounts centrally on an LDAP server (such as Microsoft Active Directory) or a RADIUS server.
you may want to configure single sign-on (SSO) and combination access control and authentication (called site
publishing in the web UI) instead of configuring simple HTTP authentication rules. Unlike HTTP authentication
rules, SSO does not require your users to authenticate each time they access separate web applications in your
domain.
For example, if you configure HTML form authentication, when FortiWeb receives the first request, it returns an
HTML authentication form.
FortiWeb forwards the clients credentials in a query to the authentication server. Once the client is successfully
authenticated, if you have configured FortiWeb to delegate, FortiWeb forwards the credentials to the web
application. The servers response is returned to the client. Until the session expires, subsequent requests from
the client to the same or other web applications in the same domain do not require the client to authenticate
again.
You can use the SSO feature to replace your discontinued Microsoft Threat Management Gateway. With SSO
enabled, you can use FortiWeb as a portal for multiple applications such as SharePoint, Outlook Web
Application, Lync, and/or IIS. Users log in once to use any or all of those resources.
When you configure SSO, FortiWeb uses the authentication method for the first
site publish rule that matches. Therefore, you cannot specify different
authentication methods for individual web applications in the same SSO domain.
For example, you can create a site publish rule that allows users to access
Outlook Web App (OWA) via HTML Form Authentication and a rule that allows
them to access Exchange via HTTP Basic Authentication. However, to ensure
FortiWeb controls access to each application with the correct authentication
method, do not enable SSO for the rules.
If you do not want to apply SSO, but still want to publish multiple sites through the
same server policy, apply the same steps, except do not enable SSO.
See also
l Two-factor authentication
l RSA SecurID authentication
l Using Kerberos authentication delegation
l Offloaded authentication and optional SSO configuration
Two-factor authentication
By default, FortiWeb supports RADIUS authentication that requires users to provide a secondary password, PIN,
or token code in addition to a username and password (two-factor authentication).
When the RADIUS server does not require two-factor authentication, form-based authentication via a RADIUS
query is complete after the user enters a valid username and password (see FortiWebs HTTP authentication
form).
If the RADIUS server requires two-factor authentication, after users enter a valid username and password,
RADIUS returns an Access-Challenge response. FortiWeb displays a second authentication form that allows
users to enter a token code (for example, an RSA SecurID token code).
Alternatively, FortiWeb allows users to authenticate without using the second form by entering both their
password and token code in the password field of the initial form. The RADIUS server extracts the token code
automatically. The combined entry uses the following format:
<password><token_code>
For example, if the password is fortinet and the code is 123456, the user enters fortinet123456 in
the Password field.
Note: When users enter the password and token code together, any delegation configuration in the site publish
rule does not work. Delegation requires a password, and the AD server cannot obtain the password from the
combined value.
See also
Alternatively, you can enable the Offloaded authentication and optional SSO configuration option in the
site publish rule, which allows users to authenticate using their username and RSA SecurID token code. Instead
of the regular authentication form, FortiWeb displays a form that captures these two values only.
When you enable Offloaded authentication and optional SSO configuration, the authentication delegation
options in the site publish rule are not available. These options depend on a password, which FortiWebs RSA
SecurID form does not capture.
See also
l Two-factor authentication
l Using Kerberos authentication delegation
l Offloaded authentication and optional SSO configuration
l The authentication server is Microsoft Active Directory (AD) and provides LDAPover SSL (LDAPS) service.
l In the LDAP query configuration, Bind Type is Regular. (You do not need to enable Secure Connection to
support the password change at login feature.) See Configuring LDAP queries on page 298.
l For the site publish rule configuration, Authentication Validation Method is LDAP. See Offloaded
authentication and optional SSO configuration on page 324.
l Regular Kerberos delegation Users enter a user name and password in an HTML authentication form (the
HTML Form Authentication or HTTP Basic Authentication site publish rule options). FortiWeb then obtains a
Kerberos service ticket on behalf of the client to allow it to access the specified web application.
l Kerberos constrained delegation FortiWeb verifies a users SSL certificate using the certificate authority
specified in a server policy or server pool member configuration (Client Certificate Authentication).
FortiWeb then obtains a Kerberos service ticket on behalf of the client to allow it to access the specified web
application.
This authentication delegation configuration requires you to create an Active Directory user for FortiWeb that
can act on behalf of the web application (see To create an Active Directory (AD) user for FortiWeb on page
335).
For information on the site publish rules settings related to Kerberos, see Offloaded authentication and optional
SSO configuration on page 324.
When the web application is Microsoft Exchange Outlook Web App (OWA), ensure Integrated Windows
authentication is also enabled.
To access the Integrated Windows authentication setting:
1. In the Exchange Management Console, in the virtual directory you want to configure, under Server
Configuration, select Client Access.
2. Select the server that hosts the OWA virtual directory, and then click the Outlook Web App tab.
3. In the work pane, select the virtual directory that you want to configure, and then click Properties.
See also
l Two-factor authentication
l RSA SecurID authentication
l Offloaded authentication and optional SSO configuration
1. Before you configure SSO, create one or more of the following authentication server configurations:
l LDAP (see Configuring LDAP queries on page 298)
l RADIUS (see Configuring RADIUS queries on page 303)
2. Add one or more server configurations to an authentication server pool (see Adding servers to an
authentication server pool on page 307).
l Create a Kerberos Key Distribution Centre configuration (see Configuring a Kerberos Key Distribution
Center (KDC) on page 308).
Because FortiWeb determines the KDC to use based on the realm of the web application, you do not have
to specify the KDC in the site publish rule.
l If your client authentication method is Client Certificate Authentication, create the AD user account that
FortiWeb uses to authenticate itself on behalf of clients and the corresponding keytab file configuration (see To
create an Active Directory (AD) user for FortiWeb on page 335).
4. If you plan to use HTML form authentication, you can customize the HTML pages that FortiWeb presents to
clients during the authentication process. See Customizing error and authentication pages (replacement
messages) on page 720.
5. Go to ApplicationDelivery> SitePublish > Site Publish and select the SitePublishRule tab.
6. Click Create New and configure the settings. The settings you select determine which additional settings are
displayed:
Name Type a unique name that can be referenced in other parts of the
configuration, such as cms-publisher1.
Path Enter the URL of the request for the web application, such as /owa. It
must begin with a forward slash (/).
l Simple String The optional Published Server Log Off Path setting
is a literal URL.
l Regular Expression The optional Published Server Log Off Path
setting is a regular expression designed to match multiple URLs.
Published Server Log Off Optionally, enter one of the following values:
Path
l If Log Off Path Type is Simple String, enter the URL of the request
that a client sends to log out of the application.
l If Log Off Path Type is Regular Expression, enter a regular
expression that matches the logoff URL.
Ensure that the value is a sub-path of the Path value. For example, if
Path is /owa , the following values are valid:
/owa/auth/logoff.aspx
/owa/logoff.owa
When clients log out of the web application, FortiWeb redirects them
to its authentication dialog.
Authentication Cookie Specify the length of time (in minutes) that passes before the cookie
Timeout that the site publish rule adds expires and the client must re-
authenticate.
Authentication Server Pool Select the pool of servers that FortiWeb uses to authenticate clients. See
Adding servers to an authentication server pool on page 307.
FortiWeb attempts to authenticate the user using each server in the pool,
starting with the top-most item in the list and moving downward.
Typically, you select this option when the web application supports
HTTP protocol-based authentication.
Username Location in Use one of the following options to specify how FortiWeb determines
Certificate the client username:
Delegated HTTP Service Specify the Service Principal Name (SPN) for the web application that
Principal Name clients access using this site publish rule.
Keytab File Select the keytab file configuration for the AD user that FortiWeb uses
to obtain Kerberos service tickets for clients.
Service Principal Name for Specify the Service Principal Name (SPN) of the AD user that is a
Keytab File delegator. It is the SPN that you used to generate the keytab specified
by Keytab File. (See To create an Active Directory (AD) user for
FortiWeb on page 335.)
Default Domain Prefix Select to allow users in environments that require users to log in using
Support both a domain and username to log in with just a username. Also
specify Default Domain Prefix.
Default Domain Prefix Enter a domain name that FortiWeb adds to the HTTP
Authorization: header before it forwards it to the web
application.
For example, the web site for this rule is www1.example.com and
SSO Domain is .example.com. After FortiWeb authenticates the
client for www1.example.com, the client can access
www2.example.com without authenticating a second time.
Site publishing SSO sessions exist on FortiWeb only; they are not
synchronized to the authentication or accounting server. Therefore,
SSO is not shared with non-web applications. For SSO with other
protocols, see the documentation for your FortiGate or other firewall.
SSO Domain Type the domain suffix of Host: names that can share this rules
authentication sessions, such as .example.com. Include the period (.)
that precedes the hosts name.
7. Click OK.
8. Go to ApplicationDelivery> SitePublish > Site Publish and select the SitePublishPolicy tab.
9. Click Create New.
10. In Name, type a unique name that can be referenced in other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
11. If you want to prevent users from making further attempts to log in after a specified number of failed login
attempts, enable Account Lockout and complete the following settings:
Max Login Failures Enter the number of times that a user can attempt to log in before
FortiWeb prevents the user from attempting to log in again.
If the user exceeds the threshold and attempts to log in again during
the time period configured by Account Block Period, FortiWeb
returns an "Account blocked!" message to the user.
You can customize the web page that FortiWeb returns to the blocked
user. See Customizing error and authentication pages (replacement
messages) on page 720.
Within Enter the length of time, in minutes, which FortiWeb uses to determine if
the user has exceeded the maximum number of login attempts specified by
Max Login Failures.
Account Block Period Enter the length of time FortiWeb prevents a user from attempting to
log in again after the user has exceeded the number of login attempts
specified by Max Login Failures.
12. If you want to prevent users from credential stuffing attacks, enable Credential Stuffing Defense and
complete the following settings:
Credential Stuffing Defense Enable to use FortiGuard's Credential Stuffing Defense database to
prevent against Credential Stuffing attacks. When this setting is
enabled, FortiWebwillevaluate the username (Username Field) and
password (Password Field) of the matched login requests against the
Credential Stuffing Defense database to identify whether the paired
username/password has been spilled. If it has, the specified Action
triggers and Trigger Policy is applied.
Action Select the action that FortiWeb will take against a request when a
paired username/password is found in Credential Stuffing Defense
database:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Block Period Type the number of seconds that you want to block a request when a
paired username/password is found in Credential Stuffing Defense
database.
Severity When the credential stuffing defense generates an attack log, each
log message contains a Severity Level (severity_level) field.
Select which severity level FortiWeb uses when it takes the specified
action:
l Low
l Medium
l High
The default value is Medium.
Trigger Policy Select which trigger, if any, that FortiWeb will use when it logs or sends an
alert email about the credential stuffing hit. See Configuring triggers.
13. Click Create New and in Rule, select the name of a site publishing rule.
14. Repeat the previous step for each web application that is part of the SSO domain.
15. Click OK.
16. Select the site publishing policy in an inline web protection profile (see Configuring a protection profile for
inline topologies on page 658). The profile must be used in the policy applying your domains virtual servers.
17. To verify the configuration, log in to one of the web applications, then log in to another web application in the
same domain that should be part of the SSO domain.
See also
l The SPNof an AD user that FortiWeb uses to obtain Kerberos tickets on behalf of clients.
l The keytab file that corresponds to the AD user.
1. Create an AD user.
For example, create the user http-delegator.
2. To generate a Service Principal Name (SPN) for the AD user, using the SetSPN utility and a Windows
command prompt, enter the following command:
setspn -A host/<service_name>.<domain> <login_domain>\<ad_user_name>
where
You cannot access the delegation settings for a user until it has an SPN.
3. In the properties for the AD user, on the Delegation tab, select Trust this user for delegation to specified
services only, and then select Use any authentication protocol.
4. Click Add, and then click Users or Computers to open the Select Users or Computers dialog box.
5. For Enter the object names to select, enter the name of the computer where the web service resides.
You can use the hostname command to retrieve the computer name.
6. Click OK, and then, in the Add Services dialog box, under in the list of available services, select the http item.
7. Click OK.
http://technet.microsoft.com/en-us/library/cc779157(v=ws.10).aspx
Ktpass output the extracted keytab file to the directory of the current user.
For example:
C:\Users\Administrator\test.keytab
Example Co. web hosting needs to enforce reasonably secure passwords on web applications that do not provide
this feature themselves. Since end users already authenticate with the web applications, Example Co. does not
need to configure FortiWeb with user accounts to apply authentication in other words, authentication
offloading is not required. Instead, they simply need to enforce the security policy in the authentication
transactions that already exist between the clients and web servers.
To do this, Example Co. would configure and apply an input rule (see Validating parameters (input rules) on
page 597). This rule either could use a predefined data type to require password complexity (Level 2 Password
see Auto-learning on page 207), or could use a custom-defined data type to allow or require additional special
characters for additional strength (see Defining custom data types on page 606).
Tracking users
The user tracking feature allows you to track sessions by user and capture a username to reference in traffic and
attack log messages.
When FortiWeb detects users that match the criteria that you specify in a user tracking policy, it stores the
session ID and username.
FortiWeb only tracks users who have logged in successfully. It uses one of the following methods to determine
whether a log in is successful:
l The response matches a condition you specify in the user tracking rule, such as a return code or a string in the
response body. You create these conditions in the rule's Authentication Result Condition Table.
l If the response does not match a condition in the table, FortiWeb uses the default result that you select for the rule.
When either of the following two events occurs, FortiWeb stops tracking the session user:
l The client request contains the log off URL that you specify in the user tracking rule. (The log off URL setting is
optional.)
l The session is idle for longer than the session timeout value you specify in the rule.
When you enable Session Timeout Enforcement in a user tracking rule, you can also configure a Session
Freeze Time. After a session has been idle for longer than the timeout value, if a request has the session ID of
the timed-out session, FortiWeb takes the action you specify in the rule. FortiWeb continues to take this action
against requests with the session ID for the length of time specified by Session Freeze Time.
You can also use the user tracking feature to create a filter in a custom rule that matches specific users. This type
of custom rule requires you to create a user tracking policy and apply it to the protection profile that uses the
custom rule. See Combination access control & rate limiting.
You can apply a user tracking policy using either an inline or offline protection profile.
However, in offline protection mode, Session Fixation Protection, Session
Timeout Enforcement, and the deny, redirect and period block actions are not
supported.
1. Go to Tracking > User Tracking, and select the User Tracking Rule tab.
2. Click Create New, and then complete the following settings:
Username Field Enter the username field value to match in authorization requests.
Password Field Enter the password field value to match in authorization requests.
Session ID Name Type the name of the session ID that is used to identify each session.
Default Authentication Enter the authentication result that FortiWeb associates with requests that
Result match the criteria but do not match an entry in the Authentication Result
Condition Table.
When the login result is successful, FortiWeb tracks the session using the
session ID and username values.
Log Off Path Optionally, enter the URL of the request that a client sends to log out of the
application.
When the client sends this URL, FortiWeb stops tracking the user session.
Session Timeout Enter the length of time in minutes that FortiWeb waits before it stops
tracking an inactive user session.
Session Fixation Protection Enable to configure FortiWeb to erase session IDs from the cookie and
argument fields of a matching login request.
For web applications that do not renew the session cookie when a user logs
in, it is possible for an attacker to trick a user into authenticating with a
session ID that the attacker acquired earlier. This feature prevents the
attacker from accessing the web app in an authenticated session.
When this feature removes session IDs, FortiWeb does not generate a log
message because it is very common for a legitimate user to access a web
application using an existing cookie. For example, a client who leaves his
or her web browser open between sessions presents the cookie from an
earlier session.
Session Timeout Enable to configure FortiWeb to remove the session ID for user sessions
Enforcement that are idle for longer than the session timeout threshold. When a session
is reset, the client has to log in again to access the back-end server.
Credential Stuffing Defense Enable to use FortiGuard's Credential Stuffing Defense database to
prevent against Credential Stuffing attacks. When this setting is
enabled, FortiWeb willevaluate the username (Username Field) and
password (Password Field) of the matched login requests against the
Credential Stuffing Defense database to identify whether the paired
username/password has been spilled. If it has, the specified Action
triggers and the Trigger Policy is applied.
Session Freeze Time Enter the length of time after a session exceeds the timeout threshold that
FortiWeb takes the specified action against requests with the ID of the
timed-out session.
After the freeze time has elapsed, FortiWeb removes the session ID for idle
sessions but no longer takes the specified action.
Action Select the action that FortiWeb takes against requests with the ID of a
timed-out session during the specified time period or if the paired
username/password is found in Credential Stuffing Defense
database:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
l Redirect Redirect the request to the URL that you specify in the
protection profile and generate an alert and/or log message. Also
configure Redirect URL and Redirect URL With Reason.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Block Period Type the number of seconds that you want to block requests with the
ID of a timed-out session.
l Low
l Medium
l High
The default value is Low.
Trigger Policy Select which trigger, if any, that FortiWeb uses when it logs or sends an
alert email about the session timeout or credential stuffing hit. See
Configuring triggers.
When both Session Timeout Enforcement and Credential Stuffing Defense are enabled, violations of
any of the two security events will trigger the same actions (they use a common set of configurations: Action,
Block Period, Severity and Trigger Policy).
3. Click OK.
4. To add an entry to the Authentication Result Condition Table, click Create New, and then complete the
following settings:
Authentication Result Type Specify the status FortiWeb assigns to user logins that match this table
item: Failed or Successful.
If the request does not match any rules in this table, FortiWeb uses the
value specified by Default Authentication Result.
HTTP Match Target Select the location of the value to match with the string or regular
expression specified in this table item: Return Code, Response Body,
Redirect URL.
5. Click OK, and then add any additional table entries that are required.
6. Create any additional rules that are required.
7. To add the rules to a policy, go to Tracking > User Tracking, select the User Tracking Policy tab, click
Create New, enter a name for the policy, and then click OK.
8. Click Create New, select the user tracking rule to add, and then click OK.
9. Add any additional rules that are required, and then click OK.
10. To apply the user tracking rule, select it in an inline or offline protection profile (see Configuring a protection
profile for inline topologies on page 658 or Configuring a protection profile for an out-of-band topology or
asynchronous mode of operation on page 669).
To apply policies correctly and log accurately, it is important that FortiWeb is aware of certain other points on your
network.
To scan traffic for your web servers, first FortiWeb must know which IP addresses and HTTP Host: names to
protect. If there are proxies and load balancers in the network stream between your client and your FortiWeb, you
will also want to define them. Likewise, if your web servers have features that operate using the source IP
address of a client, you may also need to configure FortiWeb to pass that information to your web servers.
Without these definitions, FortiWeb will not know many things, such as requests are for invalid host names, which
source IP addresses are external load balancers instead of clients, and which headers it should use to transmit
the clients original source IP address to your web servers. This can cause problems with logging, reports, other
FortiWeb features, and server-side features that require the clients IP address.
If you have virtual hosts on your web server, multiple web sites with different domain names (for example,
example.com, example.co.uk, example.ru, example.edu) can coexist on the same physical computer with a
single web server daemon. The computer can have a single IP address, with multiple DNS names resolving to its
IP address, or the computer can have multiple IP addresses and multiple NICs, with different sets of domain
names resolving to separate NICs.
Just as there can be multiple host names per web server, there can also be the inverse: multiple web servers per
host name. (For example, for distributed computing clusters and server farms.)
When configuring FortiWeb, a web server is a single IP at the network layer, but a protected host group should
contain all network IPs, virtual IPs, and domain names that clients use to access the web server at the HTTP
layer.
For example, clients often access a web server via a public network such as the Internet. Therefore, the protected
host group contains public domain names, IP addresses and virtual IPs on a network edge router or firewall,
such as:
l www.example.com and
l www.example.co.uk and
l example.de
But the physical or domain server is only the IP address or domain name that the FortiWeb appliance uses to
forward traffic to the server and, therefore, is often a private network address (unless the FortiWeb appliance is
operating in offline protection or either of the transparent modes):
l 192.168.1.10 or
l example.local
A protected host group (also called allowed hosts or protected host names, depending on how the host name
is used in each context) defines one or more IP addresses or fully qualified domain names (FQDNs). Each entry in
the group defines a virtual or real web host, according to the Host: field in the HTTP header of requests. You
can use these entries to determine which host names:
Host: www.example.com
you might define a protected host group with an entry of www.example.com and select it in Protected
Hostnames in the policy. This would block requests that are not for that host.
A protected host names group is usually not the same as a back-end web server. See
Protected web servers vs. allowed/protected host names.
You use protected host names in a server policy to restrict requests to specific
hostnames. If you want to specify specific hosts to apply a policy to, use the HTTP
content routing feature. See Routing based on HTTP content on page 373.
Used differently, you might select the www.example.com entry in Host when defining requests where the
parameters should be validated. This would apply protection only for that host.
Unlike a web server, which is a single IP at the network layer, a protected host group should contain all network
IPs, virtual IPs (VIP), and domain names that clients use to access the web server at the HTTP layer.
For example, clients often access a web server via a public network such as the Internet. Therefore, the protected
host group contains public domain names, IP addresses and virtual IPs on a network edge router or firewall,
such as:
l www.example.com and
l www.example.co.uk and
l example.de
But in reverse proxy mode, the physical or domain server is the IP address or domain name that the FortiWeb
appliance uses to forward traffic to the back-end web server behind the NAT and, therefore, is often a private
network address:
l 192.168.1.10 or
l example.local
As another example, for entry level or virtualized web hosting, many Apache virtual hosts:
l business.example.cn
l university.example.cn
l province.example.cn
may exist on one or more back-end web servers which each have one or more network adapters, each with one or
more private network IP addresses that are hidden behind a reverse proxy FortiWeb:
l 172.16.1.5
l 172.16.1.6
l 172.16.1.7
The virtual hosts would be added to the list of FortiWebs protected host names, while the network adapters IP
addresses would be added to the list of physical servers.
3. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
4. From Default Action, select whether to accept or deny HTTP requests that do not match any of the host
definitions in this protected host group. (In step 8, you can override this default for specific hosts.)
For example, lets say that you have 10 web hosts protected by FortiWeb. You want to allow 8 and block 2. To
do this, first set Default Action to Accept. Then in step 8, you will create 2 entries for the host names that
you want to block, and in their Action, select Deny.
5. Click OK.
6. If you want to treat one or more hosts differently than indicated in Default Action, click Create New.
A dialog appears.
7. For , enter the IP address or FQDN of a real or virtual host, according to the Host: field in HTTP requests.
If clients connect to your web servers through the IP address of a virtual server on the FortiWeb appliance, this
should be the IP address of that virtual server or any domain name to which it resolves, not the IP address
of the protected web server.
For example, if a virtual server 10.0.2.1/24 forwards traffic to the physical server 192.0.2.1, for protected host
names, you would enter:
8. In Action, select whether to Accept or Deny HTTP requests whose Host: field matches this Host entry.
9. Click OK.
10. Repeat the previous steps for each host that you want to add to the protected host group.
11. To apply a protected host group, select it in a server policy (see Configuring a server policy on page 677).
Policies use protected host definitions to block connections that are not destined for a protected host. If you
do not select a protected host group in a server policy, and you do not configure a combination access control
rule with an HTTP Host: condition either, FortiWeb accepts or blocks connections regardless of the Host:
field.
See also
l IPv6 support
l HTTP pipelining
To specify your back-end web servers, you first define a server pool. Pools contain one or more members that you
specify using either their IP addresses or DNS domain names. FortiWeb protects these web servers and they are
the recipients of traffic that is forwarded or allowed to pass through to by FortiWeb.
You can also define web servers to be FortiWebs virtual servers. This chains multiple
policies together, which may be useful in more complex traffic routing or rewriting
situations.
See also
l TCP
l ICMP ECHO_REQUEST (ping)
l TCP Half Open
l TCP SSL
l HTTP
l HTTPS
FortiWeb polls the server at the frequency set in the Interval option. If the appliance does not receive a reply
within the timeout period, and you have configured the health check to retry, it attempts a health check again;
otherwise, the server is deemed unresponsive. The FortiWeb appliance reacts to unresponsive servers by
disabling traffic to that server until it becomes responsive.
If all members of the pool are unresponsive and you have configured one or more members to be backup servers,
FortiWeb sends traffic to a backup server.
If a web server will be unavailable for a long period, such as when a server is
undergoing hardware repair, it is experiencing extended down time, or when you have
removed a server from the server pool, you may improve the performance of your
FortiWeb appliance by disabling connectivity to the web server, rather than allowing
the server health check to continue to check for responsiveness. For details, see
Enabling or disabling traffic forwarding to your servers on page 397.
You can create a health check, use one of the predefined health checks, or clone one of the predefined health
checks to use as a starting point for a custom health check. (You cannot modify the predefined health checks.)
To simplify health check creation, FortiWeb provides predefined health checks for each of the available protocols.
Each predefined health check contains a single rule that specifies one of the available protocols. For example,
instead of creating a health check that uses ICMP, you can apply HLTHCK_IMCP.
HLTHCK_HTTP and HLTHCK_HTTPS health checks test server responsiveness using the HEAD method and
listening for the response code 200.
Your health check can use more than protocol to check server responsiveness. You can specify that a server is
available if it passes a single test in the list of tests or only if it passes all the tests.
To view the status currently detected by server health checks, use the Policy Status dashboard. For details, see
Policy Status dashboard on page 747.
1. Before configuring a server health check, if it requires a trigger, configure the trigger. For details, see Viewing
log messages on page 768.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 63 characters.
Relationship l And FortiWeb considers the server to be responsive when it passes all
the tests in the list.
l Or FortiWeb considers the server to be responsive when it passes at
least one of the tests in the list.
Trigger Policy Select the name of a trigger, if any, that will be used to log or notify an
administrator if a server becomes unresponsive.
5. Click OK.
6. In the rule list, do one of the following:
l To add a rule, click Create New.
l To modify a rule, select it, and then click Edit.
7. Configure the following settings:
Type Select the protocol that the server health check uses to contact the
server.
The protocol to use depends on whether you enable SSL for that
server in the server pool. Contact occurs on the protocol and port
number specified for that web server in the server pool.
URL Path Type the URL that the HTTP or HTTPS request uses to verify the
responsiveness of the server (for example, /index.html).
If the web server successfully returns this URL, and its content
matches your expression in Matched Content, it is considered to be
responsive.
Timeout Type the maximum number of seconds that can pass after the server
health check. If the web server exceeds this limit, it will indicate a
failed health check.
Retry Times Type the number of times, if any, that FortiWeb retries a server health
check after failure. If the web server fails the server health check this
number of times consecutively, it is considered to be unresponsive.
Interval Type the number of seconds between each server health check.
Method Specify whether the health check uses the HEAD, GET, or POST
method.
Host To test the availability of a specific host, enter an HTTP host header name.
This is useful if the pool member hosts multiple web sites (virtual hosting
environment).
Match Type l Matched Content If the web server successfully returns the URL
specified by URL Path and its content matches the Matched Content
value, FortiWeb considers the server to be responsive.
l Response Code If the web server successfully returns the URL
specified by URL Path and the code specified by Response Code,
FortiWeb considers the server to be responsive.
l All If the web server successfully returns the URL specified by URL
Path and its content matches the Matched Content value, and the code
specified by Response Code, FortiWeb considers the server to be
responsive.
Available only when Protocol Type is HTTP or HTTPS.
To create and test a regular expression, click the >> (test) icon. This
opens a Regular Expression Validator window where you can fine-
tune the expression (see Regular expression syntax on page 918)
Response Code Enter the response code that you require the server to return to
confirm that it is available.
9. Add any additional tests you want to include in the health check by adding additional rules.
10. Click OK to save and close the health check.
11. To use the server health check, select it in a server pool or server pool member configuration (see Creating a
server pool on page 359).
See also
l IPv6 support
l Configuring a server policy
l Creating a server pool
A session persistence configuration specifies a persistence method and timeout. You apply the configuration to
Server Balance server pools to apply the persistence setting to all members of the pool.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 63 characters.
IPv4 Netmask Specifies the IPv4 subnet used for session persistence.
IPv6 Mask Length Specifies the IPv6 network prefix used for session persistence.
Header Name Specifies the name of the HTTP header that the persistence feature uses
to route requests.
Parameter Name Specifies the name of the URL parameter that the persistence feature uses
to route requests.
Cookie Name Specifies a value to match or the name of the cookie that FortiWeb inserts.
Cookie Path Specifies a path attribute for the cookie that FortiWeb inserts, if Type is
Insert Cookie.
Cookie Domain Specifies a domain attribute for the cookie that FortiWeb inserts, if Type is
Insert Cookie
3. Click OK.
For information on applying the configuration to a pool, see Creating a server pool on page 359.
l Reverse proxy mode When the FortiWeb appliance receives traffic destined for a virtual server, it
forwards the traffic to a server pool. If the pool has more than one member, the physical or domain server that
receives the connection depends on your configuration of load-balancing algorithm, weight, and server health
checking.
For pools with multiple members, to prevent traffic from being forwarded to unavailable web servers, you can
use a health check to verify the availability of members. The availability of other members and the Deployment
Mode option in the policy determine whether the FortiWeb appliance redistributes or drops the connection
when a physical or domain server in a server pool is unavailable.
l Offline protection, true transparent proxy, transparent inspection, and WCCP mode The FortiWeb
appliance allows traffic to pass through to the server pool when it receives traffic that is:
l passing through a bridge
l directed to the FortiWeb (configured as a WCCP client) by a FortiGate acting as a WCCP server
A server can belong to more than one server pool.
l If clients connect via HTTPS and FortiWeb is operating in a mode that performs SSL inspection instead of SSL
offloading, upload the web sites server certificate. See Uploading a server certificate on page 417.
l If you want to use the pool for load balancing and want to monitor its members for responsiveness, configure
one or more server health checks to use with it. For details, see Configuring server up/down checks on page
352.
l If client connections require persistent sessions, create a persistence configuration. See Configuring session
persistence on page 356.
2. Go to Server Objects> Server> ServerPool.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Server Policy Configuration category. For details, see Permissions on page 69.
Name Type a name that can be referenced by other parts of the configuration. Do
not use spaces or special characters. The maximum length is 63
characters.
Type Select the current operation mode of the appliance to display the
corresponding pool options.
For full information on the operating modes, see How to choose the
operation mode on page 87.
Single Server/Server l Single Server Specifies a pool that contains a single member.
Balance l Server Balance Specifies a pool that contains multiple members.
FortiWeb uses the specified load-balancing algorithm to distribute TCP
connections among the members. If a member is unresponsive to the
specified server health check, FortiWeb forwards subsequent connections
to another member of the pool.
Available only when Type is Reverse Proxy.
Server Health Check Specifies a test for server availability. By default, this health check is
used for all pool members, but you can use the pool member
configuration to assign a different health check to a member.
Load Balancing Algorithm l Round Robin Distributes new TCP connections to the next pool
member, regardless of weight, response time, traffic load, or number of
existing connections. FortiWeb avoids unresponsive servers.
l Weighted Round Robin Distributes new TCP connections using the
round-robin method, except that members with a higher weight value
receive a larger percentage of connections.
l Least Connection Distributes new TCP connections to the member
with the fewest number of existing, fully-formed TCP connections.
l URI Hash Distributes new TCP connections using a hash algorithm
based on the URI found in the HTTP header, excluding hostname.
l Full URI Hash Distributes new TCP connections using a hash
algorithm based on the full URI string found in the HTTP header. The full
URI string includes the hostname and path.
l Host Hash Distributes new TCP connections using a hash algorithm
based on the hostname in the HTTP Request header Host field.
l Host Domain Hash Distributes new TCP connections using a hash
algorithm based on the domain name in the HTTP Request header Host
field.
l Source IP Hash Distributes new TCP connections using a hash
algorithm based on the source IP address of the request.
For hash-based methods, if you specify a persistence method for the
server pool, after an initial client request, FortiWeb routes any
subsequent requests according to the persistence method. Otherwise,
it routes subsequent requests according to the hash-based algorithm.
Comments Type a description of the server pool. The maximum length is 199
characters.
5. Click OK.
6. Click Create New.
A dialog appears.
ID The index number of the member entry within the server pool.
Status l Enable Specifies that this pool member can receive new sessions
from FortiWeb.
l Disable Specifies that this pool member does not receive new
sessions from FortiWeb and FortiWeb closes any current sessions as
soon as possible.
l Maintenance Specifies that this pool member does not receive new
sessions from FortiWeb but FortiWeb maintains any current connections.
Server Type Select either IP or Domain to indicate how you want to define the pool
member.
Warning: Server policies do not apply features that do not yet support
IPv6 to servers specified using IPv6 addresses or domain servers
whose DNS names resolve to IPv6 addresses.
Tip: For domain servers, FortiWeb queries a DNS server to query and
resolve each web servers domain name to an IP address. For
improved performance, do one of the following:
Connection Limit Specifies the maximum number of TCP connections that FortiWeb
forwards to this pool member.
Port Type the TCP port number where the pool member listens for connections.
The valid range is from 1 to 65,535.
Weight If the pool member is part of a pool that uses the weighted round-
robin load-balancing algorithm, type the weight of the member when
FortiWeb distributes TCP connections.
Inherit Health Check Clear to use the health check specified by Server Health Check in this
server pool rule instead of the one specified in the server pool
configuration.
Server Health Check Specifies an availability test for this pool member.
Backup Server When this option is selected and all the members of the server pool fail
their server health check, FortiWeb routes any connections for the pool to
this server.
The backup server mechanism does not work if you do not specify server
health checks for the pool members.
If you select this option for more than one pool member, FortiWeb uses the
load balancing algorithm to determine which member to use.
l enabling this option makes sure the traffic is transferred in HTTP/2 between
FortiWeb and this web server, if this web server supports HTTP/2. Note:
Make sure that this back web server really supports HTTP/2 before you
enable this, or connections will go failed.
l disabling this option makes FortiWeb to converse HTTP/2 to HTTP/1.x for
this web server, or converse HTTP/1.x to HTTP/2 for the clients, if this web
server does not support HTTP/2.
In True Transparent Proxy mode, it requires this option be enabled
and the SSL be well-configured to enable FortiWeb's HTTP/2
inspection. When HTTP/2 inspection is enabled in True Transparent
Proxy mode, FortiWeb performs no protocol conversions between
HTTP/1.x and HTTP/2, which means HTTP/2 connections will not be
established between clients and back-end web servers if the web
servers do not support HTTP/2. See HTTP/2 support for details.
Note: Please confirm your FortiWeb operation mode and the HTTP
versions your back-end web servers are running first to make
appropriate configuration here, so that HTTP/2 inspection can work
correctly with your web servers.
Certificate File Select the server certificate that FortiWeb uses to decrypt SSL-
secured connections.
For true transparent proxy and WCCP modes, also complete the
settings described in described in step 8.
Available when:
Client Certificate If connections to this pool member require a valid client certificate,
select the client certificate that FortiWeb uses.
Available when:
Supported SSL Protocols Specify which versions of the SSL or TLS cryptographic protocols
clients can use to connect securely to this pool member.
For more information, see Supported cipher suites & protocol versions
on page 401.
Available when:
SSL/TLS encryption level Specify whether the set of cipher suites that FortiWeb allows creates a
medium-security, high-security, or custom configuration.
For more information, see Supported cipher suites & protocol versions
on page 401.
Available when:
Warm Up Specifies for how long FortiWeb forwards traffic at a reduced rate after
a health check indicates that this pool member is available again but it
cannot yet handle a full connection load.
For example, when the pool member begins to respond but startup is
not fully complete.
Warm Rate Specifies the maximum connection rate while the pool member is
starting up.
8. If the operating mode is transparent proxy or WCCP and SSL is enabled, complete the following additional
settings to complete the SSL offloading configuration:
Certificate Intermediate Select the name of a group of intermediate certificate authority (CA)
Group certificates, if any, that FortiWeb presents to clients. An intermediate
CA can complete the signing chain and validate the server certificates
CA signature.
Alternatively, you can include the entire signing chain in the server
certificate itself before you upload it to FortiWeb. See Uploading a
server certificate on page 417 and Supplementing a server certificate
with its signing chain on page 420.
Show/Hide advanced SSL Click to show or hide the settings that allow you to specify a Server
settings Name Indication (SNI) configuration, increase security by disabling
specific versions of TLS and SSL for this pool member, and other
advanced SSL settings.
Add HSTS Header Enable to combat MITM attacks on HTTP by injecting the RFC 6797
strict transport security header into the reply, such as:
Strict-Transport-Security: max-age=31536000;
includeSubDomains
This header forces clients to use HTTPS for subsequent visits to this
domain. If the certificate is invalid, the clients web browser receives a
fatal connection error and does not display a dialog that allows the
user to override the certificate mismatch error and continue.
Certificate Verification Select the name of a certificate verifier, if any, that FortiWeb uses to
validate an HTTP clients personal certificate.
Note: The client must support SSL 3.0, TLS 1.0, TLS 1.1, or TLS 1.2.
When the operating mode is reverse proxy, you can select this option
in the server policy.
Enable URL Based Client Specifies whether FortiWeb uses a URL-based client certificate group to
Certificate determine whether a client is required to present a personal certificate.
Note: This function is not supported for HTTP/2 communication between
the Client and this back-end web server.
URL Based Client Specifies the URL-based client certificate group that determines
Certificate Group whether a client is required to present a personal certificate.
If the URL the client requests does not match an entry in the group,
the client is not required to present a personal certificate.
Max HTTP Request Length Specifies the maximum allowed length for an HTTP request with a
URL that matches an entry in the URL-based client certificate group.
Client Certificate Enable to configure FortiWeb to include the X.509 personal certificate
Forwarding presented by the client during the SSL/TLS handshake, if any, in an
X-Client-Cert: HTTP header when it forwards the traffic to the
protected web server.
FortiWeb still validates the client certificate itself, but this forwarding
action can be useful if the web server requires the client certificate for
the purpose of server-side identity-based functionality.
Enable Server Name Select to use a Server Name Indication (SNI) configuration instead of
Indication (SNI) or in addition to the server certificate specified by Certificate File.
If you select Enable Strict SNI, FortiWeb always ignores the value of
Certificate File.
Enable Strict SNI Select to configure FortiWeb to ignore the value of Certificate File
when it determines which certificate to present on behalf of the pool
member, even if the domain in a client request does not match a
value in the SNI configuration.
SNI Policy Select the Server Name Indication (SNI) configuration that FortiWeb
uses to determine which certificate it presents on behalf of this pool
member.
Enable Perfect Forward Enable to configure FortiWeb to generate a new public-private key
Secrecy pair when it establishes a secure session with a DiffieHellman key
exchange.
Prioritize RC4 Cipher Suite Enable to configure FortiWeb to use the RC4 cipher when it first
attempts to create a secure connection with a client.
Disable Client-Initiated SSL Select to ignore requests from clients to renegotiate TLS or SSL.
Renegotiation
This setting protects against denial-of-service (DoS) attacks that use
TLS/SSL renegotiation to overburden the server.
9. Repeat the previous steps for each IP address or domain that you want to add to the server pool.
10. Click OK.
11. To apply the server pool configuration, do one of the following:
l Select it in a server policy directly.
l Select it in an HTTP content writing policy that you can, in turn, select in a server policy.
See Configuring a server policy on page 677 and Routing based on HTTP content on page 373.
See also
l IPv6 support
l HTTP pipelining
l Routing based on HTTP content
l Configuring a server policy
l Configuring server up/down checks
l Sequence of scans
l How to offload or inspect HTTPS
l How to force clients to use HTTPS
HTTP content routing policies define how FortiWeb routes requests to server pools. They are based on one or
more of the following HTTP elements:
l Host
l URL
l HTTP parameter
l Referer
l Source IP
l Header
l Cookie
l X509 certificate field value
This type of routing can be useful if, for example, a specific web server or group of servers on the back end
support specific web applications, functions, or host names. That is, your web servers or server pools are not
identical, but specialized. For example:
Login
Web
Server 1
Set-Cookie: name=cookiesession1...
192.168.1.2/24
Switch
10.0.0.1 port3
Cook
ie: port2
name
192.168.1.1
=coo
kies
essi
192.168.1.3/24
on1.
..
View
Web
Server 2
When FortiWeb operates in Reverse Proxy mode, HTTP Content Routing will be not
supported if HTTP/2 security inspection (see HTTP/2 support) is enabled.
4. For Server Pool, select a server pool. FortiWeb forwards traffic to this pool when the traffic matches rules in
this policy.
You select only one server pool for each HTTP content routing configuration. However, multiple HTTP content
routing configurations can use the same server pool.
For more information on rewriting, see Rewriting & redirecting on page 510.
Match Object Select the object that FortiWeb examines for matching values.
HTTP Host
HTTP Host
l Match prefix The host to match begins with the specified string.
l Match suffix The host to match ends with the specified string.
l Match contains The host to match contains the specified string.
l Match domain The host to match contains the specified string
between the periods in a domain name.
For example, if the value is abc, the condition matches the following
hostnames:
dname1.abc.com
dname1.dname2.abc.com
However, the same value does not match the following hostnames:
abc.com
dname.abc
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match either this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
HTTP URL
l Match prefix The URL to match begins with the specified string.
l Match suffix The URL to match ends with the specified string.
l Match contains The URL to match contains the specified string.
l Match directory The URL to match contains the specified string
between delimiting characters (slash).
For example, if the value is abc, the condition matches the following
URLs:
test.com/abc/
test.com/dir1/abc/
However, the same value does not match the following URLs:
test.com/abc
test.abc.com
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match either this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
HTTP Parameter
l Match prefix The parameter name to match begins with the specified
string.
l Match suffix The parameter name to match ends with the specified
string.
l Match contains The parameter name to match contains the specified
string.
l Is equal to The parameter name to match is the specified string.
l Regular expression The parameter name to match matches the
specified regular expression.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
l Match prefix The parameter value to match begins with the specified
string.
l Match suffix The parameter value to match ends with the specified
string.
l Match contains The parameter value to match contains the specified
string.
l Is equal to The parameter value to match is the specified string.
l Regular expression The parameter value to match matches the
specified regular expression.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
HTTP Referer
l Match prefix The HTTP referer value to match begins with the
specified string.
l Match suffix The HTTP referer value to match ends with the specified
string.
l Match contains The HTTP referer value to match contains the
specified string.
l Is equal to The HTTP referer value to match is the specified string.
l Regular expression The HTTP referer value to match matches the
specified regular expression.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
HTTP Cookie
l Match prefix The cookie name to match begins with the specified
string.
l Match suffix The cookie name to match ends with the specified
string.
l Match contains The cookie name to match contains the specified
string.
l Is equal to The cookie name to match is the specified string.
l Regular expression The cookie name to match matches the
specified regular expression.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
l Match prefix The cookie value to match begins with the specified
string.
l Match suffix The cookie value to match ends with the specified string.
l Match contains The cookie value to match contains the specified
string.
l Is equal to The cookie value to match is the specified string.
l Regular expression The cookie value to match matches the
specified regular expression.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match either this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
HTTP Header
l Match prefix The header name to match begins with the specified
string.
l Match suffix The header name to match ends with the specified
string.
l Match contains The header name to match contains the specified
string.
l Is equal to The header name to match is the specified string.
l Regular expression The header name to match matches the
specified regular expression.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
l Match prefix The header value to match begins with the specified
string.
l Match suffix The header value to match ends with the specified
string.
l Match contains The header value to match contains the specified
string.
l Is equal to The header value to match is the specified string.
l Regular expression The header value to match matches the
specified regular expression.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
Source IP
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match either this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
X509 Certificate Subject Matches against a specified Relative Distinguished Name (RDN) in
the X509 certificate Subject field. Use an attribute-value pair to
specify the RDN.
X509 Field Name Select the attribute type to match: E, CN, OU, O, L, ST, C.
Value = Enter an RDN attribute value in the X509 Subject field to match.
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match either this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
X509 Certificate Extension Matches against additional fields that the extensions field adds to the
X509 certificate.
X509 Field Value Specify one of the following values in the X509 extension to match:
l Match prefix The X509 extension value to match begins with the
specified string.
l Match suffix The X509 extension value to match ends with the
specified string.
l Match contains The X509 extension value to match contains the
specified string.
l Is equal to The X509 extension value to match is the specified string.
l Regular expression The X509 extension value matches the
specified regular expression.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Relationship with l And Matching requests match this entry in addition to other entries in
previous rule the HTTP content routing list.
l Or Matching requests match either this entry or other entries in the list.
Later, you can use the HTTP content routing list options to adjust the
matching sequence for entries.
7. Click OK.
8. Repeat the rule creation steps for each HTTP host, HTTP request, or other object that you want to route to
this server pool.
9. If required, select an entry, and then click Move to adjust the rule sequence.
For an example of how to add logic for the rules, see Example: Concatenating exceptions on page 562.
12. To apply a HTTP content routing policy, select it in a server policy. When you add HTTP content routing
polices to a policy, you also select a default policy. The default policy routes traffic that does not match any
conditions found in the specified routing policies.
See also
l Adding a gateway
l Creating a server pool
l Enabling or disabling traffic forwarding to your servers
l Configuring a server policy
l Configuring server up/down checks
From the perspective of clients connecting to the front end, there is one domain name: www.example.com. At
this host name, there are three top-level URLs:
http://www.example.com/games
Behind the FortiWeb, however, each of those 3 web applications actually resides on separate back-end web
servers with different IP addresses, and each has its own server pool:
See also
From the perspective of clients connecting to the front end, Example Companys web site has a few domain
names:
l http://www.example.com
l http://www.example.cn
l http://www.example.de
l http://www.example.co.jp
Public DNS resolves all of these domain names to one IP address: the virtual server on FortiWeb.
At the data center, behind the FortiWeb, separate physical web servers host some region-specific web sites.
Other web sites have lighter traffic and are maintained by the same person, and therefore a shared server hosts
them. Each back-end web server has a DNS alias. When you configure the server pools, you define each pool
member using its DNS alias, rather than its IP address:
l www1.example.com Hosts www.example.com, plus all other host names content, in case the other web servers
fail or have scheduled down time
l www2.example.com Hosts www.example.de
l www3.example.com Hosts www.example.cn & www.example.co.jp
While public DNS servers all resolve these aliases to the same IP address FortiWebs virtual server your
private DNS server resolves these DNS names to separate IPs on your private network: the back-end web
servers.
See also
Example: HTTP routing with full URL & host name rewriting
In some cases, HTTP header-based routing is not enough. It must be, or should be, combined with request or
response rewriting.
Example.com hosts calendar, inventory, and customer relations management web applications separately: one
app per specialized server. Each web application resides in its web servers root folder (/). Each back-end web
server is named after the only web application that it hosts:
l calendar.example.com/
l inventory.example.com/
l crm.example.com/
Therefore each request must be routed to a specific back-end web server. Requests for the calendar application
forwarded to crm.example.com, for example, would result in an HTTP 404 error code.
These back-end DNS names are publicly resolvable. However, for legacy reasons, clients may request pages as if
all apps were hosted on a single domain, www.example.com:
l www.example.com/calendar
l www.example.com/inventory
l www.example.com/crm
Because the URLs requested by clients (prefixed by /calendar etc.) do not actually exist on the back-end
servers, HTTP header-based routing is not enough. Alone, HTTP header-based routing with these older location
structures would also result in HTTP 404 error codes, as if the clients requests were effectively for:
l calendar.example.com/calendar
l inventory.example.com/inventory
l crm.example.com/crm
To compensate for the new structure on the back end, request URLs must be rewritten: FortiWeb removes the
application name prefix in the URL.
For performance reasons, FortiWeb also rewrites the Host: field. All subsequent requests from the client use
the correct host and URL and do not require any modification or HTTP-based routing. Otherwise, FortiWeb would
need to rewrite every subsequent request in the session, and analyze the HTTP headers for routing every
subsequent request in the session.
See also
In some topologies, you must configure FortiWebs use of X-headers such as X-Forwarded-For:,
X-Real-IP:, or True-Client-IP:, including when:
l FortiWeb has been deployed behind a proxy/load balancer which applies NAT. Connection-wise, this
causes all requests appear to come from the IP address of the proxy or load balancer, not the original client.
FortiWeb requires the true clients sourceIP so that when blocking attacks, it does not block the
proxy/load balancers IP, affecting innocent requests. FortiWeb also requires some way to derive the original
clients IP so that attack logs and reports to show the IP of the actual attacker, rather than misleadingly blaming the
load balancer.
l The web server needs the clients source IP address for purposes such as analytics, but FortiWeb is
operating in reverse proxy mode, which applies NAT, and therefore all requests appear to come from FortiWebs IP
address.
Due to source NAT (SNAT), a packets source address in its IP layer may have been changed, and therefore the
original address of the client may not be directly visible to FortiWeb and/or its protected web servers. During a
packets transit from the client to the web server, it could be changed several times: web proxies, load balancers,
routers, and firewalls can all apply NAT.
Depending on whether the NAT devices are HTTP-aware, the NAT device can record the packets original source
IP address in the HTTP headers. HTTP X-headers such as X-Real-IP: can be used by FortiWeb instead to
trace the original source IP (and each source IP address along the path) in request packets. They may also be
used by back-end web servers for client analysis.
Affects of source NAT at the IP and HTTP layers of request packets when in-between devices are HTTP-
aware
Client Server
For example, if your web applications need to display different available products for clients in Canada instead of
the United States, your web applications may need to analyze the original clients IP for a corresponding
geographic location.
In that case, you would enable FortiWeb to add or append to an X-Forwarded-For: or X-Real-IP:
header. Otherwise, from the web servers perspective, all IP sessions appear to be coming from FortiWeb not
from the original requester. The back-end web server would not be able to guess what the original clients public
IP was, and therefore would not be able to analyze it. When these options are enabled, the web server can
instead use this HTTP-layer header to find the public source IP and path of the IP-layer session from the original
client.
1. Go to ServerObjects> X-Forwarded-For.
2. Configure these settings:
Setting Description
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
If the HTTP client or web proxy does not provide the header, FortiWeb
adds it, using the source IP address of the connection.
This option can be useful if your web servers log or analyze clients
public IP addresses, if they support the X-Forwarded-For:
header. If they do not, disable this option to improve performance.
Setting Description
3. Click OK.
4. To apply the X-header rule, select it when configuring an inline protection profile (see Configuring a protection
profile for inline topologies on page 658).
See also
Indicating to back-end web servers that the clients request was HTTPS
Usually if your FortiWeb is receiving HTTPS requests from clients, and it is operating in reverse proxy mode,
SSL/TLS is being offloaded. FortiWeb has terminated the SSL/TLS connection and the second segment of the
request, where it forwards to the back-end servers, is clear text HTTP. In some cases, your back-end server may
need to know that the original request was, in fact, encrypted HTTPS, not HTTP.
To add an HTTP header that indicates the service used in the clients original request, go to ServerObjects> X-
Forwarded-For, then enable X-Forwarded-Proto:.
See also
Only public IPs will be used. If the original clients IP is a private network IP (e.g. 192.168.*, 172.16.*, 10.*),
FortiWeb will instead use the first public IP before or after the original clients IP in the HTTP header line.
(Whether this is counted from the left or right end of the header line depends on IP Location in X-Header.) In most
cases, this public IP will be the clients Internet gateway, and therefore blocking based on this IP may affect
innocent clients that share the attackers Internet connection. See also Shared IP on page 727.
To limit the performance impact, FortiWeb will analyze the HTTP header for the clients IP only for the first
request in the TCP/IP connection. As a result, it is not suitable for use behind load balancers that
multiplex that is, attempt to reduce total simultaneous TCP/IP connections by sending multiple, unrelated
HTTP requests from different clients within the same TCP/IP connection. Symptoms of this misconfiguration
include FortiWeb mistakenly attributing subsequent requests within the same TCP/IP connection to the IP found
in the first requests HTTP header, even though the X-header indicates that the request originated from a
different client.
After FortiWeb has traced the original source IP of the client, FortiWeb will use it in attack logs and reports so that
they reflect the true origin of the attack, not your load balancer or proxy. FortiWeb will also use the original source
IP as the basis for blocking when using some features that operate on the source IP:
l DoS prevention
l brute force login prevention
l period block
Like addresses at the IP layer, attackers can spoof and alter addresses in the HTTP
layer. Do not assume that they are 100% accurate, unless there are anti-spoofing
measures in place such as defining trusted providers of X-headers.
For example, on FortiWeb, if you provide the IP address of the proxy or load balancer, when blocking requests
and writing attack log messages or building reports, instead of using the SRC field in the IP layer of traffic as the
clients IP address (which would cause all attacks to appear to originate from the load balancer), FortiWeb can
instead find the clients real IP address in the X-Forwarded-For: HTTP header. FortiWeb could also add its
own IP address to the chain in X-Forwarded-For:, helping back-end web servers that require the original
clients source IP for purposes such as server-side analytics providing news in the clients first language or ads
relevant to their city, for example.
Like IP-layer NAT, some networks also translate addresses at the HTTP layer. In those cases, enabling Use X-
Header to Identify Original Clients IP may have no effect. To determine the name of your networks X-headers, if
any, and to see whether or not they are translated, use diagnose network sniffer in the CLI or external
packet capture software such as Wireshark.
To configure FortiWeb to obtain the packets original source IP address from an HTTP header
1. Go to ServerObjects> X-Forwarded-For.
2. Configure these settings:
Setting Description
Use X-Header to Identify If FortiWeb is deployed behind a device that applies NAT, enable this
Original Clients IP option to derive the original clients source IP address from an HTTP
X-header, instead of the SRC field in the IP layer. Then type the key
such as X-Forwarded-For or X-Real-IP, without the colon (:),
of the X-header that contains the original source IP address of the
client.
IP Location in X-Header Select whether to extract the original clients IP from either the left or
right end of the HTTP X-header line.
Most proxies put the requests origin at the left end, which is the
default setting. Some proxies, however, place it on the right end.
Block Using Original Enable to be able to block requests that violate your policies by using
Clients IP the original clients IP derived from this HTTP X-header.
When disabled, attack logs and reports will not use the original clients
IP.
3. Click OK.
4. Click Create New.
A sub-dialog appears.
5. In IP, type the IP address of the external proxy or load balancer according to packets SRC field in the IP layer
when received by FortiWeb.
To apply anti-spoofing measures and improve security, FortiWeb will trust the contents of the HTTP header
that you specified in Use X-Header to Identify Original Clients IP only if the packet arrived from one of the IP
addresses you specify here. Other packets X-headers will be regarded as potentially spoofed.
6. Click OK.
The first dialog re-appears.
See also
Before you can create a server policy, you must first configure a virtual server that defines the network interface or
bridge and IP address where traffic destined for a server pool arrives. When the FortiWeb appliance receives
traffic destined for a virtual server, it can then forward the traffic to a single web server (for Single Server server
pools) or distribute sessions/connections among servers in a server pool.
A virtual server on your FortiWeb is not the same as a virtual host on your web
server. A virtual server is more similar to a virtual IP on a FortiGate. It is not an
actual server, but simply defines the listening network interface. Unlike a
FortiGate VIP, it includes a specialized proxy that only picks up HTTP and
HTTPS.
The FortiWeb appliance identifies traffic as being destined for a specific virtual server if:
l the traffic arrives on the network interface or bridge associated with the virtual server
l for reverse proxy mode, the destination address is the IP address of a virtual server (the destination IP address is
ignored in other operation modes, except that it must not be identical to the web servers IP address)
Virtual servers can be on the same subnet as real web servers. This configuration
creates a one-arm HTTP proxy. For example, the virtual server 10.0.0.1/24 could
forward to the web server 10.0.0.2.
Each server entry includes an Enable check box, marked by default. Clear this check box if you need to
disable the server. See Enabling or disabling traffic forwarding to your servers on page 397.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Server Policy Configuration category. For details, see Permissions on page 69.
3. Complet
Name Enter a unique name that can be referenced by other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Use Interface IP Select to use the IP address of the specified network interface as the
address of the virtual server.
IPv4 Address Enter the IP address and subnet of the virtual server.
Interface Select the network interface or bridge the virtual server is bound to
and where traffic destined for the virtual server arrives.
4. Click OK.
5. To define the listening port of the virtual server, create a custom service (see Defining your network services
on page 395).
6. To use the virtual server, select both it and the custom service in a server policy (see Configuring a server
policy on page 677).
See also
l IPv6 support
l Configuring a bridge (V-zone)
Network services define the application layer protocols and port number on which your FortiWeb will listen for web
traffic.
Policies must specify either a predefined or custom network service to define which traffic the policy will match.
(Exceptions include server policies whose Deployment Mode is Offline Protection.)
See also
3. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
4. In Port, type the port number of the service (by definition of HTTP and HTTPS, only TCP is available).
The port number must be unique among your custom and predefined services. The valid range is from 0 to
65,535.
5. Click OK.
6. To use the custom service definition to define the listening port of a virtual server on the FortiWeb, select it as
the HTTP Service or HTTPS Service when configuring a policy (see Configuring a server policy on page 677).
See also
l Predefined services
l Configuring a server policy
Predefined services
Go to Server Objects> Service. The Predefined tab displays the list of predefined services.
Predefined services are according to standard IANA port numbers: TCP port 80 for HTTP and TCP port 443 for
HTTPS.
To use the predefined service definition to define the listening port of a virtual server on the FortiWeb, select it as
the HTTP Service or HTTPS Service when configuring a policy (see Configuring a server policy on page 677).
To access this part of the web UI, your administrators account access profile must have Read permission to
items in the Server Policy Configuration category. For details, see Permissions on page 69.
See also
The server pool configuration allows you to individually enable and disable FortiWebs forwarding of
HTTP/HTTPS traffic to your web servers, or place them in maintenance mode.
You can select server pools with disabled virtual servers in a server policy even though the policy cannot forward
traffic to the disabled servers.
Disabled physical and domain servers can belong to a server pool, but FortiWeb does not forward traffic to them.
By default, physical and domain servers that belong to a pool are enabled and the FortiWeb appliance can
forward traffic to them. To prevent traffic from being forwarded to a physical server, such as when the server is
unavailable for a long time due to repairs, you can disable it. If the disabled physical server is a member of a
Server Balance server pool, the FortiWeb appliance automatically forwards connections to other enabled pool
members.
If the physical or domain server is a member of a Server Balance server pool and will
be unavailable only temporarily, you can alternatively configure a server health check
to automatically prevent the FortiWeb appliance from forwarding traffic to that
physical server when it is unresponsive. For details, see Configuring server up/down
checks on page 352.
Disabling a physical or domain server could block traffic matching policies in which you
have selected the server pool of which the physical server is a member.
See also
When a FortiWeb appliance initiates or receives an SSL or TLS connection, it will use certificates. Certificates can
be used in HTTPS connections for:
l encryption
l decryption and inspection
l authentication of clients
l authentication of servers
FortiWeb may require you to provide certificates and CRLs even if your web sites
clients do not use HTTPS to connect to the web sites.
For example, when it sends alert email via SMTPS or querying an authentication
server via LDAPS or STARTTLS, FortiWeb validates the servers certificate by
comparing the server certificates CA signature with the certificates of CAs that
are known and trusted by the FortiWeb appliance. See Uploading trusted CAs
certificates on page 406 and Revoking certificates on page 449.
Depending on the FortiWeb appliances operation mode, FortiWeb can act as the SSL/TLS terminator: instead of
clients having an encrypted tunnel along the entire path to a back-end server, the clients HTTPS request is
encrypted/decrypted partway along its path to the server, when it reaches the FortiWeb. FortiWeb then is
typically configured to forward unencrypted HTTP traffic to your servers. When the server replies, the server
connects to the FortiWeb via clear text HTTP. FortiWeb then encrypts the response and forwards it via HTTPS to
the client.
In this way, FortiWeb bears the load for encryption processing instead of your back-end servers, allowing them to
focus resources on the network application itself. This is called SSLoffloading.
FortiWeb
SSL Terminator
HTTPS example.com
HTTP
CA
Client Server
When SSL offloading, the web server does not use its own server certificate. Instead, FortiWeb acts like
an SSL proxy for the web server, possessing the web servers certificate and using it to:
As a side effect of being an SSL terminator, the FortiWeb is in possession of both the HTTP request and reply in
their decrypted state. Because they are not encrypted at that point on the path, FortiWeb can rewrite content
and/or route traffic based upon the contents of Layer 7 (the application layer). Otherwise Layer 7 content-based
routing and rewriting would be impossible: that part of the packets would be encrypted and unreadable to
FortiWeb.
Secure traffic between FortiWeb and back-end servers when using SSL
offloading. Failure to do so will compromise the security of all offloaded sessions.
No attack will be apparent to clients, as SSL offloading cannot be detected by
them, and therefore they will not receive any alerts that their session has been
compromised.
For example, you might pass decrypted traffic to back-end servers as directly as
possible, through one switch that is physically located in the same locked rack,
and that has no other connections to the overall network.
However, depending on the operation mode, FortiWeb is not always an SSL terminator.
By their asynchronous nature, SSLtermination cannot be supported in transparent inspection and offline
protection modes. (To terminate, FortiWeb must process traffic synchronously with the connection state.) In
those modes, the web server uses its own certificate, and acts as its own SSL terminator. The web
server bears the load for SSL processing. FortiWeb only listens in and can interrupt the connection, but
otherwise cannot change or reroute packets.
In those modes, FortiWeb only uses the web servers certificate to decrypt traffic in order to scan it for policy
violations. If there are no violations, it allows the existing encrypted traffic to continue without interruption.
FortiWeb does not expend CPU and resources to re-encrypt, because it is not a terminator.
FortiWeb
SSL
S SL IInspector
exampl
exa mple.com
mple.c
e.com
e.c
HTTPS Sign
Si gned:
gned
gn ed:
ed
CA
exampl
exa mple.com
mpl om
example.com
Sign
Si
Signed:
gned
gn ed::
ed
CA
Client Server
Serve
er
See also
This is partially physical considerations such as restricting access to private keys and decrypted traffic (see
Offloading vs. inspection on page 399). Another part is the encryption.
A secure connections protocol version and cipher suite, including encryption bit strength and encryption
algorithms, is negotiated between the client and the SSL/TLS terminator during the handshake.
The FortiWeb operation mode determines which device is the SSL terminator. It is either:
When the web server is the terminator, it controls which ciphers are allowed (see SSL inspection cipher suites and
protocols (offline and transparent inspection) on page 405). If it selects a cipher that FortiWeb does not support,
FortiWeb cannot perform the SSL inspection task.
SSL offloading cipher suites and protocols (reverse proxy and true transparent proxy)
If you have configured SSL offloading for your FortiWeb operating in reverse proxy mode, you can specify which
protocols a server policy allows and whether the set of cipher suites it supports is medium-level security, high-
level security or a customized set. (See Configuring a server policy on page 677.) In addition, you can enable the
ChaCha-Poly1305 cipher suite support for a server policy using a CLIcommand.
In true transparent proxy mode, you can specify these same advanced SSL settings to configure offloading for a
server pool member. (See and Creating a server pool on page 359.)
Selecting the supported cipher suites using the advanced SSL settings
The SSL/TLS encryption level in the advanced SSL settings provides the following options:
TLS 1.0,
Cipher TLS 1.2 SSL 3.0
1.1
ECDHE-RSA-AES256-GCM-SHA384 Yes
ECDHE-RSA-AES256-SHA384 Yes
DHE-RSA-AES256-GCM-SHA384 Yes
DHE-RSA-AES256-SHA256 Yes
AES256-GCM-SHA384 Yes
AES256-SHA256 Yes
ECDHE-RSA-AES128-GCM-SHA256 Yes
TLS 1.0,
Cipher TLS 1.2 SSL 3.0
1.1
ECDHE-RSA-AES128-SHA256 Yes
DHE-RSA-AES128-GCM-SHA256 Yes
DHE-RSA-AES128-SHA256 Yes
AES128-GCM-SHA256 Yes
AES128-SHA256 Yes
ECDHE-ECDSA-AES256-GCM-SHA384 Yes
ECDHE-ECDSA-AES256-SHA384 Yes
ECDH-ECDSA-AES256-GCM-SHA384 Yes
ECDH-ECDSA-AES256-SHA384 Yes
ECDHE-ECDSA-AES128-GCM-SHA256 Yes
ECDHE-ECDSA-AES128-SHA256 Yes
ECDH-ECDSA-AES128-GCM-SHA256 Yes
ECDH-ECDSA-AES128-SHA256 Yes
TLS 1.0,
Cipher TLS 1.2 SSL 3.0
1.1
Generally speaking, for security reasons, SHA-1 is preferable, although you may not be able to use it for client
compatibility reasons. Avoid using:
l Enable the high-compatibility-mode setting for the config system global command.
SSL inspection cipher suites and protocols (offline and transparent inspection)
In transparent inspection and offline protection modes, if the client and server communicate using a cipher that
FortiWeb does not support, FortiWeb cannot perform the SSL inspection task.
If you are not sure which cipher suites your web server supports, you can use a client-side tool to test. See
Checking the SSL/TLS handshake & encryption on page 891.
TLS 1.0,
Cipher suite Cipher TLS 1.2 SSL 3.0
1.1
TLS_RSA_WITH_AES_256_CBC_
AES256-SHA256 Yes No No
SHA256
TLS_RSA_WITH_CAMELLIA_256_
CAMELLIA256-SHA Yes Yes Yes
CBC_SHA
TLS_RSA_WITH_AES_128_GCM_
AES128-GCM-SHA256 Yes No No
SHA256
In offline and transparent inspection mode, FortiWeb does not support Ephemeral
Diffie-Hellman key exchanges, which may be accepted by clients such as Google
Chrome.
See also
In order to authenticate other devices certificates, FortiWeb has a store of trusted CAs certificates. Until you
upload at least one CA certificate, FortiWeb does not know and trust any CAs, it cannot validate any
other client or devices certificate, and all of those secure connections will fail.
FortiWeb may require you to provide certificates and CRLs even if your web sites
clients do not use HTTPS to connect to the web sites.
For example, when sending alert email via SMTPS or querying an authentication
server via LDAPS, FortiWeb will validate the servers certificate by comparing the
server certificates CA signature with the certificates of CAs that are known and
trusted by the FortiWeb appliance.
Certificate authorities (CAs) validate and sign others certificates. When FortiWeb needs to know whether a client
or devices certificate is genuine, it will examine the CAs signature, comparing it with the copy of the CAs
certificate that you have uploaded in order to determine if they were both made using the same private key. If
they were, the CAs signature is genuine, and therefore the client or devices certificate is legitimate.
If the signing CA is not known, that CAs own certificate must likewise be signed by one or more other
intermediary CAs, until both the FortiWeb appliance and the client or device can demonstrate a signing chain that
ultimately leads to a mutually trusted (shared root) CA that they have in common. Like a direct signature by a
known CA, this proves that the certificate can be trusted. For information on how to include a signing chain, see
Uploading a server certificate on page 417.
If you are using your own private CA, download a copy from your CAs server. For example, on Windows
Server 2003, you would go to:
https://<ca-server_ipv4>/certsrv/
Verify that your private CAs certificate does not contain its private keys. Disclosure of
private keys compromises the security of your network, and will require you to revoke
and regenerate all certificates signed by that CA.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Admin Users category. For details, see Permissions on page 69.
To specify a specific CA, type an identifier in the field below the URL.
7. To test your configuration, cause your appliance to initiate a secure connection to an LDAPS server (see
Grouping remote authentication queries and certificates for administrators on page 284).
If the query fails, verify that your CA is the same one that signed the LDAP servers certificate, and that its
certificates extensions indicate that the certificate can be used to sign other certificates. Verify that both the
appliance and LDAP server support the same cipher suites and SSL/TLS protocols. Also verify that your
routers and firewalls are configured to allow the connection.
See also
1. Before you can create a CA group, you must upload at least one of the certificate authority (CA) certificates
that you want to add to the group. For details, see Uploading trusted CAs certificates on page 406.
4. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. Click OK.
6. Click Create New.
A dialog appears.
7. In ID, enter the index number of the host entry within the group, or keep the fields default value of auto to
let the FortiWeb appliance automatically assign the next available index number.
8. In CA, select the name of a certificate authoritys certificate that you previously uploaded and want to add to
the group.
9. Click OK.
10. Repeat the previous steps for each CA that you want to add to the group.
11. To apply a CA group, select it in a certificate verification rule (see Configuring FortiWeb to validate client
certificates on page 445).
See also
Whether offloading or merely inspecting for HTTPS, FortiWeb must have a copy of your protected web servers
X.509 server certificates. FortiWeb also has its own server certificate, which it uses to prove its own identity.
l For connections to the web UI The FortiWeb appliance presents its own HTTPS server certificate which is
used only for connections to the web UI.
A Fortinet factory default certificate is used as the FortiWeb appliances HTTPS server
certificate. It can be replaced with other certificates (see How to change FortiWeb's
default certificate).
l For SSL offloading or SSL inspection Server certificates do not belong to the FortiWeb appliance itself, but
instead belong to the protected web servers. FortiWeb uses the web servers certificate because it either acts as an
SSL agent for the web server, or is privy to its secure connections for the purpose of scanning. You select which one
the FortiWeb appliance uses when you configure Enable Server Name Indication (SNI) or Certificate in a policy (see
Configuring a server policy on page 677) or Certificate File in a server pool (see Uploading a server certificate on
page 417).
l For connections to back-end servers A certificate you specify in a server pool configuration if connections to
a pool member require a valid client certificate (see Creating a server pool on page 359).
System > Certificates > Local displays all X.509 server certificates that are stored locally, on the FortiWeb
appliance, for the purpose of offloading or scanning HTTPS.
Button/field Description
Generate Click to generate a certificate signing request. For details, see Generating
a certificate signing request on page 413.
View Certificate Detail Click to view the selected certificates subject, range of dates within which
the certificate is valid, version number, serial number, and extensions.
Edit Comments Click to add or modify the comment associated with the selected
certificate.
Click to mark all check boxes in the column, selecting all entries.
(No label. Check box in
column heading.) To select an individual entry, instead, mark the check box in the
entrys row.
Comments Displays the description of the certificate, if any. Click the Edit Comments
icon to add or modify the comment associated with the certificate or
certificate signing request.
FortiWeb presents a server certificate when any client requests a secure connection, including when:
If you want clients to be able to use HTTPS with your web site, but your web site does not already have a server
certificate to represent its authenticity, you must first generate a certificate signing request (see Generating a
certificate signing request on page 413). Otherwise, start with Uploading a server certificate on page 417.
See also
By default, the HSMsettings are not displayed in the web UI. Use the following command to display them:
config system global
set hsm enable
Integration of SafeNet Luna HSMwith FortiWeb requires specific configuration steps for both appliances,
including the following tasks:
l On the HSM:
l Create one or more HSM partitions for FortiWeb
l Send the FortiWeb client certificate to the HSM
l Register the FortiWeb HSM client to the partition
l Retrieve the HSMserver certificate
l On FortiWeb:
l Configure communication with the HSM, including using the server and client certificates to register
FortiWeb as a client of the HSM
l Generate a certificate signing request (CSR) that includes the HSM configuration information
l Upload the signed certificate to FortiWeb
When configure your CSR to work with an HSM, the CSR generation process creates a
private key on both the HSM and FortiWeb. The private key on the HSM is the "real"
key that secures communication when FortiWeb uses the signed certificate. The key
found on the FortiWeb is used when you upload the certificate to FortiWeb.
1. Use the partition create command to create and initialize a new HSM partition that uses password
authentication. This is the partition FortiWeb uses on the HSM.
You can create more than one partition for FortiWeb to use, but all the partitions are assigned the same
client.
2. Use the SCP utility and the following command to send the FortiWeb client certificate to the HSM.
scp <fortiweb_ip>.pem admin@<hsm_ip>:
3. Using SSH, connect to the HSM using the admin account, and then use the following command to register a
client for FortiWeb on the HSM.
lunash:> client register -c <client_name> -ip <fortiweb_ip>
4. Use the following command to assign the client you registered to the partition you created earlier:
lunash:> client assignPartition -client <client_name> -partition <partition_name>
5. Repeat the client assignment process for any additional partitions your created for FortiWeb.
6. Use the SCP utility and the following command to retrieve the server certificate file from the HSM:
scp <hsm_username>@<hsm_ip>:server.pem /usr/lunasa/bin/server_<hsm_ip>.pem
7. Go to System > Config > HSM and complete the following settings:
Port Enter the port where FortiWeb establishes an NTLS connection with the
HSM. The default is 1792.
Timeout Enter a timeout value for the connection between HSMand FortiWeb.
Upload Server Certificate Click Choose File and navigate to the server certificate file you retrieved
File earlier.
Download Client Certificate Click Download to retrieve the client certificate file you sent to HSMearlier
File to make it available for the registration process.
Partition Name Enter the name of a partition that the FortiWeb HSM client is assigned to.
9. Repeat the partition configuration step for any additional partitions that FortiWeb uses.
10. Go to Certificate > Local and click Generate to generate a certificate signing request that references the
HSMconnection and partition.
11. After the HSM-based certificate is signed, go to Certificate > Local and click Import to import it.
See Uploading a server certificate on page 417.
12. To use a certificate, you select it in a policy or server pool configuration (see Configuring a server policy on
page 677 or Creating a server pool on page 359).
If your CA does not provide this, or if you have your own private CA such as a Linux server with OpenSSL, you can
use the appliance to generate a CSR and private key. Then, you can submit this CSR for verification and signing
by the CA.
2. Click Generate.
A dialog appears.
Certification Name Enter a unique name for the certificate request, such as
www.example.com. This can be the name of your web site.
Subject Information Includes information that the certificate is required to contain in order to
uniquely identify the FortiWeb appliance. This area varies depending on
the ID Type selection.
ID Type Select the type of identifier to use in the certificate to identify the
FortiWeb appliance:
The IP address should be the one that is visible to clients. Usually, this
should be its public IP address on the Internet, or a virtual IP that you
use NAT to map to the appliances IP address on your private network.
Domain Name Type the fully qualified domain name (FQDN) of the FortiWeb
appliance, such as www.example.com.
E-mail Type the email address of the owner of the FortiWeb appliance, such
as [email protected].
Optional Information Includes information that you may include in the certificate, but which is not
required.
Organization unit Type the name of your organizational unit (OU), such as the name of
your department. This is optional.
To enter more than one OU name, click the + icon, and enter each OU
separately in each field.
Locality(City) Type the name of the city or town where the FortiWeb appliance is located.
This is optional.
State/Province Type the name of the state or province where the FortiWeb appliance is
located. This is optional.
Country/Region Select the name of the country where the FortiWeb appliance is located.
This is optional.
e-mail Type an email address that may be used for contact purposes, such
as [email protected].
This is optional.
Key Type Displays the type of algorithm used to generate the key.
Key Size Select a secure key size of 1024Bit, 1536Bit or 2048Bit. Larger keys are
slower to generate, but provide better security.
HSM Select if the private key for the connections is provided by an HSM instead
of FortiWeb.
Available only if you have enabled HSM settings using the config
system global command.
For more information, see Using session keys provided by an HSM on page
411.
Partition Name Enter the name of a partition where the private key for this certificate is
located on the HSM.
l File Based You must manually download and submit the resulting
certificate request file to a certificate authority (CA) for signing. Once
signed, upload the local certificate.
l Online SCEP The FortiWeb appliance will automatically use HTTP to
submit the request to the simple certificate enrollment protocol (SCEP)
server of a CA, which will validate and sign the certificate. For this
selection, two options appear. Enter the CA Server URL and the
Challenge Password.
4. Click OK.
The FortiWeb appliance creates a private and public key pair. The generated request includes the public key
of the FortiWeb appliance and information such as the FortiWeb appliances IP address, domain name, or
email address. The FortiWeb appliances private key remains confidential on the FortiWeb appliance. The
Status column of the entry is PENDING.
If you configured your CSR to work with the FortiWeb HSM configuration, the CSRgeneration process creates
a private key both on the HSM and on FortiWeb. The private key on the HSM is used to secure
communication when FortiWeb uses the certificate. The FortiWeb private key is used when you upload the
certificate to FortiWeb.
8. If you are not using a commercial CA whose root certificate is already installed by default on web browsers,
download your CAs root certificate, then install it on all computers that will be connecting to your appliance.
(If you do not install these, those computers may not trust your new certificate.)
9. When you receive the signed certificate from the CA, upload the certificate to the FortiWeb appliance (see
Uploading a server certificate on page 417).
l Base64-encoded
l PKCS #12 RSA-encrypted
X.509 server certificates and private keys to the FortiWeb appliance.
If a server certificate is signed by an intermediate certificate authority (CA) rather than a root CA, before clients
will trust the server certificate, you must demonstrate a link with root CAs that the clients trust, thereby proving
that the server certificate is genuine. You can demonstrate this chain of trust either by:
To append a signing chain in the certificate itself, before uploading the server certificate to the FortiWeb
appliance
For example, a servers certificate that includes a signing chain might use the following structure:
-----BEGIN CERTIFICATE-----
<server certificate>
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
<certificate of intermediate CA 1, who signed the server certificate>
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
<certificate of intermediate CA 2, who signed the certificate of intermediate CA 1 and
whose certificate was signed by a trusted root CA>
-----END CERTIFICATE-----
3. Save the certificate.
To upload a certificate
The total file size of all certificates, private keys, and any other uploaded files may not
exceed 12MB.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Admin Users category. For details, see Permissions on page 69.
2. Click Import.
A dialog appears.
HSM Select if you configured the CSR for this certificate to work with an
integrated HSM.
Available only if you have enabled HSM settings using the config
system global command.
For more information, see Using session keys provided by an HSM on page
411.
Partition Name Enter the name of the HSM partition you selected when you created the
CSR for this certificate.
Certificate file Click Browse to locate the certificate file that you want to upload.
Key file Click Browse to locate the key file that you want to upload with the
certificate.
Certificate with key file Click Browse to locate the PKCS #12 certificate-with-key file that you
want to upload.
Password Type the password that was used to encrypt the file, enabling the
FortiWeb appliance to decrypt and install the certificate.
4. Click OK.
5. To use a certificate, you must select it in a policy or server pool configuration (see Configuring a server policy
on page 677 or Creating a server pool on page 359).
See also
If you did not append the signing chain inside the server certificate itself, you must configure the FortiWeb
appliance to provide the certificates of intermediate CAs when it presents the server certificate.
The total file size of all certificates, private keys, and any other uploaded files may not
exceed 12MB.
You can click View Certificate Detail to view the selected certificates subject, range of dates within which
the certificate is valid, version number, serial number, and extensions (purposes).
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Admin Users category. For details, see Permissions on page 69.
To specify a specific certificate authority, enter an identifier in the field below the URL.
7. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
8. Click OK.
9. Click Create New.
A dialog appears.
10. In ID, type the index number of the host entry within the group, or keep the fields default value of auto to let
the FortiWeb appliance automatically assign the next available index number.
11. In CA, select the name of an intermediary CAs certificate that you previously uploaded and want to add to
the group.
The FortiWeb appliance will present both the servers certificate and those of the intermediate CAs when
establishing a secure connection with the client.
See also
You can select a SNI configuration in a server policy only when FortiWeb is operating in reverse proxy mode and
an HTTPS configuration is applied to the policy.
Not all web browsers support SNI. Go to the following location for a list of web browsers that support SNI:
http://en.wikipedia.org/wiki/Server_Name_Indication#Browsers_with_support_for_TLS_server_name_
indication.5B10.5D
4. Click OK.
5. Click Create New and configure these settings:
Domain Type Select Simple String to match a domain to certificates using a literal
domain specified in Domain, or select Regular Expression to match
multiple domains to certificates using a regular expression specified in
Domain.
Domain Specify the domain of the secure website (HTTPS) that uses the
certificate specified by Local Certificate. Enter a literal domain if
Simple String is selected in Domain Type, or enter a regular
expression if Regular Expression is selected.
After you fill in the field with a regular expression, you can fine-tune
the expression in a Regular Expression Validator by clicking the >>
button on the side (see Regular expression syntax).
Local Certificate Select the server certificate that FortiWeb uses to encrypt or decrypt SSL-
secured connections for the web site specified by Domain. For more
information, see Uploading a server certificate on page 417.
Intermediate CA Group Select the name of a group of intermediate certificate authority (CA)
certificates, if any, that FortiWeb presents to validate the CA
signature of the certificate specified by Local Certificate.
Certificate Verify Select the name of a certificate verifier, if any, that FortiWeb uses
when an HTTP client presents its personal certificate to the web site
specified by Domain. (If you do not select one, the client is not
required to present a personal certificate. See also How to apply PKI
client authentication (personal certificates) on page 425.)
6. Click OK.
7. Repeat the member creation steps to add additional domains and the certificate and verifier associated with
them to the SNI configuration. A SNI configuration can have up to 256 entries.
8. To use a SNI configuration, you select it in a server policy (see Configuring a server policy on page 677).
See also
Most users are unaware of protocols and security. Even if your web sites offer secure services, users will still try to
access web sites using HTTP.
As a result, for practical reasons, usually you must offer at least an HTTP service that redirects requests to
HTTPS. Even then, if a man-in-the-middle attacker or CRL causes a certificate validation error, many users will
incorrectly assume it is harmless, and click through the alert dialog to access the web site anyway sometimes
called click-through insecurity. The resulting unsecured connection exposes sensitive data and their login
credentials.
Newer versions of major browsers such as Mozilla Firefox and Google Chrome have a built-in list of frequently
attacked web sites such as gmail.com and twitter.com. The browser will only allow them to be accessed via
HTTPS. This prevents users from ever accidentally exposing sensitive data via clear text HTTP. Additionally, the
browser will not show click-through certificate validation error dialogs to the user, preventing them from ignoring
and bypassing fatal security errors.
Similarly, you can also force clients to use only HTTPS when connecting to your web sites. To do this, when
FortiWeb is performing SSL/TLS offloading, configure it include the RFC 6797 strict transport security header. All
compliant clients will require access to that domain name to
1. If you want to redirect clients that initially attempt to use HTTP, configure an HTTP-to-HTTPS redirect. See
Example: HTTP-to-HTTPS redirect on page 519 and Rewriting & redirecting on page 510.
2. When configuring the server policy, enable Add HSTS Header and configure Max. Age.
See also
l Indicating to back-end web servers that the clients request was HTTPS
If your clients will connect to your web sites using HTTPS, you can configure FortiWeb to require clients to
present a personal certificate during the handshake in order to confirm their identities. This is sometimes called
public key infrastructure (PKI) authentication (RFC 5280).
Because FortiWeb presents its own server certificate to the client before requesting one from the client, all PKI
authentication with FortiWeb is actually mutual (2-way) authentication.
PKI authentication is an alternative to traditional password-based authentication. The traditional method is based
on what you know a password used for authentication. PKI authentication is based on what you have a
key related to the certificate bound to only one person. PKI authentication may be preferable for devices where it
is onerous for the person to type a password, such as an Android or iPhone smart phone.
A known weakness of traditional password based authentication is the vulnerability to password guessing or brute
force attack. Despite your admonitions, many users will still choose weak passwords either because they do not
understand what makes a password strong, because they do not understand the risks that it poses to the
organization, or because they cannot remember a randomized password.
PKI authentication is far more resilient to brute force attacks, and does not require end-users to remember
anything, so it is stronger than a password.
For even stronger authentication, you can combine PKI authentication with HTTP or
form-based authentication. For more information, see Authentication styles on page
291.
Bilateral authentication
Matches
CA
Signed:
Client
Root
example.com
Signed:
CA
Signed:
CA
CA
Signed:
Root
Matches
PKI authentication relies on these factors to strongly confirm identity:
l Sole private key possession Like with all X.509 certificates, a clients identity can only be irrefutably
confirmed if no one else except that person has that certificates private key.
The private key is a randomized string of text that has a hard-to-guess relationship with its corresponding public
key. As such, it features cryptographic protection that passwords lack: passwords do not necessarily have a
verifiable, computable relationship with anything. However, like a password, a private keys strength depends on
it remaining a secret.
Public key
sent to others
with certificate
when authenticating
Client
Cl
lie
ent
Signed:
igned:
CA
Private key
kept secret
Provide the clients private keys only to that specific client, and transmit and store any
backups securely, just as you would for passwords. Failure to store them securely and
restrict the private key solely to its intended end-user could allow others to
authenticate as that person, compromising the security of your web sites. (i.e., It
damages the property of non-repudiation.) In the event of potential private key
compromise, immediately revoke the corresponding personal certificate. See
Revoking certificates on page 449.
l Asymmetric encryption Public key encryption is a type of asymmetric encryption: it is based upon two keys
that are different but exactly paired mathematical complements.
Only the private key can decrypt data that was encrypted by its public key. The inverse is also true: only the
publickey can decrypt data that was encrypted by its private key. This is true, for example, in the RSA
cryptographic algorithm.
RSA algorithm
SSL3.0 or TLS 1.0 is required. During an SSL or TLS handshake, the client and server (in this case, FortiWeb)
negotiate which of their supported cryptographic algorithms to use, and exchange certificate(s). After the server
receives the clients certificate with its public key, the client encrypts subsequent communications using its private
key. As a result, if the server can decrypt messages using the public key, it knows that they originate from the
originally connecting client who has the related private key, not an intercepting host (i.e. a man-in-the-middle
attack).
Encrypted transmissions can contain a message authentication checksum (MAC) to verify that the message was
not altered during transmission by an interceptor.
l Digital signatures Public keys are also used as signatures. Similar to an encrypted message, as long as
the private key is possessed by only one individual, any signature generated from it is also guaranteed to come
only from that client. The client will sign a certificate with its matching public key.
Because certificate authorities (CA) sign applicants certificates, third parties who have that CAs certificate
can also confirm that that CA certified the applicants identity, and the certificate was not forged.
l Chain of trust What if a device does not know the CA that signed the connecting partys certificate? Since
there are many CAs, this is a common scenario.
The solution is to have a root CA in common between the two connecting parties, a friend of a friend.
If a root CA is trusted to be genuine and to sign only certificates where it has verified the applicants identity,
then by induction, all sub-CAs certificates that the root CA has verifiably signed will also be trusted as
genuine. Hence, if a client or servers certificate can prove that it is either indirectly (through an intermediary
CA signed by the root CA) or directly signed by the trusted root CA, that client/servers certificate will be trusted
as genuine.
1. Obtain a personal certificate for the client, and its private key, from a CA.
Steps vary by the CA. Personal certificates can be purchased or downloaded from either commercial CAs such
as VeriSign, Thawte, or Comodo, or your organizations own private CA, such as a Linux server where you use
OpenSSL or a Mac OS X server where you have set up a CA in Keychain Access. For information on certificate
requirements such as extended attributes, see Configuring FortiWeb to validate client certificates on page
445.
For a private CA example, see Example: Generating & downloading a personal certificate from
MicrosoftWindows2003Server on page 429.
2. Download the CAs certificate, which contains its public key and therefore can verify any personal certificate
that the CA has signed.
For a private CA example, see Example: Downloading the CAs certificate from
MicrosoftWindows2003Server on page 437.
If you purchased personal certificates from CAs such as VeriSign, Thawte, or Comodo, you should not need to
download the certificate: simply export those CAs certificates from your browsers own trust store, similar to
To export and transmit a personal certificate from the trust store on MicrosoftWindows7 on page 432, then
upload them to the FortiWeb (see Uploading trusted CAs certificates on page 406).
3. Install the personal certificate with its private key on the client.
Steps vary by the clients operating system and web browser. If the client uses Microsoft Windows 7, see
Example: Importing the personal certificate & private key to a clients truststore on MicrosoftWindows7 on
page 438.
4. Upload the CAs certificate to the FortiWebs trust store (see Uploading the CAs certificate to FortiWebs
trusted CA store on page 445).
5. If you have a certificate revocation list, configure FortiWeb with it (see Revoking certificates on page 449).
6. Depending on the FortiWebs current operation mode, configure either a server policy or server pool to
consider CA certificates and CRLs when verifying client certificates (see Configuring FortiWeb to validate
client certificates on page 445).
As part of signing the certificate, the CA will send the finished personal certificate to your web browser. As a
result, when you are finished generating, you must export the certificates from your computers trust store in order
to deploy the certificates to clients.
3. Log in as Administrator.
Other accounts may not have sufficient privileges. The Microsoft Certificate Services home page for your
servers CA should appear.
7. In the Certificate Template drop-down list, select the Client Authentication template (or a template that you
have created for the purpose using Microsoft Management Console (MMC)).
8. In the Name field, type the name the end-user on behalf of which the client certificate request is being made.
This will be the Subject: field in the certificate. Other fields are optional.
9. Click Submit.
The certificate signing request (CSR) is submitted to the CA.
10. If a message appears, warning you that the web site is requesting a new certificate on your behalf, click Yes
to proceed.
Once the CA server generates the requested certificate, the Certificate Issued window appears.
Transmit and store any private key backups securely, just as you would for passwords.
Failure to store them securely and restrict the private key solely to its intended end-
user could allow others to authenticate as that person, compromising the security of
your web sites. In the event of potential private key compromise, immediately revoke
the corresponding personal certificate. See Revoking certificates on page 449.
12. If a message appears, warning you that the web site is adding one or more certificates to your computer, click
Yes to proceed.
The Certificate Installed window appears.
13. Return to the Microsoft Certificate Services (MSCS) home page for your local CA and repeat step 4
through step 12 for each end-user that will use PKI authentication.
To export and transmit a personal certificate from the trust store on MicrosoftWindows7
7. Click Next.
The Export Private Key step appears.
Transmit and store any private key backups securely, just as you would for passwords.
Failure to store them securely and restrict the private key solely to its intended end-
user could allow others to authenticate as that person, compromising the security of
your web sites. In the event of potential private key compromise, immediately revoke
the corresponding personal certificate. See Revoking certificates on page 449.
9. Click Next.
The Export File Format step appears.
10. Select Personal Information Exchange - PKCS #12 (.PFX) as the file format.
11. If you need to absolutely guarantee identity (i.e. not even you, the administrator, will have the end-users
private key installed only the end-user will), mark the check box named Delete the private key if the
export is successful.
For improved performance, do not include all CA certificates from the personal certificates certification path
(i.e. the chain of trust or signing chain). Including the signing chain increases the size of the certificate, which
slightly increases the amount of time and traffic volume required to transmit the certificate each time to
FortiWeb. Instead, upload those CAs certificates to the FortiWeb appliance (see Uploading trusted CAs
certificates on page 406).
12.Click Next.
The Password step appears.
13. Enter and confirm the spelling of the password that will be used to password-protect and encrypt the exported
certificate and its private key.
15. In File name, enter a unique file name for the certificate, then click Browse to specify the location where you
want to save the exported certificate and private key.
Use a consistent naming convention. This will minimize the likelihood that you confuse one persons private
key with anothers, deliver it to the wrong person, and therefore need to revoke the corresponding certificate
and generate a new one.
The certificate and private key are exported in a single file with a .pfx file extension to the location specified in
step In File name, enter a unique file name for the certificate, then click Browse to specify the location where
you want to save the exported certificate and private key..
Only provide the clients private key to that specific client, and transmit and store any
backups securely, just as you would for passwords. Failure to store it securely and
restrict the private key solely to its intended end-user could allow others to
authenticate as that person, compromising the security of your web sites. In the event
of potential private key compromise, immediately revoke the corresponding personal
certificate. See Revoking certificates on page 449.
For example, you could give him or her a USB key in person and instruct the end-user to double-click the file,
or install the .pfx in a Microsoft Active Directory roaming profile. See also Example: Importing the personal
certificate & private key to a clients truststore on MicrosoftWindows7 on page 438.
3. Log in as Administrator.
Other accounts may not have sufficient privileges. The Microsoft Certificate Services home page for your
servers CA should appear.
Example: Importing the personal certificate & private key to a clients truststore on
MicrosoftWindows7
If you need to import one or two certificates to a persons computer on his or her behalf, you can manually import
the .pfx file.
If you are importing a clients personal certificates to their computers on their behalf,
for mass distribution, it may save you time to instead deploy certificates via a script or,
if the computer is a member of a Microsoft Active Directory domain, a login script or
roaming profile.
To harden security, you should also make sure that the browsers settings are
configured to check servers certificates (such as FortiWebs) with a CRL in case the
servers certificates become compromised, and must be revoked.
Methods for importing a certificate to the trust store vary by the clients browser and operating system. In this
section are methods for some popular browsers. For other browsers and operating systems, consult the clients
browser documentation.
2. Go to Tools[gearicon]> Internetoptions.
The Internet Options dialog window appears.
5. Click Import.
The Certificate Import Wizard appears.
6. Click Next.
The File to Import step appears.
7. If you double-clicked the certificate and private key file to start the wizard, the file is already specified in File
name.
Otherwise, click Browse. Go to the location where you downloaded the personal certificate. From Files of
type, select Personal Information Exchange (*.pfx, *.p12), All Files (*.*), or whatever file format was
used to export the certificate. Finally, select the certificate file, and click Open.
8. Click Next.
The Password step appears.
9. In Password, type the password that was used to secure the private key. (If the certificate was made on your
behalf by an administrator, this is the password that the administrator used when exporting your .pfx file. He
or she must provide this password to you.)
Place all certificates in the following store Click the Browse button to manually indicate your personal
certificate store.
The Check for server certificate revocation option will not take effect until you
restart the browser.
The dialog for configuring Google Chrome settings appears. On the left hand navigation menu, the Settings
section is selected.
3. At the bottom of the page, click Show advanced settings to reveal additional settings, including, towards
the bottom of the page, HTTP/SSL.
Importing a personal certificate in Google Chrome [Wrench icon]> Options> UndertheHood, click
ManageCertificates, then click Import
l upload the certificates of the signing CA and all intermediary CAs to FortiWebs store of CA certificates (see
Uploading trusted CAs certificates on page 406)
l in all personal certificates, include the full signing chain up to a CA that FortiWeb knows in order to prove that the
clients certificates should be trusted
l be signed by a certificate authority (CA) whose certificate you have imported into the FortiWeb appliance (see
Uploading trusted CAs certificates on page 406);
l contain a CA field whose value matches a CAs certificate
l contain an Issuer field whose value matches the Subject field in a CAs certificate
If the client presents an invalid certificate during PKI authentication for HTTPS, the FortiWeb appliance will not
allow the connection.
Certificate validation rules (in the web UI, these are called certificate verification rules) tell FortiWeb which set of
CA certificates to use when it validates personal certificates. They also specify a CRL, if any, if the clients
certificate must be checked for revocation.
Alternatively, if you have enabled SNI in a server policy or server pool, FortiWeb uses the set of CA certificates
specified in the SNI configuration that matches the client request to validate personal certificates.
If you configure the URL-based client certificate feature in a server policy orgroup, the rules in the specified URL-
based client certificate group determine whether a client is required to present a personal certificate.
1. Before you can configure a certificate validation rule, you must first configure a CA group (see Grouping
trusted CAs certificates on page 408). You may also need to upload a CRL file (see Revoking certificates on
page 449) if you need to explicitly revoke some invalid or compromised certificates.
Name Type a name that can be referenced in other parts of the configuration. Do
not use spaces or special characters. The maximum length is 35
characters.
CA Group Select the name of an existing CA group that you want to use to
authenticate client certificates. See Grouping trusted CAs certificates on
page 408.
CRL Select the name of an existing certificate revocation list, if any, to use to
verify the revocation status of client certificates. See Revoking certificates
on page 449.
5. Click OK.
6. To apply a certificate verification rule, do one of the following:
l Select it for Certificate Verification in a server policy or server pool cofiguration that includes HTTPS service.
For details, see Configuring a server policy on page 677 or Creating a server pool on page 359.
l Select it for Certificate Verify in an SNIconfiguration. See Allowing FortiWeb to support multiple server
certificates on page 423.
When a client connects to the web site, after FortiWeb presents its own server certificate, it will request one
from the client.The web browser should display a prompt, allowing the person to indicate which personal
certificate he or she wants to present.
If the connection fails when you have selected a certificate verifier, verify that the
certificate meets the web browsers requirements. Web browsers may have their
own certificate validation requirements in addition to FortiWeb's requirements.
For example, personal certificates for client authentication may be required to
either:
When a PKI authentication attempt fails, if you have enabled logging, attack log messages will be recorded.
Messages vary by the cause of the error. Common messages are:
X509 Error 20 - Issuer certificate could not be found (FortiWeb does not have the
certificate of the CA that signed the personal certificate, and therefore cannot verify the personal certificate;
see Uploading trusted CAs certificates on page 406)
X509 Error 52 - Get client certificate failed (the client did not present its personal
certificate to FortiWeb, which could be caused by the client not having its personal certificate properly
installed; see How to apply PKI client authentication (personal certificates) on page 425)
X509 Error 53 - Protocol error (various causes, but could be due to the client and FortiWeb
having no mutually understood cipher suite or protocol version during the SSL/TLS handshake)
See also
Alternatively, you can configure the URL-based client certificate feature in a server policy or server pool, which
allows you to require a certificate for some requests and not for others. Whether a client is required to present a
personal certificate or not is based on the requested URL and the rules you specify in the URL-based client
certificate group.
A URL-based client certificate group specifies the URLs to match and whether the matched request is required to
present a certificate or exempt from presenting a certificate.
When the URL-based client certificate feature is enabled, clients are not required to present a certificate if the
request URL is specified as exempt in the URL-based client certificate group rule or URL of the request does not
match a rule.
When the URL of a client request matches this value and Match is
selected, FortiWeb requires the client to present a private certificate.
Match Specifies whether client requests with the URL specified by URL are
required to present a personal certificate.
If this option is not selected, client requests with the URL specified by
URL are not required to present a personal certificate.
6. Repeat the URL certificate member creation steps for any other URLs you require.
Revoking certificates
To ensure that your FortiWeb appliance validates only certificates that have not been revoked, you should
periodically upload a current certificate revocation list (CRL), which may be provided by certificate authorities
(CA).
5. To use the CRL for client PKI authentication, select the CRL in a certificate verification rule (see Configuring
FortiWeb to validate client certificates on page 445).
Because FortiWeb requires your X.509 certificates to protect HTTPS transactions, when you back up your
FortiWeb configuration, make sure that you select a backup type that includes the certificates. If the FortiWeb
hardware fails, having backed-up certificates minimizes the time required to reconfigure a replacement
appliance.
To further guarantee service uptime from the perspective of your clients, deploy your
FortiWeb in HA. See Configuring a high availability (HA) FortiWeb cluster on page
130.
For information on the different backup methods and the backup options that include certificates, see Backups on
page 270.
The FortiWeb appliance presents its own HTTPS server certificate for secure connections (HTTPS) to the web
UI. By default, A Fortinet factory certificate is used as the certificate (see How to offload or inspect HTTPS). To
replace it with other certificates, here are the steps:
1. Go to System> Admin> Certificates and select the Admin Cert Local tab.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the Admin Users category. For details, see Permissions on page 69.
2. You can click View Certificate Detail to view the selected certificates subject, range of dates within which
the certificate is valid, version number, serial number, and extensions.
3. You can click Edit Comments to make a comment to the selected certificate.
4. To upload a certificate for replacing the Fortinet factory default certificate, click Import and configure the
following settings:
Type Select type of the certificate you are uploading, PKCS12 Certificate or
Certificate.
Certificate with key file Select the certificate with key file from your local computer, if Type is
specified as PKCS12 Certificate.
Certificate file Select the certificate file from your local computer, if Type is specified as
Certificate
Key file Select the key file from your local computer, if Type is specified as
Certificate
5. Click OK.
6. Go to System > Admin > Settings, select the certificate from HTTPS Server Certificate (see Global web
UI & CLI settings).
OCSP stapling is an improved approach to OCSP (Online Certificate Status Protocol) for verifying the revocation
status of a certificate. Instead of querying the OCSP responder for the revocation status of a server's certificate
on the browser, OCSP stapling allows the server to pre-fetch the revocation status of its certificate and deliver it
to the browser during the SSL/TLS handshake.
When OCSP stapling is enabled, FortiWeb periodically fetches the revocation status of the specified certificate
(the Vserver's certificate) from the OCSP responder and caches the response for a period if the revocation status
is contained in the response. This cached response is then delivered with the certificate during the SSL/TLS
handshake when a client attempts to establish SSL/TLS connections with the Vserver.
1. Go to System > Certificates > Remote andselect an existing policy or create a new one.
2. Configure the following settings:
Settings Descriptions
Select the CA certificate of the server certificate to be queried. For details, see
CA Certificate
Uploading trusted CAs certificates.
Type a description of the server OCSP stapling. The maximum length is 199
Comments
characters.
Because OCSP Stapling is supported only in Reverse Proxy mode for only
the certificates specified in server policies, SSL/TLS connections to the
FortiWebWebUI are not included.
Access control
You can control clients access to your web applications and limit the rate of requests. There are multiple ways to
do this, depending on whether your goal is to act based upon the URL, the clients source IP, or something more
complex.
See also
l Sequence of scans
l Preventing brute force logins
l Enforcing page order that follows application logic
l Specifying URLs allowed to initiate sessions
l Specifying allowed HTTP methods
You can configure rules that define which HTTP requests FortiWeb accepts or denies based on their Host:
name and URL, as well as the origin of the request.
Typically, for example, access to administrative panels for your web application should only be allowed if the
clients source IP address is an administrators computer on your private management network. Unauthenticated
access from unknown locations increases risk of compromise. Best practice dictates that such risk should be
minimized.
X-header-derived client source IPs (see Defining your proxies, clients, & X-headers on
page 386) do not support this feature in this release. If FortiWeb is deployed behind a
load balancer or other web proxy that applies source NAT, this feature does not work.
URL access rules are evaluated after some other rules. As a result, permitted access
can still be denied if it violates one of the rules that execute prior in the sequence. For
details, see Sequence of scans on page 35.
You can use SNMP traps to notify you when a URL access rule is enforced. For details, see SNMP traps & queries
on page 785.
A dialog appears.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Host Status Enable to require that the Host: field of the HTTP request match a
protected host names entry in order to match the URL access rule. Also
configure Host.
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match the URL access rule.
Action Select the action that FortiWeb takes when it detects a violation of
the rule. Supported options vary (available options are listed in the
description for each specific rule), but may include:
l Alert & Deny Block the request (reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the
client with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: If you will use this rule set with auto-learning, you should
select Pass or Continue. If Action is Alert & Deny, or any other
option that causes the FortiWeb appliance to terminate or modify
the request or reply when it detects an attack attempt, the
interruption will cause incomplete session information for auto-
learning.
Severity When rule violations are recorded in the attack log, each log
message contains a Severity Level (severity_level) field.
Select which severity level the FortiWeb appliance will use when it
logs a violation of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Action Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See
Viewing log messages on page 768.
4. Click OK.
5. Click Create New to add a new URL access condition entry to the set.
A dialog appears.
ID Type the index number of the individual rule within the URL access rule, or keep the fields
default value of auto to let the FortiWeb appliance automatically assign the next available
index number.
Source Enable to add the clients source IP address as a criteria for matching the URL access rule.
Address Also configure Source Address Type Source Domain.
Type Select the type of IP address FortiWeb retrieves from the DNS lookup of the domain
specified by IP Resolved by Specified Domain.
IP Resolved Enter the domain to match the client source IP after DNS lookup.
by Specified
Domain Available only if Source Address Type is IP Resolved by Specified Domain.
Source Specify whether the Source Domain field contains a literal domain (Simple String)
Domain Type or a regular expression designed to match multiple URLs (Regular Expression).
When you finish typing the regular expression, click the >> (test) icon. This opens the
Regular Expression Validator window where you can fine-tune the expression (see
Regular expression syntax on page 918).
URL Type Select whether the URL Pattern field will contain a literal URL (Simple String), or a
regular expression designed to match multiple URLs (Regular Expression).
l the literal URL, such as /admin.php. The URL must begin with a slash (/).
l a regular expression.
For example, the URL is:
/send/?packet=1&token=41
Use the following expression to match the exact, full URL, with both parameters set to
any number:
^\/send\/\?packet=[0-9]+\&token=[0-9]+
To match the exact, full URL when the values of the parameters are between 0 and
999,999:
^\/send\/\?packet=[0-9]{1,6}\&token=[0-9]{1,6}
To match the root path regardless of appended parameters and without regard to
order:
^\/send\/
The pattern does not require a slash (/). However, it must at least match URLs that
begin with a slash, such as /admin.cfm.
When you finish typing the regular expression, click the >> (test) icon. This opens the
Regular Expression Validator window where you can fine-tune the expression (see
Regular expression syntax on page 918).
Meet this Select whether the access condition is met when the HTTP request matches both the
condition if: regular expression (or text string) and source IP address of the client, or when it does not
match the regular expression (or text string) and/or source IP address of the client.
7. Click OK.
8. Repeat the previous steps for each individual condition that you want to add to the URL access rule.
9. Go to WebProtection> Access> URLAccess.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
11. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
14. From the Access Rule Name drop-down list, select the name of a URL access rule to include in the policy.
To view or change the information associated with the rule, select the Detail link. The URL Access Rule
dialog appears. Use the browser Back button to return.
17. To apply the URL access policy, select it in an inline or offline protection profile (see Configuring a protection
profile for inline topologies on page 658 or Configuring a protection profile for an out-of-band topology or
asynchronous mode of operation on page 669).
Attack log messages contain URL Access Violation when this feature detects a suspicious HTTP
request.
See also
What if you want to allow a web crawler, but only if it is not too demanding, and comes from a source IP that is
known to be legitimate for that crawler? What if you want to allow only a client that is a senior managers IP, and
only if it hasnt been infected by malware whose access rate is contributing to a DoS?
Advanced access control rules provide a degree of flexibility for these types of complex conditions. You can
combine any or all of these criteria:
l Source IP
l User
l rate limit (including rate limiting for specific types of content)
l HTTP header or response code
l URL
l predefined or custom attack or data leak signature violation
l transaction or packet interval timeout
l real browser enforcement
You use the rule's filters to specify all criteria that you require allowed traffic to match.
The filters apply to request traffic only, with the following exceptions:
3. If you are cloning a predefined rule, enter a name for your new rule, and then click OK. To edit or review the
rule settings, select the rule, and then click Edit.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is Medium.
Trigger Action Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
Real Browser Enforcement Specifies whether FortiWeb returns a JavaScript to the client to test
whether it is a web browser or automated tool when it meets any of the
specified conditions. If the client fails the test or does not return results
before the Validation Timeout expires, FortiWeb applies the Action. If the
client appears to be a web browser, FortiWeb allows the client to exceed
the action. See also Bot analysis on page 813.
Validation Timeout Enter the maximum amount of time that FortiWeb waits for results from
the client for Real Browser Enforcement.
5. Click OK.
6. Click Create New to add an entry to the set.
A dialog appears.
7. From Filter Type, select one of the following conditions that a request must match in order to be allowed,
then click OK.
The Filter Type value determines which settings are displayed in the next dialog box.
l Source IPv4/IPv6 Type the IP address of a client that is allowed. Depending on your configuration of
how FortiWeb derives the clients IP (see Defining your proxies, clients, & X-headers on page 386), this
may be the IP address that is indicated in an HTTP header rather than the IP header.
To enter an address range, enter the first and last address in the range separated by a hyphen. For
example, for an IPv4 address, enter 1.2.3.4-1.2.3.40. For an IPv6 address, enter 2001::1-
2001::100.
l User Enter a user name to match, and then specify whether the condition matches if the request
contains the specified user name or matches only for user names other than the specified one.
Note: This type of filter requires you to select a user tracking policy in any protection profile that uses this
advanced access policy. See Tracking users on page 341.
l URL Type a regular expression that matches one or more URLs, such as /index\.jsp. Do not include
the host name.
To accept requests that do not match the URL, do not precede the URL with an
exclamation mark(!). Use the CLI to configure the reverse-match {no|
yes} setting for this filter. For details, see the FortiWeb CLI Reference.
l HTTP Header Indicate a single HTTP Header Name such as Host:,and all or part of its value in
Header Value. The request matches the condition if that header contains your exact value or matches
your regular expression (depending on whether you have selected Simple String or Regular
For example, entering the value 192.168.1.1 would also match the IPs
192.168.10-19 and 192.168.100-199. This result is probably unintended. The
better solution would be to configure either:
l Access Rate Limit This is the number of requests per second per client IP. Depending on your
configuration of how FortiWeb will derive the clients IP (see Defining your proxies, clients, & X-headers on
page 386), this may be the IP address that is indicated in an HTTP header rather than the IP header.
You can add only one Access Rate Limit filter to each rule.
l Signature Violation Matches if FortiWeb detects a selected category of attack signature in the request or
response. The following categories are available:
l Cross Site Scripting
l Cross Site Scripting (Extended)
l SQL Injection
l SQL Injection (Extended)
l SQL Injection (Syntax Based Detection)
l Generic Attacks
l Generic Attacks (Extended)
l Known Exploits
l Custom Signature (group or individual rule)
To use one of these categories in an advanced access control rule, enable the corresponding item in your
signatures configuration. For more information, see Blocking known attacks & data leaks on page 538.
l Transaction Timeout Matches if the lifetime of a HTTP transaction exceeds the transaction timeout you
specify. Specify a timeout value of 1 to 3600 seconds.
l HTTP Response Code Matches if a HTTP response code matches a code or range of codes that you
specify. For example, 404 or 500-503. To specify more than one response code or range, create additional
HTTP Response Code filters.
l Content Type Matches an HTTP response for a file that matches one of the specified types. Use with
Occurrence to detect and control web scraping (content scraping) activity. (For an example using auto-
learning data, see Most hit IP table and web scraping detection on page 251.)
l Packet Interval Timeout Matches if the time period between packets arriving from either the client or
server (request or response packets) exceeds the value in seconds you specify for Packet Timeout Interval.
Enter a value from 1 to 60.
l Occurrence Matches if a transaction matches other filter types in the current rule at a rate that exceeds a
threshold you specify.
l To measure the rate by counting source client IP address, for Traced By, select Source IP.
l To measure by client, select User.
Note: The User option requires you to enable the Session Management option in your protection
profile. For more information, see Configuring a protection profile for inline topologies on page
658.
You can add only one Access Rate Limit filter to each rule.
In Priority, enter the priority for each rule in relation to other defined rules. Rules with lower numbers (higher
priority) are applied first.
13. To apply the advanced access policy, select it as the Custom Policy in a protection profile (see Configuring a
protection profile for inline topologies on page 658 or Configuring a protection profile for an out-of-band
topology or asynchronous mode of operation on page 669).
Attack log messages contain Custom Access Violation when this feature detects an unauthorized
access attempt.
See also
l IPv6 support
You can block requests from clients based upon their source IP address directly, their current reputation known to
FortiGuard, or which country or region the IP address is associated with.
Conversely, you can also exempt clients from scans typically included by the policy.
l botnets
l spammers
l phishers
l malicious spiders/crawlers
l virus-infected clients
IP reputation knowledge is regularly updated if you have subscribed and connected your FortiWeb to the
FortiGuard IP Reputation service (see Connecting to FortiGuard services on page 190). Due to this, new options
appear periodically. You can monitor the FortiGuard web site feed for security advisories which may correlate
with new IP reputation-related options.
The IPReputation feature can block or log clients based on X-header-derived client
source IPs.
1. If you need to exempt some clients public IP addresses due to possible false positives, configure IP
reputation exemptions first. Go to Tracking >IP Reputation and select the Exceptions tab to create a new
exception.
3. In the Status column, enable categories of disreputable clients that you want to block and/or log.
APTs often mask their source IP using anonymizing proxies. While casual attackers
will move on to easier potential targets if their initial attempts fail, APTs are motivated
to persist until they achieve a successful breach. Early warning can be critical.
Therefore even if some innocent anonymous clients use your web servers and you do
not want to block them, you still may want to log proxied anonymous requests.
Filtering your other attack logs by these anonymous IPs can help you to locate and
focus on dangerous requests from these IPs, whether you want to use them to
configure a defense, for law enforcement, or for forensic analysis.
4. Similar to configuring attack signatures, also configure Action, Block Period, Severity, and Trigger Action.
5. Click Apply.
6. To apply your IP reputation policy, enable IP Reputation in a protection profile that is used by a policy (see
Configuring a protection profile for inline topologies on page 658 or Configuring a protection profile for an out-
of-band topology or asynchronous mode of operation on page 669).
See also
In such cases, when requests appear to originate from other parts of the world, it may not be worth the security
risk to accept them.
l DDoS botnets and mercenary hackers might be the predominant traffic source.
l Anonymizing VPN services or Tor may have been used to mask the true source IP of an attacker that is actually
within your own country.
Blacklisting clients individually in this case would be time-consuming and difficult to maintain due to PPPoE or
other dynamic allocations of public IP addresses, and IP blocks that are re-used by innocent clients.
FortiWeb allows you to block traffic from many IP addresses that are currently known to belong to networks in
other regions. It uses a MaxMind GeoLite database of mappings between geographical regions and all public IP
addresses that are known to originate from them.
You can also specify exceptions to the blacklist, which allows you to, for example, block a country or region but
allow a geographic location within that country or region. If you enable Allow Known Search Engines,
Because network mappings may change as networks grow and shrink, if you use this
feature, be sure to periodically update the geography-to-IP mapping database. To
download the file, go to the Fortinet Technical Support web site.
This scan is bypassed if the clients source IP is a known search engine and you have
enabled Allow Known Search Engines.
1. Verify that client source IP addresses are visible to FortiWeb in either the X-headers or as the SRC field at the
IP layer (see Defining your web servers & loadbalancers on page 348).
If FortiWeb is behind an external load balancer that applies SNAT, for example, you may need to configure it
to append its and the clients IP address to X-Forwarded-For: in the HTTP header so that FortiWeb can
apply this feature. Otherwise, all traffic may appear to come from the same client, with a private network IP:
the external load balancer.
2. If you want to use a trigger to create a log message and/or alert email when a geographically blacklisted client
attempts to connect to your web servers, configure the trigger first. See Viewing log messages on page 768.
3. If you need to exempt some clients public IP addresses, configure Geo IP reputation exemptions first:
l Go to WebProtection> Access> GeoIP.
l To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
l Specify a name for the exception item, and then click OK.
l Click Create New to add IPv4/IPv6 addresses (for example, 192.168.0.1 or 2001::1) or IPv4/IPv6
ranges (for example, 192.168.0.1-192.168.0.255 or 2001::1-2001::100) to the exception item,
as required.
4. Go to WebProtection > Access> GeoIP.
5. Click Create New.
A dialog appears.
Name Type a name that can be referenced by other parts of the configuration. Do
not use spaces or special characters. The maximum length is 35
characters.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when a blacklisted IP
address attempts to connect to your web servers:
l Low
l Medium
l High
Trigger Action Select which trigger, if any, that the FortiWeb appliance uses when it logs
and/or sends an alert email about a blacklisted IP addresss attempt to
connect to your web servers. See Viewing log messages on page 768.
7. Click OK.
In addition to countries, the Country list also includes distinct territories within a country, such as Puerto Rico
and United States Minor Outlying Islands, and regions that are not associated with any country, such as
Antarctica.
See also
l Trusted IPs Almost always allowed to access to your protected web servers. Trusted IPs are exempt from many
(but not all) of the restrictions that would otherwise be applied by a server policy. For a list of skipped scans, see
Sequence of scans on page 35.
l Blacklisted IPs Blocked and prevented from accessing your protected web servers. Requests from blacklisted
IP addresses receive a warning message as the HTTP response. The warning message page includes ID: 70007,
which is the ID of all attack log messages about requests from blacklisted IPs.
If a source IP address is neither explicitly blacklisted or trusted by an IP list policy, the client can access your web
servers, unless it is blocked by any of your other configured, subsequent web protection scan techniques (see
Sequence of scans on page 35).
Because many businesses, universities, and even now home networks use NAT, a packets source IP address
may not necessarily match that of the client. Keep in mind that if you black list or white list an individual source IP,
it may therefore inadvertently affect other clients that share the same IP.
X-header-derived client source IPs (see Defining your proxies, clients, & X-headers on
page 386) do not support this feature in this release. If FortiWeb is deployed behind a
load balancer or other web proxy that applies source NAT, this feature will not work.
Because trusted and blacklisted IP policies are evaluated before many other
techniques, defining these IP addresses can be used to improve
performance. For details, see Sequence of scans on page 35.
1. If you want to use a trigger to create a log message and/or alert email when a blacklisted client attempts to
connect to your web servers, configure the trigger first. See Viewing log messages on page 768.
4. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. Click OK.
6. Click Create New to add an entry to the set.
A dialog appears.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when a blacklisted IP
address attempts to connect to your web servers:
l Low
l Medium
l High
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a blacklisted IP addresss attempt to
connect to your web servers. See Viewing log messages on page 768.
8. Click OK.
9. Repeat the previous steps for each individual IP list member that you want to add to the IP list.
10. To apply the IP list, select it in an inline or offline protection profile (see Configuring a protection profile for
inline topologies on page 658 or Configuring a protection profile for an out-of-band topology or asynchronous
mode of operation on page 669).
Attack log messages contain Blacklisted IP blocked when this feature detects a blacklisted source
IP address.
See also
Blacklisting content scrapers, search engines, web crawlers, & other robots
You can use FortiWeb features to control access by Internet robots such as:
To control which search engine crawlers are allowed to access your sites, go to ServerObjects> Global>
KnownSearchEngines; also configure Allow Known Search Engines.
See also
l Sequence of scans
While using IP-based access controls (blacklisting) to block network traffic from malicious client devices is core to
a WAF solution, issues with using only IP-based access controls remain. Because IP-based access controls rely
on identifying attackers by comparing their IP addresses with blacklist databases, network security concerns and
vulnerabilities remain when attackers can:
See also
l Monitoring currently tracked devices on page 815
Each protection feature involved in the device reputation mechanism must be scored with a threat weight to
indicate how serious a security violation is; this generally depends on the security concerns according to how
networks and servers will be used. For example, SQL injection might be a higher risk security violation if database
applications are provided on servers, though it may be a lower risk event if no database applications are provided.
When a security violation is detected, the threat weight of the security violation is used to calculate the reputation
of the device that launched the event.
Reputation of a device
FortiWeb reacts to security violations launched by a device according to reputation of the device. A device initially
joins the network with a good reputation. A good reputation indicates a low-risk device; a bad reputation indicates
a high-risk device. In a device profile, the historical threat weight field is the sum of the threat weights of all the
security violations launched by the device. As a device triggers security violations, the device reputation is
negatively affected; each time a device violates a device reputation security policy, a corresponding threat weight
is added to the total value in the device profile. The higher the accumulated threat weight of the device, the
poorer reputation of the device.
A device can be classified as low-risk, medium-risk, and high-risk according to its device reputation. To identify
the risk level of a device, the scale of the risk levels must be defined. For example, devices that have a historical
threat weight between 0-100 may be considered low-risk, between 101-500 medium-risk, and between 501-1000
high-risk.
When Device Tracking is enabled and a device reputation security policy is selected, FortiWeb can react to a
security violation according to a device's reputation rather than just the individual security policy. Once the scale
of device risk levels is determined, a violation action of each risk level may be defined so that FortiWeb can
properly react to the risk level of a device when it detects a security violation launched from the device.
When Device Tracking is enabled and a device reputation security policy is selected, FortiWeb behaves as
follows:
1. Identify the device through the fingerprint technique and check whether a profile of the device already exists
when a security violation launched by a visiting device is detected. If a device profile does not already exist, a
profile of the device with a unique device ID is created.
2. Add the threat weight of the security violation launched by this device to the historical threat weight in the
device's profile.
3. Evaluate the reputation of the device (risk level of the device) by comparing the historical threat weight of the
device with the predefined device risk level.
Assign a threat weight of 1-100 to the risk levels. It is possible to initially use the default values and later
adjust them according to specific security concerns.
For Signatures and HTTP Protocol Constraints, first enable them here and go to Web Protection >
Known Attacks > Signatures and Web Protection > Protocol > HTTP Protocol Constraints to set the
risk level of individual signatures and HTTP protocol constraints. For details, see Blocking known attacks &
data leaks and HTTP/HTTPS protocol constraints.
Moving the cursor of a slider bar to the leftmost side sets the threat weight of a security violation to OFF,
meaning that a threat weight will not be calculated for the security violation in the device reputation security
policy. Once a security violation without a defined threat weight is detected, FortiWeb will not react to the
security violation according to the device reputation security policy, and instead the violation action specified
in the local security policy will be triggered.
1. Go to Tracking > Device Reputation, select Device Reputation Security Policy tab, and select an
existing policy or create a new one.
Settings Descriptions
Risk levels are used to evaluate how dangerous a device is. Each time
a device violates a device reputation security policy, the historical
threat weight of the device increases according to the threat weight of
Weight Range for Low/Me-
the security violation. FortiWeb compares the historical threat weight
dium/High Risk Level
of the device with the weight range specified here to identify the risk
level of the device so that FortiWeb can trigger a corresponding
violation action.
Settings Descriptions
Adjust the slider bar to specify weight ranges between 0-1000 for the
risk levels.
Action for High/Me- Specify the violation action FortiWebcarries out in response to
dium/Low/Unidentified Risk security violations launched by a high/medium/low/unidentified risk
Level Device device.
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that returns to the client with
the HTTP status code. For details, see Customizing error and
authentication pages (replacement messages).
l Period Block Block subsequent requests from the client for a number
of seconds. Also configure Block Period.
You can customize the web page that returns to the client with
the HTTP status code. For details, see Customizing error and
authentication pages (replacement messages).
l Using Local Action Takes the local action specified in a protection
profile.
1. Go to Policy > Web Protection Profile, select the Inline ProtectionProfile tab, and select an existing
profile or create a new one.
2. Enable Device Tracking and select a policy in Device Reputation Security Policy. For details, see
Device Tracking in Configuring a protection profile for inline topologies.
1. Go to Tracking > Device Reputation, select the Device Reputation Exceptions tab, and select an
existing policy or create a new one.
2. Security features placed in Selected Security Feature Name will bypass device reputation security policies.
From Security Feature Name, select the security feature and click the right arrow button to move it to
Selected Security Feature Name.
To cancel the exception to a security feature, select the feature in Selected Security Feature Name and
click the left arrow to remove it back to Security Feature Name.
Fields Values
Low 5
Medium 10
High 30
Critical 100
Signatures Disabled
Fields Values
In the device reputation security policy, the following settings have been selected:
Fields Values
Low 0-30
Medium 31-100
High 101-1000
Low Alert
Fields Values
FortiWeb takes the following actions after identifying these security violations from a device:
Device
Device Violation
Security Violations Behaviors Threat
Risk Action
Weight
Brute Force Login Add the threat weight of Brute Force 140 High Alert & Deny
Login (100) to the device.
Device
Device Violation
Security Violations Behaviors Threat
Risk Action
Weight
In this example, FortiWeb carried out two different actions for the two File Upload Restriction violations and
carried out a high-risk action to a low-risk Illegal Json Format (threat weight of 5) violation.This is because
FortiWeb will react to each security violation according to the reputation (risk) of the device regardless of the type
of security policy the device violated.
A cookie security policy allows you to configure FortiWeb features that prevent cookie-based attacks and apply
them in a protection profile. For example, a policy can enable cookie poisoning detection, encrypt the cookies
issued by a back-end server, and add security attributes to cookies.
When you first introduce some of the cookie security features, cookies that client
browsers have cached earlier can generate false positives. To avoid this problem, use
the Allow Suspicious Cookies setting to either take no action against violations of
the cookie security features or delay taking action until a specific date.
Name Enter a name that identifies the policy when you select it in a protection
profile.
Security Mode l None FortiWeb does not apply cookie tampering protection or encrypt
cookie values.
l Signed Prevents tampering (cookie poisoning) by tracking the cookie
value. This option requires you to enable Session Management in the
protection policy and the client to support cookies.
When FortiWeb receives the first HTTP or HTTPS request from a client, it
uses a cookie to track the session. When you select this option, the
session-tracking cookie includes a hash value that FortiWeb uses to
detect tampering with the cookie from the back-end server response. If
FortiWeb determines the cookie from the client has changed, it takes the
specified action.
l Encrypted Encrypts cookie values the back-end web server sends to
clients. Clients see encrypted cookies only. FortiWeb decrypts cookies
submitted by clients before it sends them to the back-end server. No
back-end server configuration changes are required.
Cookie Replay Optionally, select whether FortiWeb uses the IP address of a request
to determine the owner of the cookie. Note: This is available only
when Security Mode is configured as Encrypted.
Allow Suspicious Cookies Select whether FortiWeb allows requests that contain cookies that it
does not recognize or that are missing cookies.
l Never FortiWeb does not take the action specified by Action against
suspicious cookies.
l Always FortiWeb always takes the specified action against suspicious
cookies.
l Custom FortiWeb takes the specified action against suspicious
cookies starting on the date specified by Don't Block Until.
This feature is not available if Security Mode is Signed or None.
Don't Block Until If Allow Suspicious Cookies is Custom, enter the date on which
FortiWeb starts to take the specified action against suspicious cookies.
Cookie Max Age Enter the maximum age, in minutes, permitted for cookies that do not have
an Expires or Max-Age attribute.
Secure Cookie Enable to add the secure flag to cookies, which forces browsers to return
the cookie only when the request is for an HTTPS page.
HTTP Only Enable to add the HttpOnly flag to cookies, which prevents client-side
scripts from accessing the cookie.
Action For cookie security features that trigger an action, select the action
that FortiWeb takes:
l Alert Accept the request and generate an alert email, log message, or
both.
l Alert & Deny Block the request and generate an alert, log message,
or both.
l Remove Cookie Accept the request, but remove the cookie from the
datagram before it reaches the web server, and generate an alert
message, log message, or both.
l Period Block Block requests for the number of seconds specified by
Block Period. See also Monitoring currently blocked IPs on page 814.
Note: If FortiWeb is deployed behind a NAT load balancer, when using
this option, you must also define an X-header that indicates the original
clients IP (see Defining your proxies, clients, & X-headers on page 386).
Failure to do so may cause FortiWeb to block all connections when it
detects a violation of this type.
Block Period When Action is Period Block, the number of seconds that FortiWeb
blocks requests that have violated cookie security features.
Severity Select the severity level FortiWeb uses when it logs a violation of a cookie
security feature.
Trigger Policy Select the trigger policy FortiWeb uses when it logs a violation of a cookie
security feature.
3. Click OK.
4. If you want to specify cookies that are exempt from the cookie security policy, under the Cookie Exceptions
Table, click Create New and complete the following settings:
5.
Cookie Domain Optionally, enter the partial or complete domain name or IP address
as it appears in the cookie. For example:
www.example.com
.google.com
10.0.2.50
If clients sometimes access the back-end server via IP address
instead of DNS, create exemption items for both.
Cookie Path Optionally, enter the path as it appears in the cookie, such as / or
/blog/folder.
6. To apply the cookie security policy, select it in an inline protection profile (see Configuring a protection profile
for inline topologies on page 658).
If Security Mode is Signed, ensure that Session Management is enabled for the profile.
Rate limiting
In addition to controlling which URLs a client can access, you can control how often. This can be especially
important to preventing scouting and brute force password attacks.
If you need to restrict access as well as rate limiting, you can do both at the same time. See Combination access
control & rate limiting on page 460.
DoS prevention
You can protect your web assets from a wide variety of denial of service (DoS) attacks.
Some DoS protection features are not supported in all modes of operation. For details,
see Supported features in each operation mode on page 88.
DoS features are organized by which open system interconnections (OSI) model layer they use primarily to apply
the rate limit:
For some DoS protection features, the FortiWeb appliance uses session management to track requests.
1. When a FortiWeb appliance receives the first request from any client, it adds a session cookie to the response
from the web server in order to track the session. The client will include the cookie in subsequent requests.
2. If a client sends another request before the session timeout, FortiWeb examines the session cookie in the
request.
l If the cookie does not exist or its value has changed, the FortiWeb appliance drops the request.
l If the same cookie exists, the request is treated as part of the same session. FortiWeb increments its count of
connections and/or requests from the client. If the rate exceeds the limit, FortiWeb drops the extra connection
or request.
See also
This feature is similar to DoSProtection> Application > HTTPFloodPrevention. However, this feature
can prevent HTTP request floods that involve many different URLs. It also can detect source IP addresses that
are shared by multiple clients, and intelligently enforce a separate request rate limit for those IPs, even if those
clients do not support cookies.
FortiWeb appliances track the rate of requests from each source IP address, regardless of their HTTP method. If
the rate of requests exceeds the limit, FortiWeb performs the Action.
This scan is bypassed if the clients source IP is a known search engine and you have
enabled Allow Known Search Engines.
1. Before you configure the rate limit, enable detection of when source IP addresses are shared by multiple
clients. For details, see Advanced settings on page 727.
If you do not enable detection of shared IP addresses (Shared IP) , FortiWeb ignores
the second threshold, HTTP Request Limit/sec (Shared IP) .
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
HTTP Request Limit/sec Type a rate limit for the maximum number of HTTP requests per
(Standalone IP) second from each source IP address that is a single HTTP client.
HTTP Request Limit/sec Type a rate limit for the maximum number of HTTP requests per
(Shared IP) second from each source IP address that is shared by multiple HTTP
clients.
Real Browser Enforcement If you want to return a JavaScript to the client to test whether it is a
web browser or automated tool when it exceeds the rate limit, enable
this option. If either the client fails the test, or if it does not return
results before the Validation Timeout, FortiWeb will apply the Action.
If the client appears to be a web browser, FortiWeb will allow the
client to exceed the action. See also Bot analysis on page 813.
Disable this option to apply the rate limit regardless of whether the
client is a web browser such as Firefox or an automated tool such as
wget.
Validation Timeout Enter the maximum amount of time that FortiWeb will wait for results from
the client for Real Browser Enforcement.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: Logging and/or alert email will occur only if enabled and
configured. See Logging on page 749 and Alert email on page 780.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
5. Click OK.
6. Group the rule in a DoS protection policy (see Grouping DoS protection rules on page 504) that is used by a
protection profile.
If you set 10 per second for both the shared and standalone limit, here are two scenarios:
l A client opens 5 TCP connections, where each connection has a different source port. Each TCP connection creates
3 HTTP GET requests. The FortiWeb appliance blocks the extra connections as there are 15 HTTP requests overall,
which exceeds the limit.
l A client opens a single TCP connection with 12 HTTP GET requests. The Period Block action is set. Once the
count exceeds 10, the FortiWeb appliance blocks all traffic from the client for the specified block period.
Excessive numbers of TCP connections per session can occur if a web application or client is malfunctioning, or if
an attacker is attempting to waste socket resources to produce a DoS.
This feature is similar to DoSProtection> Network > TCPFloodPrevention. However, this feature counts
TCP connections per session cookie, while TCP Flood Prevention counts only TCP connections per IP address.
Because it uses session cookies at the application layer instead of only TCP/IP connections at the network layer,
this feature can differentiate multiple clients that may be behind the same source IP address, such as when the
source IP address hides a subnet that uses network address translation (NAT). However, in order to work, the
client must support cookies.
If the count exceeds the limit, the FortiWeb appliance executes the Action.
This scan is bypassed if the clients source IP is a known search engine and you have
enabled Allow Known Search Engines.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
TCP Connection Number Type the maximum number of TCP connections allowed with a single
Limit HTTP client.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: Logging and/or alert email will occur only if enabled and
configured. See Logging on page 749 and Alert email on page 780.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
4. Click OK.
5. Group the rule in a DoS protection policy (see Grouping DoS protection rules on page 504) that is used by a
protection profile.
l A client opens 5 TCP connections. Each connection has a different source port. Because each connection has a
valid session cookie, and does not exceed the connection limit, the FortiWeb appliance allows them.
l A client opens 11 TCP connections. The FortiWeb appliance blocks the last connection because it exceeds the limit
of 10.
See also
Because this feature uses session cookies at the application layer instead of only TCP/IP connections at the
network layer, this feature can differentiate multiple clients that may be behind the same source IP address, such
as when the source IP address hides a subnet that uses network address translation (NAT). However, the client
must support cookies.
This feature is similar to DoSProtection> Application > HTTPAccessLimit. However, rather than
preventing many requests to any URL by the same client, it prevents many requests to the same URL by the
same client.
If the rate exceeds the limit, the FortiWeb appliance executes the Action.
This scan is bypassed if the clients source IP is a known search engine and you have
enabled Allow Known Search Engines.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
HTTP Request Limit/sec Type the maximum rate of requests per second allowed from a single
HTTP client.
Real Browser Enforcement If you want to return a JavaScript to the client to test whether it is a
web browser or automated tool when it exceeds the rate limit, enable
this option. If either the client fails the test, or if it does not return
results before the Validation Timeout, FortiWeb will apply the Action.
If the client appears to be a web browser, FortiWeb will allow the
client to exceed the action. See also Bot analysis on page 813.
Disable this option to apply the rate limit regardless of whether the
client is a web browser such as Firefox or an automated tool such as
wget.
Validation Timeout Enter the maximum amount of time that FortiWeb will wait for results from
the client for Real Browser Enforcement.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: Logging and/or alert email will occur only if enabled and
configured. See Logging on page 749 and Alert email on page 780.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
4. Click OK.
5. Group the rule in a DoS protection policy (see Grouping DoS protection rules on page 504).
6. Select the DoS protection policy in a protection profile (see Configuring a protection profile for inline
topologies on page 658).
l A client opens a single TCP connection with 8 HTTP GET requests. As long as they all have the session cookie set
by the FortiWeb appliance, it allows the requests.
l A client opens a single TCP connection with 8 HTTP GET requests. One request does not have the session cookie.
The FortiWeb appliance drops the TCP connection (dropping all sessions).
l Two clients open 2 TCP connections. Each has 6 HTTP requests with the same session cookie. The FortiWeb
appliance blocks the last two requests because there are 12, which exceeds the 10 limit.
TCP flood attacks exploit the fact that servers must consume memory to maintain the state of the open
connection until either the timeout, or the client or server closes the connection. This consumes some memory
even if the client is not currently sending any HTTP requests.
Normally, a legitimate client will form a single TCP connection, through which they may make several HTTP
requests. As a result, each client consumes a negligible amount of memory to track the state of the TCP
connection. However, an attacker will open many connections with perhaps zero or one request each, until the
server is exhausted and has no memory left to track the TCP states of new connections with legitimate clients.
This feature is similar to DoSProtection> Application> MaliciousIPs. However, this feature counts TCP
connections per IP, while Malicious IPs counts TCP connections per session cookie.
It is also similar to the Syn Cookie setting in a server policy. However, this feature counts fully-formed TCP
connections, while SynCookie counts partially-formed TCP connections.
FortiWeb counts the TCP connections. If a source IP address exceeds the limit, FortiWeb executes the Action
for that client.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
TCP Connection Number Type the maximum number of TCP connections allowed with a single
Limit source IP address.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is Medium.
Trigger Action Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
4. Click OK.
5. Group the rule in a DoS protection policy (see Grouping DoS protection rules on page 504) that is used by a
protection profile.
Attack log messages contain DoS Attack: TCP Flood Prevention Violation when this feature
detects a TCP connection flood. See also Log rate limits on page 752.
Assume you set 10 as the limit. A client opens 15 TCP connections. Each connection has a different source port.
The FortiWeb appliance counts all connections as part of the same source IP and blocks the connections because
they exceed the limit.
See also
TCP SYN floods attempt to exploit the state mechanism of TCP. At the point where a client has only sent a SYN
signal, a connection has been initiated and therefore consumes server memory to remember the state of the half-
open connection. However, because the connection is not yet fully formed, packets are not required to contain
any actual application layer payload such as HTTP. Therefore, application-layer scans cannot block the
connection. Scans that only count fully-formed socket connections (where the clients SYN has been replied to by
a SYN ACK from the server, and the client has confirmed connection establishment with an ACK) cannot block it
either.
Normally, a legitimate client quickly completes the connection build-up and tear-down. However, an attacker
initiates many connections without completing them until the server is exhausted and has no memory left to track
the TCP connection state for legitimate clients.
To prevent this, FortiWeb can use a SYN cookie a small piece of memory that keeps a timeout for half-open
connections. This mechanism prevents half-open connections from accumulating to the point of socket
exhaustion.
This feature is similar to DoSProtection> Network> TCPFloodPrevention. However, this feature counts
partially-formed TCP connections, while TCPFloodPrevention counts fully-formed TCP connections.
TCP SYN flood protection is available only when the operating mode is reverse proxy or true transparent proxy.
To enable the feature, you configure the Syn Cookie and Half Open Threshold options in the appropriate server
policy.
1. Before you can configure a DoS protection policy, you must first configure the rules that you want to include:
l HTTP request flood prevention (see Preventing an HTTP request flood on page 496)
l HTTP request rate limit (see Limiting the total HTTP request rate from an IP on page 488)
l TCP connections per session (see Limiting TCP connections per IP address by session cookie on page 492)
l TCP connection flood prevention (see Limiting TCP connections per IP address on page 501)
2. Go to DoSProtection> DoSProtectionPolicy.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
4. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. If you want to apply features that use session cookies, enable HTTP Session Based Prevention.
l From HTTP Flood Prevention, select an existing rule that sets the maximum number of HTTP requests per
second to a specific URL (see Preventing an HTTP request flood on page 496).
l From Malicious IPs, select an existing rule that limits TCP connections from the same client (see Limiting
TCP connections per IP address by session cookie on page 492).
6. If you want to restrict traffic based upon request or connection counts, enable HTTP Network Based
Prevention.
l From HTTP Access Limit, select a rule, if any, that you want to include (see Limiting the total HTTP request
rate from an IP on page 488).
l From TCP Flood Prevention, select a rule, if any, that you want to include (see Limiting TCP connections per
IP address on page 501).
7. Click OK.
8. To apply the policy, select the DoS protection policy in an inline protection profile (see Configuring a
protection profile for inline topologies on page 658).
9. If you have configured DoS protection features that use session cookies, also enable the Session
Management option in the protection profile.
See also
l Sequence of scans
l Bot analysis
Brute force attackers attempt to penetrate systems by the sheer number of clients, attempts, or computational
power, rather than by intelligent insight or advance knowledge of application logic or data.
Specifically in brute force attacks on authentication, multiple web clients may rapidly try one user name and
password combination after another in an attempt to eventually guess a correct login and gain access to the
system. In this way, behavior differs from web crawlers, which typically do not focus on a single URL.
Brute force login attack profiles track the rate at which each source IP address makes requests for specific URLs.
If the source IP address exceeds the threshold, the FortiWeb appliance penalizes the source IP address by
blocking additional requests for the time period that you indicate in the profile.
This scan is bypassed if the clients source IP is a known search engine and you have
enabled Allow Known Search Engines.
1. Before you configure a brute force login attack profile, if you want to apply it only to HTTP requests for a
specific real or virtual host, you must first define the web host in a protected host names group. For details,
see Defining your protected/allowed HTTP Host: header names on page 349. Before you configure the rate
limit, enable detection of when source IP addresses are shared by multiple clients. For details, see Advanced
settings on page 727.
If you do not enable detection of shared IP addresses (Shared IP), the second
threshold, Share IP Access Limit, will be ignored.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
5. Click OK.
6. Click Create New to add an entry to the set.
A dialog appears.
Host Status Enable to require that the Host: field of the HTTP request match a
protected host names entry in order to be included in the brute force login
attack profiles rate calculations. Also configure Host.
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match the brute force login attack profile.
Request File Type the URL that the HTTP/HTTPS request must match to be
included in the brute force login attack profiles rate calculations.
When you have finished typing the regular expression, click the >>
(test) icon. This opens the Regular Expression Validator window
where you can fine-tune the expression (see Regular expression
syntax on page 918).
Standalone IP Access Limit Type the rate threshold for source IP addresses that are single clients.
Request rates exceeding the threshold will cause the FortiWeb
appliance to block additional requests for the length of the time in the
Block Period field.
Share IP Access Limit Type the rate threshold for source IP addresses that are shared by
multiple clients behind a network address translation (NAT) device
such as a firewall or router. Request rates exceeding the threshold will
cause the FortiWeb appliance to block additional requests for the
length of the time in the Block Period field.
Note: This option will be ignored if you have not enabled detection of
shared IP addresses. See Advanced settings on page 727.
Block Period Type the length of time in seconds for which the FortiWeb appliance
will block subsequent requests after a source IP address exceeds the
rate threshold in either Standalone IP Access Limit or Share IP Access
Limit.
The block period is shared by all clients whose traffic originates from
the source IP address. The valid range is from 1 to 10,000 seconds.
8. Click OK.
9. Repeat the previous steps for each individual login page that you want to add to the brute force login attack
profile.
10. To apply the brute force login attack profile, select it in an inline protection profile (see Configuring a
protection profile for inline topologies on page 658).
Attack log messages contain Brute Force Login Violation when this feature detects a brute force
login attack.
See also
l IPv6 support
Rewriting or redirecting HTTP requests and responses is popular, and can be done for many reasons.
Similar to error message cloaking, URL rewriting can prevent the disclosure of underlying technology or web site
structures to HTTP clients.
For example, when visiting a blog web page, its URL might be:
http://www.example.com/wordpress/?feed=rss2
Simply knowing the file name, that the blog uses PHP, its compatible database types, and the names of
parameters via the URL could help an attacker to craft an appropriate attack for that platform. By rewriting the
URL to something more human-readable and less platform-specific, the details can be hidden:
http://www.example.com/rss2
Aside from security reasons, rewriting and redirects can be for aesthetic or business purposes, too. Financial
institutions can transparently redirect customers that accidentally request HTTP:
http://bank.example.com/login
to authenticate and do transactions on their secured HTTPS site:
https://bank.example.com/login
Additional uses could include:
Rewrites will work on single requests as well as those that have been fragmented using:
Tranfer-Encoding: chunked
3. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
4. In Action Type, select whether this rule will rewrite HTTP requests from clients (Request Action) or HTTP
responses from the web server (Response Action).
5. If you selected Request Action in Action Type, in the Request Action drop-down list, select one of the
following:
l Rewrite HTTP Header Rewrites part(s) of the header in the HTTP request before passing it to the web
server.
At the time of each specific HTTP request, FortiWeb will replace this
variable with the IP address of the physical server to which it is
forwarding the request.
Tip: Use this option when the Deployment Mode option in the server
policies using this rule is either Server Balance or HTTP Content
Routing. In such cases, by definition of load balancing, HTTP
requests will be distributed among multiple web servers, and the
specific IP addresses of the physical servers cannot be known in
advance.
Like Host, this field supports back references such as $0 to the parts
of the original request that matched any capture groups that you
entered in Regular Expression for each object in the condition table
(see What are back-references? on page 924).
At the time of each specific HTTP request, FortiWeb will replace this
variable with the IP address of the physical server to which it is
forwarding the request.
Tip: Use this option when the Deployment Mode option in the server
policies using this rule is either Server Balance or HTTP Content
Routing. In such cases, by definition of load balancing, HTTP
requests will be distributed among multiple web servers, and the
specific IP addresses of the physical servers cannot be known in
advance.
Header Field Name Enable to insert the name of the header field that you want to insert to a
request, such as "Myheader".
Header Field Value Enable to insert the value of the header field that you specified in Header
Field Name, such as "123". Then, the customized header Myheader: 123
will be inserted to the matched HTTP requests.
l Redirect (301 Permanently) or Redirect (302 Temporary) In Location, type a URI, such as
http://www.example.com/new-url, to use in the e 301 Moved Permanently or the 302 Moved
Temporarily redirection HTTP response from the FortiWeb appliance. Like Host and URL, this field
supports back-references such as $0 (see What are back-references? on page 924).
l Rewrite HTTP Body In Replacement, type the string that will replace content in the body of HTTP
responses (see What are back-references? on page 924 and Cookbook regular expressions on page 926).
7. Click Create New to add match conditions for the rule to URL Rewriting Condition Table.
A dialog appears.
Object Select which part of the HTTP request will be tested for a match:
Regular Expression Depending on your selection in Object and Meet this condition if, type a
regular expression that defines either all matching or all non-matching
objects. Also configure Meet this condition if.
For example, for the URL rewriting rule to match all URLs that begin
with /wordpress, you could enter ^/wordpress, then, in Meet
this condition if, select Object matches the regular expression.
When you have finished typing the regular expression, click the >>
(test) icon. This opens the Regular Expression Validator window
where you can fine-tune the expression (see Regular expression
syntax on page 918, What are back-references? on page 924 and
Cookbook regular expressions on page 926).
Protocol Filter Enable if you want to match this condition only for either HTTP or
HTTPS. Also configure Protocol.
For example, you could redirect clients that accidentally request the
login page by HTTP to a more secure HTTPS channel but the
redirect is not necessary for HTTPS requests.
Protocol Select which protocol will match this condition, either HTTP or
HTTPS.
This option appears only if Protocol Filter is enabled.
Content Type Filter Enable if you want to match this condition only for specific HTTP content
types (also called Internet or MIME file types) such as text/html, as
indicated in the Content-Type: HTTP header. Also configure Content
Type Set.
Content Type Set In the left text area, select one or more HTTP content types that you
want to match this condition, then click the right arrow button to move
them into the text area on the right side.
Meet this condition if Indicate how to use Regular Expression when determining whether or
not this URL rewriting condition is met.
9. If you selected HTTP Referer from Object, also configure the following:
14. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
17. From the Rewriting Rule Name drop-down list, select the name of an existing rewriting rule to add to the
policy.
To view or change the information associated with the rule, click the icon. The URL Rewriting Rule
dialog appears, and you can view and edit the rules here. Use your browsers Back button to return.
21. To apply the rewriting policy, select it in an inline protection profile. For details, see Configuring a protection
profile for inline topologies on page 658.
See also
Example.com is a business-oriented social media provider. Its clients require that attackers cannot fraudulently
post comments. If an attacker can post while disguised as originating from the clients business, as this could
enable an attacker to ruin a businesss reputation.
To provide clients with protection from HTTP session hijacking tools such as Firesheep, Example.com wants to
automatically redirect all HTTP requests to HTTPS. This way, before the client attempts to log in and exposes
both their credentials and HTTP sessionID to an eavesdropper, the response and subsequent requests are
SSL/TLS encrypted, and thereby protected.
The Redirect HTTP to HTTPS option in the server policy configuration allows you to redirect all HTTP requests
to equivalent URLs on a secure site.
Alternatively, you can create a rewriting rule that matches all HTTP requests, regardless of host name variations
or URL, such as:
http://www.example.com/login
http://www.example.co.jp/
and redirects them to the equivalent URL on its secure sites:
https://www.example.com/login
https://www.example.co.jp/
This rewriting rule has 3 parts:
l Regular expression that matches HTTP requests with any host name (.*)
This regular expression should not match HTTPS requests, since it would decrease
performance to redirect requests that are already in HTTPS.
l Regular expression that matches requests with any URL in the HTTP header ^/(.*)$
l Redirect destination location that assembles the host name ($0) and URL ($1) from the request in front of the
new protocol prefix, https://
See also
www.example.com wants to translate its domain name: the external DNS name should be rewritten to the
internal DNS name, and vice versa.
When the external DNS name www.example.com appears in the clients requests HTTP Host: header, it
should be rewritten to www-internal.example.com.
In the servers response traffic, when the internal DNS name www-internal.example.com appears in the
Location: header, or in hyperlinks in the document body, it must be rewritten.
To do this, three rewriting rules and conditions must be created, one for each of part that FortiWeb must rewrite.
Host www-internal.example.com
Location $0www.example.com$1
Replacement www.example.com
See also
Example.com is a cloud hosting service provider that has just bought several FortiWeb appliances. Thousands of
customers rely on it to maintain database-backed web servers. Before FortiWeb was added to its network, its web
servers were regularly being attacked. Without HTTP-savvy intrusion detection and filtering, these posts poisoned
many of its web applications by using XSS to inject stored clickjacking attacks into login pages.
Example.com wants to mitigate the effects of prior attacks to protect innocent clients while its incident response
team finishes forensic work to audit all applications for impact and complete remediation. To do this, it will rewrite
the body of offending responses.
Example.coms incident response team has already found some of the poisoned HTML that is afflicting some
login pages. All major web browsers are currently vulnerable.
It replaces the login pages of the web application with a hidden frame set which it uses to steal session or login
cookies and spy on login attempts. The attacker can then use stolen login credentials or use the fraudulent
session cookies. For bank clients, this is especially devastating: the attacker now has complete account access,
including to credit cards.
To mitigate effects, example.com wants to scrub the malicious HTML from responses, before they reach clients
that could unwittingly participate in attacks, or have their identities stolen.
Since attackers often try new attack forms to evade filters, the example regular expression will use a few
techniques for flexible matching:
(?i)<(\s)*iframe[\s\/]*src=(\s)*["'`??
Regular Expression in URL match condition
'?]javascript:(\n|.)*</iframe>
Replacement <script
src="http://irt.example.com/toDo.jss></script>
See also
Example.com wants to delete some text, and insert other text. As an example, it wants to change:
Hey everyone, this works!
to:
Hey, this works now!
To do this, it will rewrite matching parts of the body in the web servers response.
The regular expression contains capture groups (.*) that create numbered substrings back-references such
as $0 that you can recall by their number when writing the replacement text. By omitting a capture group (in
this case, $1 is omitted from Replacement), that part of the text is removed. To insert text, simply add it to the
replacement text.
See also
Example.edu is a large university. Professors use a mixture of WordPress and Movable Type software for their
course web pages to keep students updated. In addition, the campus bookstore and software store use custom
shopping cart software. The URLs of these web applications contain clues about the underlying vendors,
databases and scripting languages.
The university is a frequent target of attacks because it is a large organization with many mobile users and
guests, and an Internet connection with large bandwidth. Its network administrators want to hide the underlying
technology to make it more difficult for attackers to craft platform-specific attacks. Example.edu also wants to
make clients bookmarked URLs more permanent, so that clients will not need to repair them if the university
switches software vendors.
Because it has so many URLs, the university uses regular expressions to rewrite sets of similar URLs, rather than
configuring rewrites for each URL individually. More specific URL rewrite rules are selected first in the URL
rewriting group, before general ones, due to the affects of the matching order on which each rewrite rule is
applied.
See also
Example.com has a web site that uses ASP, but the administrator wants it to appear that the web site uses PHP.
To do this, the administrator configured a rule that changes any requested file's extension which is asp into php.
The administrator does not want to rewrite matching requests into a single URL. Instead, the administrator wants
each rewritten URL to re-use parts of the original request.
To assemble the rewritten URL by re-using the original requests file path and Host:, the administrator uses two
back reference variables: $0 and $1. Each variable refers to a part of the original request. The parts are
determined by which capture group was matched in the Regular Expression field of each condition table object.
l $0 The text that matched the first capture group (.*). In this case, because the object is the Host: field, the
matching text is the host name, www.example.com.
l $1 The text that matched the second capture group, which is also (.*). In this case, because the object is the
request URL, the matching text is the file path, news/local.
/
/news/local.asp HTTP URL URL /$1.php /news/local.php
(.*)\.asp
See also
Caching
To improve performance of your back-end network and servers by reducing their traffic and processing load, you
can configure FortiWeb to cache responses from your servers.
Normally, FortiWeb forwards all allowed requests to your servers. This results in a 1:1 ratio of client-side to
server-side traffic. When content caching is enabled, however, FortiWeb will forward only requests for content
that:
Clients
Web
Server 1
FortiWeb
Internet
New? Web
Server 2
Content caching provides the greatest benefit for things that rarely change, such as icons, background images,
movies, PDFs, and static HTML.
1. If you want to cache all URLs except for a few, go to ApplicationDelivery> Caching and select the Web
Cache Exceptions tab. Otherwise, skip to step 9.
2. Click Create New.
A dialog appears.
3. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
4. Click OK.
5. Click Create New.
6. Configure these settings (You can omit items from the cache by matching the request URL, its cookie name,
or both. Some URLs may not require exceptions because they inherently cannot be cached. For details, see
What can be cached? on page 535):
Host Status Enable to require that the Host: field of the HTTP request match a
protected host names entry in order to match the exception. Also configure
Host.
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match the exception.
Type Indicate whether URL Pattern is a Simple String (that is, a literal URL) or
a Regular Expression.
l 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 (/).
l a regular expression, such as ^/*.php, matching all and only the URLs
to which the rule should apply. The pattern does not require a slash (/);
however, it must at 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 the Host drop-down list.
To create and test a regular expression, click the >> (test) icon. This
opens the Regular Expression Validator window where you can
fine-tune the expression (see Regular expression syntax on page
918).
Cookie Name Type the name of the cookie, such as sessionid, as it appears in
the Cookie: HTTP header.
7. Click OK.
8. Repeat the previous steps for each entry that you want to add to the exception.
9. Go to ApplicationDelivery> Caching and select the Web Cache Policy tab.
10. Click Create New.
11. Configure these settings:
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match the policy.
Cache Buffer Size Type the maximum size in megabytes (MB) of RAM to allocate to
caching content.
Maximum Cached Page Type the maximum size in kilobytes (KB) of each URL that FortiWeb
Size will cache. Objects such as high-resolution images, movies, or music
that are larger than this limit will not be cached.
Tip: For improved performance, adjust this setting until FortiWeb can
fit most graphics and server processing-intensive pages into its cache.
Default Cache Timeout Type the time to live for each entry in the cache. Expired entries will
be removed.
A subsequent request for the URL will cause FortiWeb to forward the
request to the server in order to cache the response again. Any
additional requests will receive FortiWebs cached response until the
URLs cache timeout occurs.
Exception Select a list of exceptions, if any, to this list of cached URLs. Click the
icon to view or edit exceptions.
12. ClickOK.
13. To automatically cache all URLs except for those in Exception, skip to step 17. Otherwise, tomanually
specify which URLs to cache, click Create New to create a new web cache policy item rule.
Host Status Enable to require that the Host: field of the HTTP request match a
protected host names entry in order to match the policy. Also configure
Host.
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match the policy.
Type Indicate whether URL Pattern is a Simple String (that is, a literal URL) or
a Regular Expression.
l the literal URL, such as /index.php, that the HTTP request must
contain in order to match the policy. The URL must begin with a slash
(/).
l a regular expression, such as ^/*.php, matching all and only the URLs
to which the policy should apply. The pattern does not require a slash (/);
however, it must at 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 the Host drop-down list.
To create and test a regular expression, click the >> (test) icon. This
opens the Regular Expression Validator window where you can
fine-tune the expression (see Regular expression syntax on page
918).
17. To apply the rewriting policy, select it in an inline protection profile. For details, see Configuring a protection
profile for inline topologies on page 658.
See also
Caching works best with data that does not change. Static web pages, images, movies, and music all typically
work well.
When content changes often, caching provides overhead by consuming RAM without its usual benefit of reduced
latency. Some HTTP headers and other factors indicate dynamic content which FortiWeb will not cache.
l If-Match
l If-None-Match
FortiWeb also will not cache if the response:
Many attacks and data leaks can be detected by FortiWeb using signatures. Enable signatures to defend against
many attacks in the OWASP Top 10, plus more:
Updating signatures
Known attack signatures can be updated. For information on uploading a new set of attack definitions, see
Uploading signature & geography-to-IP updates on page 201 and Connecting to FortiGuard services. You can
also create your own. See Defining custom data leak & attack signatures on page 563.
Signature configuration
You can configure each server protection rule with an action, severity, and notification settings (trigger) that
determine how FortiWeb handles each violation.
For example, attacks categorized as cross-site scripting and SQL injection could have the action set to
alert_deny, the severity set to High, and a trigger set to deliver an alert email each time FortiWeb detects
these rule violations. However, you can disable specific signatures in those categories, set them to log/alert
instead, or exempt requests to specific host names/URLs.
Optionally, use the signature wizard to create a policy. To access the wizard, go to Web Protection > Known
Attacks > Signatures and click Signature Wizard.
The wizard prompts you to select the database and web server types that apply to your environment and
generates a corresponding policy. In policies generated by the wizard, any signatures that are not relevant to your
environment are disabled; this improves performance and reduces the number of false positives. If necessary,
you can perform additional configurations for the set of signatures the wizard generates.
1. Before you create a signature rule, create custom signatures, if any, that you will add to the rule (see Defining
custom data leak & attack signatures on page 563).
2. If you require protection for Oracle padding attacks, configure a rule for it (see Defeating cipher padding
attacks on individually encrypted inputs on page 573).
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Custom Signature Group Select a custom signature group to use, if any. For details, see
Defining custom data leak & attack signatures on page 563.
To view and/or edit the custom signature set, click the Detail link. The
Edit Custom Signature Group dialog appears.
Status Click to enable or disable the signature rule for this policy.
False Positive Mitigation For signatures that FortiWeb uses to scan for SQL injection attacks,
click to enable or disable additional SQL syntax validation. When this
option is enabled and the validation is successful, FortiWeb takes the
specified action. If it fails, FortiWeb takes no action. See False
Positive Mitigation for SQL Injection signatures for details.
Attack log messages generated by signatures that support this feature
have a False Positive Mitigation field. The value indicates whether
FortiWeb identified the attack using the signature and additional SQL
syntax validation ("Yes") or the just the signature ("No").
Action In each row, select the action that FortiWeb takes when it detects a
violation of the rule. Supported options vary (available options are
(column)
listed in the description for each specific rule), but may include:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (or reset the connection) and
generate an alert email and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
l Send HTTP Response Block and reply to the client with an HTTP
error message and generate an alert email and/or log message.
You can customize the attack block page and HTTP error code that
FortiWeb returns to the client. See Customizing error and authentication
pages (replacement messages) on page 720.
l Alert & Erase Hide sensitive information in replies from the web
server (sometimes called cloaking). Block the request or remove the
sensitive information, and generate an alert email and/or log message.
Caution: This option is not fully supported in offline protection mode.
Only an alert and/or log message can be generated; sensitive information
cannot be blocked or erased.
l Erase, no Alert Hide sensitive information in replies from the
web server (sometimes called cloaking). Block the request or
remove the sensitive information, but do not generate an alert email
and/or log message.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period In each row, type the number of seconds that you want to block
subsequent requests from the client after the FortiWeb appliance
(column)
detects that the client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. In each row,
(column)
select which severity level the FortiWeb appliance will use when it logs
a violation of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Action In each row, select which trigger, if any, that the FortiWeb appliance will
use when it logs and/or sends an alert email about a violation of each rule.
(column) See Viewing log messages on page 768.
Cross Site Scripting Enable to prevent a variety of cross-site scripting (XSS) attacks, such
as some varieties of CSRF (cross-site request forgery).
In the Action column, select what FortiWeb does when it detects this
type of attack.
SQL Injection Enable to prevent SQL injection attacks, such as blind SQL injection.
Attack log messages contain SQL Injection and the subtype and
signature ID (for example, SQL Injection : Signature ID
030000010) when this feature detects a possible attack.
In the Action column, select what FortiWeb does when it detects this
type of attack.
Unlike SQL Injection, the extended signatures are more likely to cause
false positives. However, they may be necessary in specific, high-
security data centers. If one of the signatures is causing false
positives and you need to instead configure a custom attack signature
that will not cause false positives, you can individually disable that
signature.
In the Action column, select what FortiWeb does when it detects this
type of attack.
Attack log messages contain Trojans and the subtype and signature
(for example, Trojans: Signature ID 070000001) when this feature
detects malware or Webshell.
Information Disclosure Enable to detect server error messages and other sensitive messages
in the HTTP headers, such as CF Information Leakage (Adobe
ColdFusion server information).
In the Action column, select what FortiWeb does when it detects this
type of attack:
l Alert
Note: Does not cloak, except for removing sensitive headers.
(Sensitive information in the body remains unaltered.)
l Period Block
l Redirect
Tip: Some attackers use 4XX and 5XX HTTP response codes for web
site reconnaissance when identifying potential targets: to determine
whether a page exists, has login failures, is Not Implemented, Service
Unavailable, etc. Normally, the FortiWeb appliance records attack
logs for 4XX and 5XX response codes, but HTTP response codes are
also commonly innocent, and too many HTTP response code
detections may make it more difficult to notice other information
disclosure logs. To disable response code violations, disable both the
HTTP Return Code 4XX and HTTP Return Code 5XX options in this
rules area.
Bad Robot Enable to analyze the User-Agent: HTTP header and block known
content scrapers, spiders looking for vulnerabilities, and other typically
unwanted automated clients.
Some robots, however, are not well-behaved. You can request that
robots not index and/or follow links, and disallow their access to
specific URLs (see http://www.robotstxt.org/). However, misbehaving
robots frequently ignore the request, and there is no single standard
way to rate-limit robots.
Credit Card Detection Enable to detect credit card numbers in the response from the server.
Also configure Credit Card Detection Threshold.
Credit card numbers being sent from the server to the client,
especially on an unencrypted connection, constitute a violation of PCI
DSS. In most cases, the client should only receive mostly-obscured
versions of their credit card number, if they require it to confirm which
card was used. This prevents bystanders from viewing the number,
but also reduces the number of times that the actual credit card
number could be observed by network attackers. For example, a web
page might confirm a transaction by displaying a credit card number
as:
XXXX XXXX XXXX 1234
In the Action column, select what FortiWeb does when it detects this
type of attack.
Credit Card Detection Enter a threshold if the web page must contain a number of credit
Threshold cards that equals or exceeds the threshold in order to trigger the credit
card number detection feature.
For example, to ignore web pages with only one credit card number,
but to detect when a web page containing two or more credit cards,
enter 2.
5. Click OK.
6. If you enabled Information Disclosure, Trojans, or Credit Card Detection, configure a decompression rule.
See Configuring temporary decompression for scanning & rewriting on page 651.
Failure to configure a decompression rule, or, for HTTPS requests, to provide the
servers x.509 certificate in either Certificate or Certificate File, will result in FortiWeb
being unable to scan requests. This effectively disables those features.
7. To apply the signature rule, select it in an inline protection profile or an offline protection profile (see
Configuring a protection profile for inline topologies on page 658 or Configuring a protection profile for an out-
of-band topology or asynchronous mode of operation on page 669).
8. If Device Tracking is enabled in a web protection profile and a selected device reputation security policy uses
signatures, it is possible to adjust the threat weight of each signature. Go to Signature Details, select a
signature, and adjust its weight in the Threat Weight tab. For details, see Blacklisting client devices with
poor reputation.
9. To verify your configuration, attempt a request that should be detected and/or blocked by your configuration.
Instead of actually executing the exploit or uploading a virus, attempt a harmless script
with similar syntax, or upload an EICAR file. Alternatively, test your configuration in a
non-production environment.
If detection fails:
l Verify that routing and TCP/IP-layer firewalling does not prevent connectivity.
l Verify that your simulated attack operates on either the HTTP header or HTTP body, whichever component is
analyzed by that feature.
l If the feature operates on the HTTP body, verify that http-cachesize is large enough, or that you have
configured to Body Length block requests that exceed the buffer limit. For details, see the FortiWeb CLI
Reference.
l If the HTTP body is compressed, verify that Maximum Antivirus Buffer Size is large enough, or that you have
configured to Body Length block requests that exceed the buffer limit.
l If you enabled Trojans, verify that you have also configured its configuration dependencies (see Limiting file
uploads on page 637).
l If the feature operates on the parameters in the URL line in the HTTP headers, verify that the total parameter
length (after URL decoding, if required configure Recursive URL Decoding) is not larger than the buffer size
of Total URL Parameters Length or Total URL Parameters Length.
10. If normal input for some URLs accidentally matches a signature, either create and use a modified version of it
instead via custom signatures, or create exceptions (Configuring action overrides or exceptions to data leak &
attack detection signatures on page 556).
See also
l Filtering signatures
l Configuring action overrides or exceptions to data leak & attack detection signatures
l Sequence of scans
l Preventing zero-day attacks
l Limiting file uploads
l How often does Fortinet provide FortiGuard updates for FortiWeb?
l IPv6 support
The signatures that FortiWeb uses to detect SQL injection attacks are classified into three classes: SQL
Injection, SQL Injection (Extended) and SQL Injection (Syntax Based Detection). You can see them
being listed in a signature policy. When SQL Injection or SQL Injection (Extended) is enabled, FortiWeb scans
the requests and matches them with the signatures based on pattern recognition (multi-pattern keyword and
regular expression pattern). However, such detection approach will inevitably cause false positives; one normal
request might be mistakenly marked as a SQL injection attack. For example, the following is a SQL Injection that
will trigger a signature violation
GET /test.asp?id=1 and 0<>(select count(*) from user_table where user like 'admin')
HTTP/1.1
, however, a harmless request will match the signature as well if the request just has the key words select and
user in the parameter value like:
GET /test.asp?text= please select a user from the group to test our new product HTTP/1.1
, which is a false positive.
When FortiWeb's False Positive Mitigation is enabled, a signature triggered request is processed further to
validate whether it is a true SQL instruction. If it is then we can make the assumption that this is a SQL Injection
attempt.
To verify whether the request is a SQL instruction FortiWeb uses lexical analysis which converts the statement
characters in the request into a sequence of tokens. It then runs the tokens through different built-in SQL
templates and using a SQL parser it validates whether this is a true SQL structure. If it is then this event is not a
false positive and FortiWeb triggers the signature violation action
Enable False Positive Mitigation for SQL Injection and SQL Injection (Extended)
When SQL Injection and/or SQL Injection (Extended) are/is enabled in a signature policy, you can enable
False Positive Mitigation to the signatures through Web Protection > Known Attacks > Signatures.
Alternatively, you can apply False Positive Mitigation to SQL Injection and/or SQL Injection (Extended) when
editing the signatures (View or edit a signature policy and click Signature Details.) Signature Details).
3. Specify the signatures to which you would (or not) like to apply False Positive Mitigation.
Actually, False Positive Mitigation is not designed for every signature of SQL Injection and SQL Injection
(Extended) categories. Particular signatures, such as 030000010, 030000019 and 030000042 in SQL
Injection or 040000010, 040000019 and 040000042 in SQL Injection (Extended), support False Positive
Mitigation.
When drilling into the categories to check individual signature, you will see a check box named False
Positive Mitigation Support in the Signature tab if this signature supports False Positive Mitigation.
By default, all of them are checked. You can uncheck any of them if you would not like to apply False Positive
Mitigation to the signature.
Using regular expression based signatures to detect SQL injection attacks is core to a WAF solution however it
does not go without issues. Due to the nature of the SQL language being similar to the English grammar false
positives can occur together with false negatives as evasion techniques evolve. For example, one regex rule can
not completely cover all the variables of a SQL injection type, such as:
SELECT * FROM users WHERE id = 1 OR 1=1
SELECT * FROM users WHERE id = 1 OR abc=abc
SELECT * FROM users WHERE id = 1 OR 3<5
SELECT * FROM users WHERE id = 1 OR UTC_DATE()=UTC_DATE()
It is a continuous and tedious process to maintain and update the signatures to address new evasion techniques
and to tune false positives.
FortiWeb's Syntax-based SQL Injection Detection detects a SQL injection attack by analyzing the lexeme and
syntax of SQL language rather than using a pattern matching mechanism. It first turns the input statement into a
sequence of tokens, and then turns the sequence of tokens into an abstract syntax tree (AST), which is a tree
representation of the abstract syntactic structure of the input statement. The parser will check whether this is a
valid SQL grammar, and compare the produced AST with AST of built-in standard SQL statements to check
whether they have the same AST structure. If it is not then FortiWeb recognizes it as a SQL injection attempt and
then triggers the violation action.
For example, you may be asked to enter the employee ID on the web page when you want to check someone's
profile. The employee ID is the condition value for the query, and it is sent to the web server by a request:
GET /employee_profile.asp?employee_id=20001 HTTP/1.1
Then the received value 2001 will be combined with a SQL template to generate a SQL statement for the query:
select * from employee where employee_no = 2001
However, if a client inputs the condition value with a snippet such as 1 or 1 = 1, it might be a SQL injection
attempt.
When Syntax-based SQL Injection Detection is enabled, the snippets in requests will be processed by SQL
template combination, grammar parsing and AST comparison to validate whether it is a SQL injection. For
example, the snippet 1 or 1 = 1 will be extracted from request
GET /employee_profile.asp?employee_id=1 or 1 = 1 HTTP/1.1
and combined with a FortiWeb built-in template
select * from t where v = [injection point]
to generate the SQL statement
select * from t where v = 1 or 1 = 1
FortiWeb runs the process to build AST for the target SQL statement and compare it with the FortiWeb built-in
standard AST to see if they have the same structure. Different but equivalent SQL statements yield the same
AST structure, and nonequivalent SQL statements have different AST structures. For example, here are a built-in
standard statement and two target statements:
SELECT select list FROM table list WHERE clause SELECT select list FROM table list WHERE clause
* t * t
condi!on 1 condi!on 1
v=1 v = WAF products
The second target statement is nonequivalent to the built-in standard statement, they are different AST
structures as following and so that a SQL injection is detected:
SELECT select list FROM table list WHERE clause SELECT select list FROM table list WHERE clause
* t * t
l Double Quote Based SQL Injection: select * from t where v = "[injection point]"
l Single Quote Based SQL Injection: select * from t where v = '[injection point]'
l As-Is Based SQL Injection: select * from t where v = [injection point]
By default, FortiWeb enables all three templates. While you can disable each one, it is not recommended to do
so unless you're absolutely certain that this query type is not supported by the database.
a'+'b
Arithmetic operation based boolean injection A' DIV 'B
A' & 'B
2. Click the status button for SQL Injection (Syntax Based Detection) to enable it, and double-click to set the
Action, Block Period, Severity and Trigger Action for the policy:
3. While not recommended, enable/disable individual templates and signatures if necessary (see Built-in SQL
statement templates).
Configuring action overrides or exceptions to data leak & attack detection sig-
natures
You can configure FortiWeb to omit attack signature scans in some cases. You can also configure the signature
to generate a log or alert only instead of blocking the attack.
Exceptions are useful when you know that some parameters, during normal use, cause false positives by
matching an attack signature. Signature exceptions define request parameters that are not subject to signature
rules. You can define exceptions using the following request elements:
l HTTP method
l Client IP
l Host
l URI
l Full URL
l Parameter
l Cookie
For example, the HTTP POST URL /pageupload accepts input that is PHP code, but it is the only URL on the
host that does. Create an exception that, in the PHP Injection category, disables that specific signature ID for
the URL /pageupload in the signature rule that normally blocks all injection attacks.
If you are not sure which exceptions to create, examine your attack log for messages
generated by normal traffic on servers that are not actually vulnerable to that attack.
Click the Message field content, and then click Add Exception.
Disabling signatures, adding exceptions, or setting the action to Alert Only while viewing the attack log
6. To disable the signature for this rule, or globally, right-click the signatures row and select the appropriate
option.
9. For Element Type, select the type of element to exempt from this signature, and then configure these
settings:
HTTP Method
Operation l Include FortiWeb does not perform a signature scan for requests
that include the specified HTTPmethods.
l Exclude FortiWeb only performs signature scans for requests that
include the specified HTTPmethods.
HTTP Method Select the methods to include or exclude from the signature exemption.
Client IP
Operation l Equal FortiWeb does not perform a signature scan for requests
with a client IPaddress that matches the value of Client IP.
l Not Equal FortiWeb only performs a signature scan for requests
with a client IPaddress that matches the value of Client IP.
Client IP Specify the client IP address that FortiWeb uses to determine whether
or not to perform a signature scan for the request.
Host
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
URI
Value Specifies a URL value to match. The value does not include
parameters. For example, /testpage.php, which match requests
for http://www.test.com/testpage.php?a=1&b=2.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Full URL
Value Specifies a URL value that includes parameters to match. For example,
/testpage.php?a=1&b=2, which match requests for
http://www.test.com/testpage.php?a=1&b=2.
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Parameter
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918)
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
Cookie
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918)
Check Value of Select to specify a cookie value to match in addition to the cookie name.
Specified Element
To create and test a regular expression, click the >> (test) icon (see
Regular expression syntax on page 918).
See also
l The concatenate type for the HTTPMethod exception rule (ID 2) is And.
l The concatenate type for the Client IP rule (ID 3) is Or.
l The concatenate type for the URI rule has no effect, because it is the first rule.
The final logic of the example is (1 And 2) OR (3), which means FortiWeb skips the signature when both the URI
and HTTPMethod exception rules match the request, or the Client IP rule matches.
Filtering signatures
You can filter signatures using a keyword.
You can filter your view of the signatures in a signature policy to quickly find the following items:
l Disabled signatures
l Signatures that you changed from their default action to Alert Only
l SQL injection signatures for False Positive Mitigation Support, which provides additional SQL syntax validation,
is disabled
l Signatures that correspond to a specific CVE identifier
l Signatures configured with one or more exceptions
To easily locate these kinds of signatures for review or editing, click Filters in the navigation tree, select the type
of filter you want to apply, and then click Apply.
See also
If the predefined regular expressions cause false positives or do not match what you need, you can configure your
own. This gives you the flexibility to define your own special types of personally identifiable information, as well
as zero-day attacks.
Signatures should be crafted carefully to avoid performance issues inherent in regular expressions that use
recursion (see Regular expression performance tips on page 826).
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Action Select the action FortiWeb takes when it detects a violation of the
rule:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (reset the connection) and
generate an alert and/or log message. This option is applicable only
if Direction is Signature Creation.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the attack block page and HTTP error code that
FortiWeb returns to the client. See Customizing error and authentication
565 FortiWeb 5.8 Release Notes
pages (replacement messages) on page 720.
Fortinet Technologies Inc.
Blocking known attacks & data leaks Defining custom data leak & attack signatures
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Action Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See
Monitoring currently blocked IPs on page 814.
3. Click OK.
4. Click Create New to create a custom signature condition rule.
5. Complete the following settings:
Match Operator l Regular expression match The signature matches when the value
of a selected target in the request or response matches the Regular
Expression value.
l Greater than/Less than/Not equal/Equal FortiWeb determines
whether the signature matches by comparing the value of a selected
target in the request or response to the Threshold value.
Case Sensitive Select to differentiate between upper case and lower case letters in
the Regular Expression value.
If Action is Alert & Erase, enclose the portion of the regular expression to
erase in brackets.
To create and test a regular expression, click the >> (test) icon (see Regular
expression syntax on page 918).
Threshold If Greater Than, Less Than, Equal, or Not Equal is selected as the
MatchOperator, this is the value that FortiWeb uses to evaluate a
selected target.
Available Target/Selected Use the arrows to add or remove locations in the HTTP request that
Target FortiWeb scans for a signature match, then click the right arrow to move
them into the Search In area
6. Click OK.
7. Repeat this procedure for each individual rule that you want to add.
8. Click OK to save your custom signature.
9. Go to WebProtection> KnownAttacks, and select the CustomSignatureGroup tab.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
10. Click Create New to create a new group of custom signatures. (Alternatively, to add your custom signature to
an existing set, click Edit to add it to that set.)
A dialog appears.
11. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
14. From the Custom Signature drop-down list, select the specific custom signature to add to the group.
To view or change information associated with the custom signature, select the Detail link. The Edit
Custom Signature dialog appears. You can view and edit the rules. Use the browser Back button to return.
15. Click OK.
16. Repeat the previous steps for each individual rule that you want to add to the custom signature set.
17. Group the custom signature set in a signature rule (see Blocking known attacks & data leaks on page 538).
When the custom signature set is enabled in a signature rule policy, you can add either the group or an individual
custom signature rule in the group to an advanced protection custom rule (see Combination access control & rate
limiting on page 460).
See also
l Example: ASP .Net version & other multiple server detail leaks
l Example: Zero-day XSS
l Example: Local file inclusion fingerprinting via Joomla
l Example: Sanitizing poisoned HTML
l Blocking known attacks & data leaks
Example: ASP .Net version & other multiple server detail leaks
Example.com is a cloud hosting provider. Because it must offer whatever services its customers web applications
require, its servers run a variety of platforms even old, unpatched versions with known vulnerabilities that have
not been configured securely. Unfortunately, these platforms advertise their presence in a variety of ways,
identifying weaknesses to potential attackers. HTTP headers are one way that web server platforms are easily
fingerprinted. Example.com wants to remove unnecessary headers that provide server details to clients in order
to make it harder for attackers to fingerprint their platforms and craft successful attacks. Specifically, it wants to
erase these HTTP response headers:
X-AspNet-Version: 2.0.50727
X-AspNetMvc-Version: 3.0
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
To do this, Example.com writes a custom signature that erases content with 4 meet condition rules, one to match
the contents of each header (but not the headers key), and includes the custom signature in the signature set
used by the protection profile:
Direction Response
Severity Low
The result is that the client receives HTTP responses with headers such as:
Server: XXXXXXXX
X-Powered-By: XXXXXXXX
X-AspNet-Version: XXXXXXXX
To improve performance, Example.com could use the attack logs generated by these
signature matches to notify system administrators to disable version headers on their
web servers. As each customers web server is reconfigured properly, this would
reduce memory and processor power required to rewrite its headers.
See also
Today, its incident response team discovered a previously unknown XSS attack. The attacker had breached the
web applications own input sanitization defenses and succeeded in embedding 3 new methods of browser
attacks in many forum web pages. Example.com wants to write a signature that matches the new browser
attacks, regardless of what method is used to inject them.
All of the example text colored magenta contributes to the success of the attacks, and
should be matched when creating a signature.
The incident response team has also found two other classes of XSS that evades the forums own XSS sanitizers
(which only look for injection of <script> and <object> tags). The first one exploits a web browsers parser by
tricking it with additional quotes in an unexpected place:
<img """><script>alert("XSS")</script>">
The second one exploits the nature of all web pages with images and other external files. Other than the web
page itself, all images, scripts, styles, media, and objects cause the web browser to make secondary HTTP
requests: one for each component of the web page. Here, the <img> tag causes the clients web browser to
make a request that is actually an injection attempt on another web site.
<img src="http://other.example.com/command.php?variable=attackcode">
The incident response team has written 3 regular expressions to detect each of the above XSS attack classes, as
well as similar permutations that use HTML tags other than <img>:
l <(.*)src(\s)*=(\s)*[](\s)*(.*)(\s)*[](\s)*onError
l <(.*)[][]*(.*)>(\s)*<script>
l <(\s)*[^(<script)](\s)*src(\s)*=(\s)*(http|https|ftp|\\\\|\/\/)(.*)\?
To check for any of the 3 new attacks, the team creates a custom signature with 3 meet condition rules.
(Alternatively, the team can create a single meet condition rule that joins the 3 regular expressions by using pipe
(|) characters between them.)
Direction Request
Severity High
In the above example, the attacker uses the back tick () used instead of
quotes, avoids the literal mention of javascript:, and does not match a
regular expression that requires the exact, unvaried HTML tag <script>. Your
regular expression should be flexible enough to account for these cases.
If content has already been corrupted by a successful attack, you can simultaneously
sanitize all server responses and notify the response team of specific corrupted URLs.
This can help your incident response team to quickly clean the impacted applications
and databases. See Example: Sanitizing poisoned HTML on page 524.
See also
Lets say your honeypot, like your production web servers, runs Joomla. In either your web servers logs, you see
requests for URLs such as:
10.0.0.10
-
-
[16/Dec/2011:09:30:49 +0500]
"GET /index.php?option=com_
ckforms&controller=../../../../../../../../winnt/system32/cmd.exe?/c+ver HTTP/1.1"
200
"-"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0a2) Gecko/20111101 Firefox/9.0a2)"
where the long string of repeated ../ characters indicates an attempt at directory traversal: to go above the web
servers usual content directories.
If Joomla does not properly sanitize the input for the controller parameter (highlighted in bold above), it
would be able to use LFI. The attackers goal is to reach the cmd.exe file, the Microsoft Windows command
line, and enter the command ver, which displays the web servers specific OS version, such as:
Microsoft Windows [Version 6.1.7601]
Since the attacker successfully fingerprinted the specific version of Windows and Joomla, all virtual hosts on that
computer would be vulnerable also to any other attacks known to be successful on that platform.
Luckily, this is happening on your honeypot, and not your companys web servers.
To detect similar attacks, you could write your own attack signature to match and block that and similar directory-
traversing requests via controller, as well as to notify you when your production web servers are being
targeted by this type of attack:
Direction Request
Severity High
If packet payload retention and logging were enabled, once this custom signature was applied, you could analyze
requests to locate targeted files. Armed with this knowledge, you could then apply defenses such as tripwires,
strict file permissions, uninstalling unnecessary programs, and sandboxing in order to minimize the likelihood that
this attacker would be able to succeed and achieve her objectives.
Like its predecessor the BEAST attack (see Prioritize RC4 Cipher Suite on page 688), the Lucky 13 attack
exploited flaws in SSL/TLS implementations of CBC encryption. Classified as a paddingoracle attack, Lucky 13
analyzes errors returned by the server (its oracle) after submitting incorrect padding empty bytes that are
added to plain text to make its length uniform before encryption is applied. (Padding is required by all block
ciphers.) Once the attacker guesses the correct padding, the resulting encrypted messages have a similar
pattern. Attackers can analyze many packets to find the pattern, and thereby decrypt the data for a MITM attack.
This attack involves some brute force: the attacker must guess repeatedly until the server does not return an
error, indicating that the correct padding has been discovered. As such, padding attacks may not have been
feasible 10 years ago. However as broadband connections and powerful computers become pervasive, this kind
of attack has become practical.
Not all web applications use HTTPS, however. Cryptography generally decreases performance. To improve
performance while attempting to protect sensitive data, some web applications selectively encrypt above the
application level. They encrypt only specific inputs and outputs, such as:
l session IDs
l cookies
l user profile URLs
l passwords
But if the custom functions to encrypt these inputs use the same principle as CBC, or are not well tested or
promptly updated for security, they too are vulnerable to padding attacks.
For example, if only a user ID is encrypted, an attacker may want to decrypt it so that he or she can follow with a
session hijacking attack. The attackers initial request might look like this:
GET /profile.jsp?UID=0000000000000001F851D6CC68FC9537...
The UID is a guess. Unless he or she is extremely lucky, the attacker did not use the correct key nor padding (e.g.
0x01). Therefore the application would reply with an error response such as:
500 Internal Server Error
But if the attacker increases or decreases the padding byte (e.g. 0x02), sends the request again, and repeats this
process, the attacker would eventually guess the correct padding, resulting in a message from the server that
indicates a correct padding byte:
200 OK
Repeating the above process with previous padding bytes would eventually yield the full, correct padding, and
therefore also the length of the plain text. With that, the attacker would eventually be able to decrypt the entire
UID. The attacker could then attempt to hijack the login.
1. Consult with your application developer to find inputs that are individually encrypted.
Do not configure padding oracle attack prevention unless the URL, cookie or
parameter is encrypted. Only encrypted inputs or URLs, especially those encrypted
using CBC, ECB, or OAEP, are vulnerable. Unnecessary protection will decrease
FortiWeb performance.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the request and generate an alert email and/or log
message.
l Alert & Deny Block the request (reset the connection) and
generate an alert and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is Medium.
Trigger Action Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See
Monitoring currently blocked IPs on page 814.
4. Click OK, then click Create New, then configure these settings:
Host Status Enable to apply this rule only to HTTP requests for specific web hosts.
Also configure Host.
Disable to match the rule based upon the other criteria, such as the
URL, but regardless of the Host: field.
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match the rule.
Type Select whether the Protected URL field must contain a literal URL (Simple
String), or a regular expression designed to match multiple URLs
(Regular Expression).
l the literal URL, such as /profile.jsp, that the HTTP request must
contain in order to match the rule. The URL must begin with a backslash
(/).
l a regular expression, such as ^/*\.jsp\?uid\=(.*), matching all
and only the URLs to which the rule should apply. The pattern does not
require a slash (/).; however, it must at least match URLs that begin with
a slash, such as /profile.cfm.
Do not include the domain name, such as www.example.com,
which is configured separately in the Host drop-down list.
To create and test a regular expression, click the >> (test) icon. This
opens the Regular Expression Validator window where you can
fine-tune the expression (see Regular expression syntax on page 918
and Cookbook regular expressions on page 926).
Protected Target Indicate which parts of the clients requests should be examined for
padding attack attempts:
5. Click OK.
6. Repeat the previous 2 steps for each encrypted input in the web application.
7. Click OK.
8. To apply the rule, select it in an inline protection profile or an offline protection profile (see Configuring a
protection profile for inline topologies on page 658 or Configuring a protection profile for an out-of-band
topology or asynchronous mode of operation on page 669).
Malicious clients often send many HTTP requests while attempting to analyze the
padding. This could flood your attack logs with repetitive messages. To adjust the
interval at which FortiWeb will record identical log messages during an ongoing attack,
see max-dos-alert-interval <seconds_int> in the FortiWeb CLI
Reference. See also Log rate limits on page 752.
Cross-site request forgery (CSRF) is an attack that exploits the trust that a site has in a user's browser to transmit
unauthorized commands.
The CRSFprotection feature is not supported when the operation mode is offline protection or transparent
inspection.
Configuration overview
To protect back-end servers from CSRF attacks, you create two lists of items: a list of web pages to protect
against CSRFattacks, and a corresponding list of the URLs found in the requests that the pages generate.
l When FortiWeb receives a request for a web page in the list, it embeds a javascript in the web page. The script runs
in the client's web browser and automatically appends the parameter tknfv (the anti-CSRF token) to any HTML
link elements that have the href attribute (<a href>) and HTMLform elements. Subsequent requests that these
HTML elements generate contain the tknfv parameter. The parameter has the value of the cookie issued by
FortiWeb Session Management.
l The URL list contains all the URLs that you expect to contain the tknfv parameter, based on the web pages
that you specified. When these URLs appear in requests without the tknfv parameter, or the parameter does
not match the cookie value for the session, FortiWeb takes the action you specify in the CSRF protection rule.
Create your configuration carefully, making sure that all the URLs in the list have corresponding entries in the
page list, and that Session Management is enabled in the protection profile that uses the rule. When FortiWeb
checks requests for the token but has not added the script to the corresponding web page, it blocks or takes other
action against the request.
For example, a web page in the list of pages contains the following <a href> element:
<a href=/https/www.scribd.com/csrf_test1.php>test</a>
This link generates the following request, which includes the parameter that the javascript has added:
http://example.com/csrf_test1.php?tknfv=3DF5BDCCIG3DCXNTE3RUNCTKRS3E36AD
Therefore, to make the feature work for this web page, you add /csrf_test1.php to the list of URLs.
For an example using an HTMLform element, the web page csrf_login.html contains the following form:
<form name="do_some_action" id="form1" action="csrf_test2.php" method="GET">
<input type="text" name="username" value=""/>
<Input type="text" name="password" value=""/>
<input type="submit" value="do Action"/>
</form>
This form generates the following request when the page is added to the list of pages protected by a
CSRFprotection policy:
http://target-site.com/csrf_
test2.php?username=test&password=123&tknfv=3DF5BDCCIG3DCXNTE3RUNCTKRS3E36AD
In this case, you add csrf_login.html to the list of pages and /csrf_check2.php to the list of URLs.
Parameter filters
In some cases, a request for a web page and the requests generated by its links have the same URL. FortiWeb
cannot distinguish between requests to add javascript to and requests to check for the anti-CSRF parameter.
To avoid this issue, you create unique Page List Table and URL List Table items by adding a parameter filter to
them. The parameter filter allows you to add additional criteria to match in the URLor HTTPbody of a request.
For example, in the following form element, the parameters are in the body of the HTTP request, not the URL:
<form action="post.asp" enctype="MULTIPART/FORM-DATA" method="POST">
<input TYPE="FILE" NAME="FILE1"
<input TYPE="TEXT" NAME="TEXT1" VALUE="HELLO">
<input TYPE="SUBMIT" NAME="SUB1" VALUE="Upload File">
</form>
To allow FortiWeb to correctly recognize the POST request as one that should contain the anti-CSRF token, add
a filter that checks for a parameter in the HTTP body to the corresponding URL List Table item. If the request for
post.asp does not contain the parameter specified in the URL List Table item, FortiWeb can instead match it
with a post.asp item in the Page List Table, and adds the javascript to it.
You can also match a parameter in the URL. For example, the request to match has the following URL:
/www.test.com?username=test&password=123
Troubleshooting
l The type of the web page to protect is HTML and contains the <html> and </html> tags.
l The HTTP response code for the page is 200 OK.
l If the page is compressed, a corresponding uncompress policy is configured. See Configuring temporary
decompression for scanning & rewriting on page 651.
l The Maximum Body Cache Size value is larger than the size of the web page. See Advanced settings on page
727
3.
Name Enter a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters.
l Alert Accept the request and generate an alert email, log message, or
both.
l Alert & Deny Block the request (reset the connection) and
generate an alert, a log message, or both.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: Logging and alert email occur only if the corresponding settings
are enabled and configured. See Logging on page 749 and Alert email
on page 780.
Block Period Enter the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects a
CSRFattack.
Severity When FortiWeb records violations of this rule in the attack log, each
log message contains a Severity Level (severity_level) field.
Select which severity level FortiWeb uses when it logs a CSRF attack:
l Low
l Medium
l High
The default value is Low.
Trigger Action Select the trigger, if any, that FortiWeb uses when it logs or sends an alert
email about a CSRF attack. See Viewing log messages on page 768.
4. Click OK.
5. Under Page List Table, click Create New, and then configure these settings:
6.
Host Status Enable to apply this rule only to HTTP requests for specific web hosts.
Also configure Host.
Disable to match the rule based on the URL and any parameter filter
only.
Host Select a protected host names entry (either a web host name or IP
address) that the Host: field of the HTTP request matches.
Request Type Select whether Full URL contains a literal URL (Simple String), or a
regular expression designed to match multiple URLs (Regular
Expression).
When you select Regular Expression, you do not have to enter the
complete URL for Full URL.
For example, there are two ways you can configure the item to match
the URL /www.test.com?:
l For Request Type, select Simple String, and for Full URL, enter
/www.test.com.
l For Request Type, select Regular Expression, and for Full URL,
enter test\.com.
Parameter Filter Select to specify a parameter name and value to match. The parameter
can be located in either the URL or the HTTP body of a request.
Parameter Value Type Select whether Parameter Value contains a literal URL (Simple String),
or a regular expression designed to match multiple values (Regular
Expression).
7. Click OK.
8. Add any additional web pages that you want to protect.
9. Under URL List Table, click Create New, and then configure the settings. The settings for adding a URLlist
item are the same as the ones that you use to add a page list item.
HTTP response security headers are a set of standard HTTP response headers proposed to prevent or mitigate
known XSS, clickjacking, and MIME sniffing security vulnerabilities. These response headers define security
policies to client browsers so that the browsers avoid exposure to known vulnerabilities when handling requests.
When FortiWeb's HTTP Security Headers feature is enabled, headers with specified values are inserted into
HTTP responses coming from the backend web servers. This is a quick and simple solution to address the
security vulnerabilities on your web site without code and configuration changes. The following includes three
different security headers that FortiWeb can insert into resposnes:
l nosniff: The browser will not guess any content type that is not explicitly
specified when downloading extensions.
l Sanitizing Mode: The browser will sanitize the malicious scripts when a
XSS attack is detected.
l Block Mode: The browser will block the page when a XSS attack is
detected.
1. Go to Web Protection > Advanced Protection > HTTP Header Security and select an existing policy or
create a new one. If creating a new policy, the maximum length of the name is 63 characters; special
characters are prohibited.
2. If you created a new policy, click OK to save it. If editing an existing policy, select it and click Edit.
3. Select an existing rule to edit or create a new one in Secure Header Table.
4. Configure the following settings:
Fields Descriptions
Select Simple String to match the URL of requests with a literal URL
specified in Request URL.
Request URL Type Select Regular Expression to match the URL of requests with a regular
expression specified in Request URL.
Request URL Specify the URL used to match requests so that security headers can be
applied to responses of the matched requests.
l X-Frame-Options
Secure Header Type l X-Content-Type-Options
l X-XSS-Protection
For details, see FortiWeb security headers.
Header Value Select the value for the selected security header.
Fields Descriptions
l DENY
l SAMEORIGIN
l ALLOW-FROM
If X-Content-Type-Options is selected, the option will be:
l nosniff
If X-XSS-Protection is selected, the options will be:
l Sanitizing Mode
l Block Mode
For details, see FortiWeb security headers.
Page order rules (called page access rules in the web UI) define URLs that must be accessed in a specific
order to enforce correct business logic or application logic of a web application, and prevent cross-site request
forgery (CSRF) attacks.
Normal No
Page Request Order Session Cookie
in a Session Modify to 3rd Page
wd
ss
pa
>
View
x
Co
ok
ie
:
na
me
=c
oo
ki
es
es
Cook si
ie: on
1.
Login name
=coo
kies
essi
..
Set-Cookie: name=cookiesession1...
on1.
..
1. A client begins an HTTP session by requesting the login page.
GET /login.asp
When the web server responds, FortiWeb adds its HTTP session cookie to the response to initiate a unique
HTTP session for that client. All subsequent requests from the client will include this cookie until the client
ends the session or the cookie expires. The cookie identifies the client, and coupled with the request URL,
allows FortiWeb to track the clients current session state, and enforce session-related features.
Depending on the web application, the clients login status could be cached server-side, or could be added to
a cookie in the response, to be cached client-side.
3. If the login is successful, the web application displays the clients account profile, which includes a password
change form.
GET /profile.asp
5. If the password change is successful, the account profile web page notifies the client.
GET /profile.asp?status=success
Authentication is required in order to prove the clients identity. Unless HTTP session initiation is required and
initial authentication is bound to that session, an attacker could change (or possibly simply read) the password of
any users account simply by making a request like step 4 with the password query in its URL and/or repeating a
stolen session cookie. Therefore password access should never be allowed in page requests ordered like this:
POST /setPassword.asp?account=user1&password=myPassw0rd!
2. The account profile page notifies the attacker of the successful change.
GET /profile.asp?status=success
where the password change page (/setPassword.asp) is requested before the client has initiated an
authenticated session.
In another example, an e-commerce application might be designed to work properly in this order:
2. The client either views and adds additional items to the shopping cart at multiple other URLs, or proceeds
directly to the checkout.
5. The client pays for the items and shipment, completing the transaction.
/payment.do
Sessions that begin at the shipping or payment stage should therefore be invalid. If the web application does not
enforce this rule itself, it could be open to CSRF attacks on the payment feature. To prevent such abuse,
FortiWeb could enforce the rule itself using a page access rule set with the following order in an HTTP session:
1. /addToCart.do?item=*
2. /checkout.do?login=*
3. /shipment.do
4. /payment.do
Attempts to request /payment.do before those other URLs (including the first URL, which initiates the HTTP
session) during a session would be denied, and generate an alert email and/or attack log message (see Logging
on page 749 and Alert email on page 780).
Requests for other, non-ordered URLs are allowed to interleave ordered URLs during the clients session. (Due to
web browsers back buttons, flexible and complex features, and customers browsing your e-commerce inventory
before completing a transaction, this is common.) Page access rules may be specific to a web host. This ensures
that if web applications have URLs with the same name, you do not necessarily have to apply the same page
order rules.
You can use SNMP traps to notify you when a page order rule has been enforced. For details, see SNMP traps &
queries on page 785.
1. Before you configure a page order rule, if you want to apply it only to HTTP requests for a specific real or
virtual host, you must first define the web host in a protected host names group. For details, see Defining your
protected/allowed HTTP Host: header names on page 349.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when
it logs and/or sends an alert email about a violation of the rule. See
Viewing log messages on page 768.
5. Click OK.
6. Click Create New to add an entry to the set.
A dialog appears.
ID Type the index number of the individual rule within the page access
rule, or keep the fields default value of auto to let the FortiWeb
appliance automatically assign the next available index number.
Page access rules should be added to the set in the order which
clients will be permitted to access them.
Host Select the name of a protected host that the Host: field of an HTTP
request must be in to match the page access rule.
Host Status Enable if you want the page access rule to apply only to HTTP requests for
a specific web host. Also configure Host.
Type Indicate whether URL Pattern is a Simple String (that is, a literal URL) or
a Regular Expression.
l the literal URL, such as /cart.php, that the HTTP request must
contain in order to match the page access rule. The URL must begin with
a slash (/).
l a regular expression, such as ^/*.php, matching all and only the URLs
to which the page access rule should apply. The pattern does not require
a slash (/); however, it must at match URLs that begin with a slash, such
as /cart.cfm.
Do not include the domain name, such as www.example.com,
which is configured separately in the Host drop-down list.
To create and test a regular expression, click the >> (test) icon. This
opens the Regular Expression Validator window where you can
fine-tune the expression (see Regular expression syntax on page
918).
8. Click OK.
9. Repeat the previous steps for each individual rule that you want to add to page access.
Because the new active appliance does not know previous session history, after an HA
failover, for existing sessions, FortiWeb will not be able to apply this feature. It will
apply to new sessions as they are formed. See Sessions & FortiWeb HA on page 54.
See also
To prevent attackers from exploiting web applications that are vulnerable to state-based attacks, you may need to
define legitimate entry points into your web applications.
When you select a start page group in the inline protection profile, clients must begin from a valid start page in
order to initiate a valid HTTP session. If they violate this rule, they will wither be logged, blocked, or redirected to
one of the valid entry pages (in the web UI, this is called the default page).
Normal No
Page Request Order Session Cookie
in a Session Modify to 3rd Page
wd
ss
pa
>
View
x
Co
ok
ie
:
na
me
=c
oo
ki
es
es
Cook si
ie: on
1.
Login name
=coo
kies
essi
..
Set-Cookie: name=cookiesession1...
on1.
..
All web pages in a start page rule must belong to the same web site. Start page rules
cannot redirect each violation to a different location, depending on which of the rules
was violated. If you choose to redirect violations, all violations will be redirected to the
same default URL.
For example, you may insist that HTTP clients of an e-commerce web site begin their session from either the
main page, an item view, or login. Clients are not allowed to begin a valid session from the third stage of the
shopping cart checkout. If someone initiates a session from partway through the shopping cart checkout, it is
likely to be an attack. But just in case it was due to a legitimate client clearing the browsers cookies or clicking a
link or bookmark, FortiWeb could redirect the request to one of the valid start pages.
1. Before you configure a start page rule, if you want to apply it only to HTTP requests for a specific real or virtual
host, you must first define the web host in a protected host names group. For details, see Defining your
protected/allowed HTTP Host: header names on page 349.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the connection and generate an alert email and/or log
message.
l Alert & Deny Block the request (reset the connection) and
generate an alert and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is Low.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
5. Click OK.
6. Click Create New to add an entry to the set.
A dialog appears.
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match a valid start page.
Host Status Enable to require that the Host: field of the HTTP request match a
protected host names entry in order to match a valid start page. Also
configure Host.
Type Select whether URL Pattern is a Simple String (that is, a literal URL
such as /index.html) or a Regular Expression.
Note: If Default is Yes, you must select Simple String and provide
the exact redirect/session initiation URL in URL Pattern. (A regular
expression does not specify a single definite destination, and
therefore is not a valid configuration in that case.)
l the literal URL, such as /index.php, that the HTTP request must
contain in order to match the start page rule. The URL must begin with a
slash (/).
If Default is Yes, the literal URL also indicates the redirect URL and/or
session initiation URL.
l a regular expression, such as ^/*.php, matching all and only the URLs
to which the start page rule should apply. The pattern does not require a
slash (/). However, it must at 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 the Host drop-down list.
To create and test a regular expression, click the >> (test) icon. This
opens the Regular Expression Validator window where you can
fine-tune the expression (see Regular expression syntax on page
918).
8. Click OK.
9. Repeat the previous steps for each start page that you want to add to the group of start pages.
10. To apply a start page rule:
l select it in an inline protection profile (see Configuring a protection profile for inline topologies on page 658)
l enable Session Management
Attack log messages contain Start Page Violation when this feature detects a start page violation.
Additionally, if the start page rule was configured to redirect the attacker, parameters will be appended to the
redirect URL to indicate the reason. e.g.:
http://example.com/index.html?redirect491=1&reason747sha=Start%20Page%20Vio
lation
Because the new active appliance does not know previous session history, after an HA
failover, for existing sessions, FortiWeb will not be able to apply this feature. It will
apply to new sessions as they are formed. See Sessions & FortiWeb HA on page 54.
See also
While your first line of defense is to scan for known attacks, zero-day attacks are, by definition, unknown.
To defend against zero-day buffer overflow, buffer underflow, shell code, and similar injection attacks that you
have not yet identified and created a signature for, input validation can help. You can configure FortiWeb to
sanitize inputs at the web application level. (For attacks that operate at the HTTP protocol level, or attacks that
are not types of application or document injection attacks, see HTTP/HTTPS protocol constraints on page 618
and Access control on page 453.)
See also
l Sequence of scans
l Defining custom data types
l Validating parameters (input rules)
l Preventing tampering with hidden inputs
You can configure rules to validate parameters (input) of your web applications.
Input rules define whether or not parameters are required, and their maximum allowed length, for requests that
match both the:
An HTML form with two inputs: Account IDs type attribute is text; Passwords type attribute is pass-
word
For example, one web page might have an HTML form with multiple inputs:
l a user name
l a password
l a preference for whether or not to remember the login
Within the input rule for that web page, you can define separate rules for each parameter in the request: one rule
for the user name parameter, one rule for the password parameter, and one rule for the preference parameter.
You can use the password rule to enforce password complexity by requiring it to match a Level 2 Password data
type.
Unlike hidden field rules, input rules are for visible inputs only, such as buttons and text areas. For information on
constraining hidden inputs, see Preventing tampering with hidden inputs on page 607.
Each input rule contains one or more individual rules. Collectively, individual rules define all parameter
restrictions that apply to requests matching the specified URL and host name combination.
If an HTTP/HTTPS request contains repeated parameters, FortiWeb enforces the input rules for all instances of
the parameter not just the first time it occurs in the request.
FortiWeb cannot enforce the rule if the parameter is bigger than the memory size you
have configured for FortiWebs scan buffers. To configure the buffer size, see http-
cachesize in the FortiWeb CLI Reference. If your web applications do not require
requests larger than the buffer, enable Malformed Request to harden your
configuration.
1. Before you configure an input rule, if you want to apply it only to HTTP requests for a specific real or virtual
host, you must first define the web host in a protected host names group (see Defining your protected/allowed
HTTP Host: header names on page 349). If you want to define your own data types, you should also
configure those first (see Defining custom data types on page 606).
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Host Status Enable to apply this input rule only to HTTP requests for specific web
hosts. Also configure Host.
Disable to match the input rule based upon the other criteria, such as
the URL, but regardless of the Host: field.
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match the signature exception.
Request URL Type Select whether the Request URL field must contain a literal URL (Simple
String), or a regular expression designed to match multiple URLs
(Regular Expression).
Request URL Depending on your selection in Request URL Type, type either:
l the literal URL, such as /index.php, that the HTTP request must
contain in order to match the input rule. The URL must begin with a
backslash (/).
l a regular expression, such as ^/*.php, matching all and only the URLs
to which the input rule should apply. The pattern does not require a slash
(/).; however, it must at least 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 the Host drop-down list.
To create and test a regular expression, click the >> (test) icon. This
opens the Regular Expression Validator window where you can
fine-tune the expression (see Regular expression syntax on page 918
and Cookbook regular expressions on page 926).
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the connection and generate an alert email and/or log
message.
l Alert & Deny Block the request (reset the connection) and
generate an alert and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
5. Click OK.
6. Click Create New to add an entry to the set. You can add up to 1,024.
A dialog appears.
Max Length Type the maximum length of the string that is the inputs value.
For example, if the inputs value is always a short string like candy,
the maximum length could be 5. If the value is a number less than
100 such as 42, the maximum length should be 2 (since the number
42 is 2 characters long).
Use Type Check Enable to validate the data type of the parameter. Also configure Argument
Type.
l Data Type Select one of the predefined data types from Data Type.
l Regular Expression Define the data type using a regular expression
in Regular Expression.
l Custom Data Type Select one of the custom data types from
Custom Data Type.
This option is only applicable when Use Type Check is enabled.
Data Type Select a predefined data type. See Auto-learning on page 207.
Regular Expression Type a regular expression that matches all valid values, and no invalid
values, for this input.
Custom Data Type Select a custom data type. See Defining custom data types on page
606.
8. Click OK.
9. Repeat the previous steps for each individual validation rule that you want to add to the group of validation
rules.
12. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
15. From the rule drop-down list, select the name of an existing input validation rule.
To view or change the information associated with the rule, select the icon. The Edit Parameter
Validation Rule dialog appears. Use the browser Back button to return.
16. Click OK.
17. Repeat the previous steps for each input rule that you want to add to the parameter validation rule.
18. To apply the parameter validation policy, select it in an inline or offline protection profile (see Configuring a
protection profile for inline topologies on page 658 or Configuring a protection profile for an out-of-band
topology or asynchronous mode of operation on page 669).
Attack log messages contain Parameter Validation Violation when this feature detects a
parameter rule violation.
If you do not want sensitive inputs such as passwords to appear in the attack logs
packet payloads, you can obscure them. For details, see Obscuring sensitive data in
the logs on page 760.
See also
3. Click one of those buttons, then from the drop-down menu that appears, select the new value for setting.
Unlike predefined data types, custom data types cannot be used by auto-learning
profiles.
To create a custom data type by modifying a predefined data type, copy the text in the
Auto-learning column of the predefined data type, then paste it into a custom data
type.
3. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
6. Click OK.
7. To use a custom data type, select it when configuring an input rule. For details, see Validating parameters
(input rules) on page 597.
Unlike visible inputs, hidden field rules are for hidden parameters only, from <inputtype="hidden"> HTML
tags. For information on constraining visible inputs, see Validating parameters (input rules).
Hidden form inputs are often written into an HTML page by the web server when it serves that page to the client,
and are not visible on the rendered web page. Because HTTP is essentially stateless, like cookies, hidden form
inputs are one way that web applications can use to remember session data from one page request to the next
(called persistence).
For example, to remember the price of a TV accessed from a secret sale URL previously requested that session,
this form remembers the sale price, and will provide it again to the shopping cart application when the client
submits the payment page:
<form method="POST" action="processPayment.do">
<input type="hidden" name="price" value="900">
$900 x Quantity: <input name="quantity" size=4><br/>
</br>
<input type="submit" value="Buy">
</form>
Since they are not rendered visible, hidden inputs are sometimes erroneously perceived as safe. But similar to
session cookies, hidden form inputs store the softwares state information client-side, instead of server-side. This
makes it vulnerable.
Hidden fields are accessible through the JavaScript document object model (DOM). Additionally, forms often use
the HTTP POST method and send input to a URL (such as /checkPayment.do) that legitimate clients never
see, since the server replies with an HTTP 302 status code and the next URL in the Location: header, which
the client then fetches using the GET method and displays. Unless there is code to prevent it, however, attackers
often can easily send altered hidden inputs to this POST URL simply by altering a local copy of the page, using a
browser plug-in tool such as Tamper Data, or in some cases simply typing different URL parameters into the
browsers location bar.
Like any other input from clients, it can be tampered with and should not be trusted. Tampered hidden inputs can
be used as a vector for state-based attacks.
To follow the above example, an attacker could alter the sale price so that he or she can buy the item much more
cheaply:
<form method="POST" action="processPayment.do">
<input type="hidden" name="price" value="1">
$900 x Quantity: <input name="quantity" size=4><br/>
</br>
<input type="submit" value="Buy">
</form>
When this form is submitted, the attacker orders TVs at a price reduced from $900 to $1. The request looks like
this:
POST /processPayment.do HTTP/1.1
Host: www.example.com
Referer: http://www.example.com/checkout.do
Cookie: JSESSIONID=12345667890
Content-Type: application/x-www-form-urlencoded
POSTDATA quantity=9999&price=1
Unless the web application is smart enough to test for unauthorized prices, /processPayment.do accepts the
request, processes the order, and returns a normal reply like this:
HTTP/1.1 302 Moved
Set-Cookie: JSESSIONID=12345667890;HttpOnly
Location: http://www.example.com/thankYou.do
Content-Length: 0
Connection: close
Content-Type: text/plain; charset=UTF-8
The client then loads the final thank you shopping cart page indicated in the replys Location: header.
Hidden field rules prevent tampering by caching the values of a sessions hidden inputs as they pass from the
server to the client, and verifying that they remain unchanged when the client submits the form to its POST URL.
1. Before you configure a hidden field rule, if you want to apply it only to HTTP/HTTPS requests for a specific
real or virtual host, you must first define the web host in a protected host names group. For details, see
Defining your protected/allowed HTTP Host: header names.
2. Go to WebProtection> InputValidation> HiddenFields and select the Hidden Fields Rule tab.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Host Status Enable if you want the hidden field rule to apply only to HTTP/HTTPS
requests for a specific web host. Also configure Host.
Host Select the name of a protected host that the Host: field of an HTTP
request must be in to match the hidden field rule.
Request URL Type the exact URL that contains the hidden input for which you want
to create a hidden field rule. This is usually a form that is visible to the
persons web browser, not the CGI script or page that processes
submitted forms.
The URL must begin with a slash (/). Do not include the web host
name, such as www.example.com. It is configured separately in the
Host drop-down list.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
l Alert Accept the connection and generate an alert email and/or log
message.
l Alert & Deny Block the request (reset the connection) and
generate an alert and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: Because the new active appliance does not know previous
session history, after an HA failover, for existing sessions, FortiWeb
will not be able to apply this feature. See Sessions & FortiWeb HA on
page 54.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
5. Click OK.
6. Click Fetch URL.
A dialog appears.
In Protocol, select whether to connect to the back-end web server using either HTTP or HTTPS.
FortiWeb retrieves the web page you specified in Request URL on the Hidden Fields Rule dialog, and
analyzes it. A new dialog appears displaying a list of hidden inputs that FortiWeb found, and URLs where
those hidden inputs will be posted when a client submits the form.
l Blue The URL/hidden field exists in the requested URL, but you have not yet configured it in the hidden field
rule. Add it to the hidden field rule.
l Red The URL/hidden field does not exist in the requested URL, yet it is currently configured in the hidden field
rule. Remove it from the hidden field rule.
l Black The URL/hidden field exists in both the requested URL and your hidden field rule.
For each entry that you want included in the hidden field rule, in the Status column, mark its check box.
Also mark the check boxes of any previously configured items that you want to keep in
the hidden field rule. If you do not, they will be deleted.
11. Repeat the previous steps for each post URL or hidden field that you want to manually add to the hidden field
rule.
15. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
18. From the Hidden Fields Rule drop-down list, select the name of an existing hidden field rule that you want
to add to the set.
See also
You can configure policies that allow only specific HTTP request methods. This can be useful for preventing
attacks, such as those exploiting the HTTP method TRACE.
Some popular web applications such as Subversion, CalDAV, and WebDAV require custom or less common
HTTP methods. While developing web applications, the HTTP method TRACE may be useful, but in production
environments, it may disclose sensitive information to attackers. Many web applications only require GET and
POST. Disabling all unused methods reduces the potential attack surface area for attackers. If you are unsure
what HTTP methods are required by your web applications, you can use auto-learning to discover them. See
Auto-learning on page 207.
Generally, TRACE should only be used during debugging, and should be disabled
otherwise.
1. If you want to include method exceptions in a policy, create them first. For more information, see Configuring
allowed method exceptions on page 616.
2. Go to WebProtection> Access> AllowMethod and select the Allow Method Policy tab.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Allow Request Mark the check boxes for all HTTP request methods that you want to
allow for this specific policy.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is High.
Trigger Policy Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
Allow Method Exceptions Select an HTTP request method exception definition to apply to the
policy. The method exceptions define specific HTTP request methods
that are allowed by specific URLs and hosts.
If you want to view the information associated with the HTTP request
method exceptions used by this policy, select the Detail link beside
the Allow Method Exceptions list. The Allow Method
Exceptions dialog appears. Use the browser Back button to return.
For more information, see Configuring allowed method exceptions.
5. Click OK.
6. To apply the allowed method policy, select it in an inline or offline protection profile (see Configuring a
protection profile for inline topologies on page 658 or Configuring a protection profile for an out-of-band
topology or asynchronous mode of operation on page 669).
See also
l IPv6 support
While most URL and host name combinations controlled by a profile may require similar HTTP request methods,
you may have some that require different methods. Instead of forming separate policies and profiles for those
requests, you can configure allowed method exceptions. The exceptions define specific HTTP request methods
that are allowed by specific URLs and hosts.
1. Before you configure an allowed method exception, if you want to apply it only to HTTP requests for a specific
real or virtual host, you must first define the web host in a protected host names group. For details, see
Defining your protected/allowed HTTP Host: header names on page 349.
4. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. Click OK.
6. Click Create New to add an entry to the set.
A dialog appears.
Host Status Enable to require that the Host: field of the HTTP request match a
protected host names entry in order to match the allowed method
exception. Also configure Host.
Host Select which protected host names entry (either a web host name or
IP address) that the Host: field of the HTTP request must be in to
match the allowed method exception.
Type Select whether URL Pattern is a Simple String (that is, a literal URL) or
a Regular Expression.
To create and test a regular expression, click the >> (test) icon. This
opens the Regular Expression Validator window where you can
fine-tune the expression (see Regular expression syntax on page
918).
Allow Method Exception Mark the check boxes of all HTTP request methods that you want to
allow.
8. Click OK.
9. Repeat the previous steps for each exception that you want to add to the allowed method exceptions.
10. To apply the allowed method exception, select it in an allowed method policy. For details, see Specifying
allowed HTTP methods on page 613.
See also
Protocol constraints govern features such as the HTTP header fields in the protocol itself, as well as the length of
the HTML, XML, or other documents or encapsulated protocols carried in the HTTP body payload.
Use protocol constraints to prevent attacks such as buffer overflows. Buffer overflows can occur in web servers
and applications that do not restrict elements of the HTTP protocol to acceptable lengths, or that mishandle
malformed requests. Such errors can lead to security vulnerabilities.
Default HTTP protocol constraint values reflect the buffer size of your FortiWeb
models HTTP parser. Use protocol constraints to block requests that are
too large for the memory size of FortiWebs scan buffers. Failure to block
items that are too large to be buffered could compromise your networks security,
and allow requests without scanning or rewriting. See Buffer hardening on page
823.
For example, if your web applications require HTTP POST requests with
unusually large parameters, you would adjust the HTTP body buffer size (see
http-cachesize in the FortiWeb CLI Reference). Then, you would configure
Malformed Request and other HTTP protocol constraints to harden your
configuration.
This scan is bypassed if the clients source IP is a known search engine and you
have enabled Allow Known Search Engines.
1. If you plan to add constraint exceptions to your HTTP protocol constraints, configure the exceptions first. See
Configuring HTTP protocol constraint exceptions on page 630. If you want to use a trigger when the rule is
violated, configure it also. See Viewing log messages on page 768.
Content Length
Illegal Content Length Enable to check whether the Content-Length: header includes
numeric characters only.
HTTP Header
Header Length Specifies the maximum acceptable size in bytes of all HTTP header
lines.
Header Value Length Specifies the maximum acceptable size in bytes of a single HTTP header
value.
Illegal Character in Enable to check whether the HTTP header name contains illegal
Header Name characters.
Illegal Character in Enable to check whether the HTTP header value contains illegal
Header Value characters.
HTTP Parameter
/url? parameter1=value1¶meter2=value2
Total URL Parameters l Question mark (?), ampersand (&), and equal (=) characters
Length are not included.
l Parameters in the HTTP body, which can occur with HTTP POST
requests. For these parameters, configure Total Body
Parameters Length or Body Length instead.
Attack log messages contain Total URL Parameters
Length Exceeded when this feature detects a URL parameter
line length buffer overflow attempt.
Total Body Parameters Specifies the total maximum acceptable size in bytes of all the
Length parameters in the HTTP body of HTTP POST requests.
Question mark (?), ampersand (&), and equal (=) characters are
not included.
It does not include parameters in the HTTP body, which can occur
Number of URL with HTTP POST requests.
Parameters Attack log messages contain Too Many Parameters in
Request when this feature detects a URL parameter count buffer
overflow attempt.
NULL Character in
Enable to check for null characters in parameter values.
Parameter Value
Maximum URL Specifies the maximum acceptable length in bytes of each URL
Parameter Name parameter name in a request. Enable to check whether a parameter
Length name exceeds the limitation (the default is 4096). For example,
user in the request GET
/index.php?user=test&sid=1234 is an illegal parameter
name if you set the limitation as 3.
Illegal Character in Enable to check whether a URL parameter name contains the
Parameter Name characters that are not allowed by the RFC. These illegal characters
are usually non-printable ASCII characters or other special
characters.
HTTP Request
HTTP Request Specifies the maximum acceptable length in bytes of the HTTP request
Filename Length filename.
Number of Header Specifies the maximum acceptable number of lines in the HTTP
Lines in Request header.
Missing Content Type Enable to check whether the Content-Type: header is available.
Null Character in URL Enable to check whether the URL (or path for HTTP/2) in a request
contains null characters (such as \0 or %00). This feature checks the
part between the host prefix and parameters in the URL (if they exist), for
example, the /index.php in GET
http://www.server.com/index.php?name=value HTTP
1.1. Attackers might be embed NULL characters in URL to evade
detections.
Enable to check whether the URL (or path for HTTP/2) in a request
contains characters that are not allowed by the RFC. These illegal
characters are usually non-printable ASCII characters or other
Illegal Character in special characters (such as ASCII 0 - 31 and ASCII 127). This
URL feature checks the part between the host prefix and parameters in
the URL (if they exist), for example, the /index.php in GET
http://www.server.com/index.php?name=value HTTP
1.1.
Malformed URL Enable to check whether the URL (or path for HTTP/2) in a request
conform the spec by beginning with a slash ("/") character or a slash
character follows the protocol prefix and host prefix in the URL (e.g.
http://myserver.com/default.asp). If the slash characters are
missing, it is typically a malicious access to other protocols (e.g.
SMTP) using the back-end web servers.
HTTP2 Frame
Header Compression Specifies the maximum acceptable size in bytes of the header
Table Size compression table used to decode header blocks. Enable to check
whether value of parameter SETTINGS_HEADER_TABLE_SIZE
in a HTTP/2 SETTINGS frame exceeds the limitation and react
correspondingly.
Initial Window Size Specifies the maximum acceptable sender's initial window size in
bytes for stream-level flow control. Enable to check whether value
of parameter SETTINGS_INITIAL_WINDOW_SIZE in a HTTP/2
SETTINGS frame exceeds the limitation and react correspondingly.
Default is 6291456.
Default is 16384.
Header List Size Specifies the maximum acceptable size in bytes of the header list
that the sender is prepared to accept. Enable to check whether
value of parameter SETTINGS_MAX_HEADER_LIST_SIZE in a
HTTP/2 SETTINGS frame exceeds the limitation and react
correspondingly.
Default is 65536.
Others
Illegal Content Type Enable to check whether the Content Type: value uses the format
<type>/<subtype>.
Illegal Response Code Enable to check whether the HTTP response code is a 3-digit number.
Illegal Host Name Enable to check for illegal characters in the Host: line of the HTTP
header, such as null characters or encoded characters.
Body Length Specifies the maximum acceptable size in bytes of the HTTP body.
For requests that use the HTTP POST method, this typically
includes parameters submitted by HTML form inputs. In the case of
file uploads, this can normally be many megabytes. For most
simple forms, however, the body should be only a few kilobytes in
size at maximum.
l syntax errors
l exceeding the maximum buffer size allowed by FortiWebs HTTP
parser
Errors and buffer overflows can cause problems in web servers that
do not handle them gracefully. Such problems can lead to security
vulnerabilities.
WebSocket Protocol Enable to detect traffic that uses the WebSocket TCP-based
protocol.
Illegal Connection Enable to check whether a client connection preface start with the string
Preface PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n.
Illegal Frame Type Enable to check whether a HTTP2 request contains frame types
that are not defined in RFC7540. Any undefined frame type will be
treated as illegality.
Illegal Chunk Size Enable to check whether the value of Chunk Size field is a
hexadecimal value. A violation will be detected if the value is
presented in other numeral systems.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 63 characters.
Exception Name Select the HTTP constraints exception, if any, that you want to apply
to this policy (see Configuring HTTP protocol constraint exceptions on
page 630).
Status Specify whether the rule applies when you apply this constraint to a profile.
Action Select the action the FortiWeb appliance takes when it detects a
violation of the rule:
l Alert Accept the connection and generate an alert email and/or log
message.
l Alert & Deny Block the request (reset the connection) and
generate an alert and/or log message.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the client
with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: To use this rule set with auto-learning, select Alert. If Action is
Alert & Deny, or any other option that causes the FortiWeb
appliance to terminate or modify the request or reply when it detects
an attack attempt, the interruption causes incomplete session
information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level to use when FortiWeb logs a violation of the rule:
l Low
l Medium
l High
Threat Weight If Device Tracking is enabled in a web protection profile and a selected
device reputation security policy uses HTTP Protocol Constraints, it is
possible to adjust the threat weight of each constraint. For details, see
Blacklisting client devices with poor reputation.
Trigger Action Select which trigger, if any, to use when FortiWeb logs and/or sends an
alert email about a violation of the rule. See Viewing log messages on page
768.
HTTP Protocol Support HTTP/1.X Only indicates the constraint is effective against HTTP/1.x
traffic only.
5. Click OK.
6. To apply the HTTP protocol constraint profile, select it in an inline or offline protection profile (see Configuring
a protection profile for inline topologies on page 658 or Configuring a protection profile for an out-of-band
topology or asynchronous mode of operation on page 669).
See also
l Sequence of scans
l IPv6 support
Exceptions define HTTP constraints that will not be subject to HTTP protocol constraint. Exceptions are useful
when you know that some HTTP protocol constraints, during normal use, will cause false positives by matching
an attack signature.
For example, if no exceptions are defined, FortiWeb executes the HTTP protocol constraint as defined in
HTTP/HTTPS protocol constraints on page 618. But, if you mark the check box for Header Length in a HTTP
protocol constraint exception for a specific host, FortiWeb will skip the HTTP header length check when executing
the web protection profile for that host.
As another example, some web applications require very large HTTP POST requests. You can use Malformed
Request to create an exception from the constraint for those requests.
3. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 63 characters.
4. Click OK.
5. Click Create New to add an entry to the set.
A dialog appears.
Host Status Enable to apply this HTTP constraint exception only to HTTP
requests for specific web hosts. Also configure Host.
Host Select the IP address or fully qualified domain name (FQDN) of the
protected host to which this exception applies.
Source IP Enable to check requests for matching the HTTP constraint exceptions
rule by their source IP addresses.
IPv4/IPv6/IP Range Specify the source IP of the protected requests to which this
exception applies. Only a single IPv4 or IPv6 address, or a
IPv4/IPv6 range is acceptable.
Request Type Select whether the URL Pattern field will contain a literal URL (Simple
String), or a regular expression designed to match multiple URLs
(Regular Expression).
URL Pattern Depending on your selection in the Request Type field, enter
either:
l the literal URL, such as /index.php, that the HTTP request must
contain in order to match the input rule. The URL must begin with a
backslash (/).
l a regular expression, such as ^/*.php, matching all and only the
URLs to which the input rule should apply. The pattern does not
require a slash (/); however, it must at 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 the Host drop-down list.
To create and test a regular expression, click the >> (test) icon.
This opens the Regular Expression Validator window where
you can fine-tune the expression (see Regular expression syntax
on page 918).
Content Length
Content Length Enable to omit the constraint on the maximum acceptable size in bytes
of the request body.
Illegal Content Length Enable to omit the constraint on whether the Content-Length:
header includes numeric characters only.
HTTP Header
Header Length Enable to omit the constraint on the maximum acceptable size in bytes
of the HTTP header.
Header Name Length Enable to omit the constraint on the maximum acceptable size in bytes
of a single HTTP header name.
Header Value Length Enable to omit the constraint on the maximum acceptable size in bytes
of a single HTTP header value.
Illegal Character in Enable to omit the constraint on whether the HTTP header name
Header Name contains illegal characters.
Illegal Character in Enable to omit the constraint on whether the HTTP header value
Header Value contains illegal characters.
HTTP Parameter
Total URL Parameter Enable to omit the constraint on the maximum acceptable size of an
Length URL parameter (including the name and value).
Total Body Enable to omit the constraint on the maximum acceptable size in bytes
Parameters Length of all parameters in the HTTP body of HTTP POST requests.
Number of URL Enable to omit the constraint on the maximum number of parameters in
Parameters the URL.
NULL Character in Enable to omit the constraint on null characters in parameter names.
Parameter Name
NULL Character in Enable to omit the constraint on null characters in parameter values.
Parameter Value
Maximum URL Enable to omit the constraint on the maximum acceptable length in
Parameter Name bytes of the parameter name.
Length
Maximum URL Enable to omit the constraint on the maximum acceptable length in
Parameter Value bytes of the parameter value.
Length
Illegal Character in Enable to omit the constraint on illegal characters in the parameter
Parameter Name name.
Illegal Character in Enable to omit the constraint on illegal characters in the parameter
Parameter Value value.
HTTP Request
Illegal HTTP Request Enable to omit the constraint on to check for invalid HTTP version
Method numbers.
HTTP Request Enable to omit the constraint on the maximum acceptable length in
Filename Length bytes of the HTTP request filename.
HTTP Request Length Enable to omit the constraint on the maximum acceptable length in
bytes of the HTTP request.
Number of Header Enable to omit the constraint on the maximum acceptable number of
Lines In Request lines in the HTTP header.
Others
Illegal Content Type Enable to omit the constraint on whether the Content Type: value uses
the format <type>/<subtype>.
Illegal Response Enable to omit the constraint on whether the HTTP response code is a
Code 3-digit number.
Illegal Host Name Enable to omit the constraint on invalid characters in the Host: line of
the HTTP header, such as null characters or encoded characters.
Body Length Enable to omit the constraint on the maximum acceptable size in bytes
of the HTTP body.
Number of Cookies In Enable to omit the constraint on the maximum acceptable number of
Request cookies in an HTTP request.
Number of Ranges in Enable to omit the constraint on the maximum acceptable number
Range Header of Range: lines in an HTTP header.
Malformed Request Enable to omit the constraint on syntax and FortiWeb parsing
errors.
7. Click OK.
8. Repeat the previous steps for each rule you want to add to the exception.
9. Group the HTTP protocol constraint exception in an HTTP protocol constraint profile (see HTTP/HTTPS
protocol constraints on page 618).
See also
Detection and restriction are performed by scanning Content-Type: and Content-Length: headers in
HTTP PUT and POST request methods submitted to your web servers.
For example, if you want to allow only specific types of files (MP3 audio files, PDF text files and GIF and JPG
picture files) to be uploaded to:
http://www.example.com/upload.php
create a file upload restriction policy that contains rules that define only those specific file types. When FortiWeb
receives an HTTP PUT or POST request for the /upload.php URL with Host: www.example.com, it scans
the HTTP request and allows only the specified file types to be uploaded. FortiWeb blocks file uploads for any
HTTP request that contains non-specified file types.
You can configure FortiWeb to submit all files that match your upload restriction rules to FortiSandbox. FortiWeb
packs each of the files in TAR format and sends the TAR archives to FortiSandbox.
FortiSandbox evaluates whether the file poses a threat and returns the result to FortiWeb. If FortiSandbox
determines that the file is malicious, FortiWeb performs the following tasks:
l Generates an attack log message that contains the result (for example, messages with the Alert action in the
illustration).
l After it receives the FortiSandbox results, takes the action specified by the file upload restriction policy. During this
time, it does not re-submit the file to FortiSandbox (for example, messages with the Alert_Deny action in the
illustration).
l Specify whether FortiWeb sends files to a physical appliance or VMversion of FortiSandbox, or FortiSandbox
Cloud.
l Specify the email address that the FortiSandbox sends weekly reports to.
l View results from FortiSandbox for the last 7 days.
l
3. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
4. If you want to apply this file upload restriction rule only to requests for specific web hosts:
l Enable Host Status.
l From Host, select the IP address or FQDN of a protected host.
Disable Host Status to match the file upload restriction rule based upon the other criteria, such as the URL,
but regardless of the Host: field
5. In Request URL, type the literal URL, such as /upload.php, to which the file upload restriction applies.
The URL must begin with a slash (/).
Do not include the name of the host, such as www.example.com, which is configured separately in the
Host drop-down list.
6. In File Upload Limit, type a number to represent the maximum size in kilobytes for any individual file. The
upload rule rejects allowed files larger than this number. The valid range is from 0 to 102400 kilobytes
(100MB); FortiWeb 1000D, 3000D, 4000D, and E series have a valid range from 0 to 204800 kilobytes
(200MB).
7. Click OK.
8. To add or remove file types, click Create New.
A dialog appears.
9. In the File Types pane, select the file types to allow, then click the right arrow (->) to move them to the Allow
Files Types pane.
Microsoft Office Open XML file types such as .docx, xlsx, .pptx, and .vsdx are a type of
ZIP-compressed XML. If you specify restrictions for them, those signatures will take
priority. However, if you do not select a MSOOX restriction but do have an XML or ZIP
restriction, the XML and ZIP restrictions will still apply, and the files will still be
restricted.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Action Select which action the FortiWeb appliance will take when it detects a
violation of the rule:
You can customize the web page that FortiWeb returns to the
client with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
You can customize the web page that FortiWeb returns to the
client with the HTTP status code. See Customizing error and
authentication pages (replacement messages) on page 720.
Note: If you will use this rule set with auto-learning, you should select
Alert. If Action is Alert & Deny, or any other option that causes the
FortiWeb appliance to terminate or modify the request or reply when it
detects an attack attempt, the interruption will cause incomplete
session information for auto-learning.
Block Period Type the number of seconds that you want to block subsequent
requests from the client after the FortiWeb appliance detects that the
client has violated the rule.
Severity When rule violations are recorded in the attack log, each log message
contains a Severity Level (severity_level) field. Select which
severity level the FortiWeb appliance will use when it logs a violation
of the rule:
l Low
l Medium
l High
The default value is Low.
Trigger Action Select which trigger, if any, that the FortiWeb appliance will use when it
logs and/or sends an alert email about a violation of the rule. See Viewing
log messages on page 768.
Trojan Detection Enable to scan for trojans, viruses, malware, and greyware. You
must also configure a file upload restriction where you enable
Antivirus Scan.
Attack log messages contain the file name and signature ID (for
example, filename [eicar.com] virus name [EICAR_
TEST_FILE]: Waf anti-virus) when this feature detects a
possible virus.
In the Limiting file uploads column, select what FortiWeb does when it
detects this type of attack.
Scan Uploaded Files with Enable to send matching files to FortiSandbox for evaluation.
FortiSandbox
Also specify the FortiSandbox settings for your FortiWeb. See To configure
a FortiSandbox connection on page 645.
16. From the File Upload Restriction Rule drop-down list, select an existing file upload restriction rule that you
want to use in the policy.
To view or change the information associated with the item, select the Detail link. The File Upload
Restriction Rule dialog appears. Use the browser Back button to return.
17. Click OK.
18. Repeat the previous steps for each rule that you want to add to the file upload restriction policy.
19. To apply the file upload restriction policy, select it in an inline or offline protection profile (see Configuring a
protection profile for inline topologies on page 658 or Configuring a protection profile for an out-of-band
topology or asynchronous mode of operation on page 669).
See also
FortiSandbox Type l FortiSandbox Appliance Submit files that match the upload restriction
rules to a FortiSandbox physical appliance or FortiSandbox-VM.
l FortiSandbox Cloud Submit files to FortiSandbox Cloud. Requires you
to register your FortiWeb and a FortiWeb FortiGuard Sandbox Cloud Service
subscription.
Secure Connection Select to communicate with the specified FortiSandbox using SSL.
Cache Timeout After it receives the FortiSandbox results, FortiWeb takes the action specified
by the file upload restriction policy. During this time, it does not re-submit the
file to FortiSandbox; the range for the Cache Timeout is 1-168 hours.
Admin Email Enter the email address that FortiSandbox sends weekly reports and
notifications to.
Statistics Interval Specifies how often FortiWeb retrieves statistics from FortiSandbox, in
minutes.
3. Click Apply.
Similar to SSL/TLS, you can either completely offload compression to FortiWeb to save resources on your web
servers, or temporarily decompress only as needed to scan and/or modify traffic that has already been
compressed by your web servers.
If necessary, you can exempt HTTP Host: names and URLs from compression or decompression by FortiWeb.
Generally, if a specific web server already applies compression, and if a specific response never needs to be
scanned, compressed, or rewritten, it should be exempt from compression/decompression by FortiWeb.
3. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
4. Click OK.
5. Click Create New.
A dialog appears.
6. Enable Host Status to require that the Host: field of the HTTP request match a protected host names entry
in order to match the exclusion.
7. From the Host drop-down list, select which protected host entry that the Host: field of the HTTP request
must be in to match the exclusion.
8. In Request URL, type the exact URL of the page to use in the exclusion.
The URL must begin with a slash (/). The URL must not include the domain or IP address.
9. Click OK.
10. Include the exception in a compression or decompression policy (see Configuring compression offloading on
page 648 or Configuring temporary decompression for scanning & rewriting on page 651).
Most web servers can be configured to compress files when responding to a request. Compressed files often
reduce bandwidth, and can result in faster delivery time to clients. (Modern browsers automatically decompress
files before displaying the web pages.)
To successfully decompress and read the response, clients use the corresponding decompression algorithm.
Web servers include an HTTP header such as:
Content-Encoding: gzip
If want to gain the benefits that compression offers, but do not want to configure it on your web servers, you can
offload compression to FortiWeb instead.
If your web servers are starved for CPU cycles and RAM, offloading compression from
your web servers to FortiWeb can alleviate that bottleneck and improve performance.
Based upon the HTTP Content-Type: headers that you select (which correspond to Internet file type/MIME
type categories such as images and XML), FortiWeb will compress matching responses. The total size of a large
web page with lengthy JavaScripts and CSS, while in transit, could be many times smaller.
The maximum pre-compressed file size that FortiWeb can compress is 128KB. Files
larger than that limit will be transmitted without compression.
For example, a typical web page is comprised of several responses, such as an HTML document:
Content-Type: text/html
and a JavaScript:
Content-Type: text/javascript
If your protected web servers do not already apply compression, and you configure a compression policy for
text/html and text/javascript, those typically lengthy and repetitive text-based documents can be
efficiently compressed into much smaller responses. If bandwidth between server and client is the performance
bottleneck, this could improve performance dramatically.
Not all HTTP clients support compression: RPC clients, for example, transmit binary data and do not support
compression. For those host names and/or URLs, you should create exceptions.
1. Before you configure file compression, configure the exceptions, if any. See Configuring
compression/decompression exemptions on page 647.
If your web servers are already configured to compress responses, you should either
disable compression on the server, or configure exceptions for URLs hosted by that
server. Otherwise, in some cases, FortiWeb might expend resources compressing
responses that have already been compressed by the server. This can cause
performance to decrease instead of increase.
4. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. From Exclusion URL, you can select an existing exclusion. (See Configuring compression/decompression
exemptions on page 647.)
Optionally, select an exclusion and click the Detail link. The exclusion dialog appears. You can view and edit
the exclusion. Use the browser Back button to return.
6. Click OK.
7. To add or remove a content type, click Create New.
A dialog appears.
8. In the Content Types list, select the content types that you want to compress, then click the right arrow (->)
to move them to the Allow Types list.
For external JavaScripts, content type strings vary. If you are unsure of the content type string, for maximum
coverage, select all JavaScript content type strings. However, due to wide browser compatibility, despite its
current deprecated status, many web servers use text/javascript.
These apply compression only to JavaScripts that are external to a web page that
is, not directly embedded in a <script> tag or inline in the HTML document itself,
but instead included via reference to a JavaScript file, such as <script
src="/nav/menu.js">, and therefore are contained in a separate HTTP response
from the HTML document. Likewise, selecting the text/css content type for
compression will only compress external CSS. It will not compress CSS embedded
directly within the HTML file. (Embedded CSS or JavaScript are governed by
Content-Type: text/html instead.)
9. Click OK.
10. To apply the compression policy, select it in an inline protection profile used by a server policy (see
Configuring a protection profile for inline topologies on page 658).
See also
l Caching
l Sequence of scans
l IPv6 support
Similar to SSL/TLS inspection, in order for some features to function, you must configure the appliance for
compression inspection, or to decompress and then re-compress traffic.
If the HTTP body is compressed, FortiWeb cannot parse it for rewriting, nor scan for potential problems such as
a data leak or virus. Traffic that is encrypted and/or compressed is not a normalized stream. Bodies of
compressed responses effectively have low-grade encryption: they are not in clear text, and therefore do not
match signatures, and cannot be rewritten.
If your protected web servers compress files themselves (i.e. compression has not been offloaded to FortiWeb),
configure a FortiWeb decompression policy.
You can configure FortiWeb to temporarily decompress the body of a response based on its file type, which is
specified by the HTTP Content-Type: header. The appliance can then inspect the traffic. After, if there is no
policy-violating content nor rewriting required, the FortiWeb appliance will allow the compressed version of the
response to pass. Otherwise, if modification is required, FortiWeb will modify the response before re-
compressing it and passing it to the client.
The maximum compressed file size that FortiWeb can decompress is configured in
Maximum Antivirus Buffer Size. By default, files larger than that limit are passed along
without scanning or modification. This could allow malware to reach your web
servers, and cause HTTP body rewriting to fail. If you prefer to block requests
greater than this buffer size, configure Body Length. To be sure that it will not disrupt
normal traffic, first configure Action to be Alert. If no problems occur, switch it to Alert
& Deny.
5. In Name, type a name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
6. Click OK.
7. From Exclusion URL, you can select an existing exclusion. (See Configuring compression/decompression
exemptions on page 647.)
Optionally, select an exclusion and click the Detail link. The exclusion dialog appears. You can view and edit
the exclusion. Use the browser Back button to return.
9. In the Content Types list, select the content types that you want to decompress, then click the right arrow (-
>) to move them to the Allow Types list.
For external JavaScripts, content type strings vary. If you are unsure of the content type string, for maximum
coverage, select all JavaScript content type strings. However, due to wide browser compatibility, despite its
current deprecated status, many web servers use text/javascript.
These decompress only JavaScripts that are external to a web page that is, not
directly embedded in a <script> tag or inline in the HTML document itself, but
instead included via reference to a JavaScript file, such as <script
src="/nav/menu.js">, and therefore are contained in a separate HTTP response
from the HTML document. Likewise, selecting the text/css content type for
compression will only compress external CSS. It will not decompress CSS embedded
directly within the HTML file. (Embedded CSS or JavaScript are governed by
Content-Type: text/html instead.)
See also
l IPv6 support
Policies
You can configure most protection features and traffic modification at any time. However, FortiWeb does not
apply mostfeatures until you include them in a policy that governs traffic (either directly or indirectly, via
protection profiles).
See also
Policy and protection profile behavior and supported features varies by the operation mode. (See also Supported
features in each operation mode on page 88.)
The WCCP operation mode is similar to True Transparent Proxy, except web servers see the FortiWeb network
interface IP address and not the IP address of the client.
Operation mode
Matches by l Service Virtual servers V-zone (bridge), but V-zone (bridge), but
l Virtual server network interface, not its IP address. not its IP address.
but not its IP
address.
Operation mode
Certificate used to
offload SSL from the Certificate used to Certificate used to Certificate used to
servers to FortiWeb; decrypt and scan decrypt and scan decrypt and scan
SSL can optionally re- only; does not act only; does not act only; does not act as
encrypt before as an SSL origin or as an SSL origin or an SSL origin or
forwarding to the terminator. terminator. terminator.
destination server.
Forwarding l Forwards to a Lets the traffic pass Forwards to a server Lets the traffic pass
server pool through to a server pool member (but through to a member
member using the pool member, but allowing to pass of a server pool, but
port number where does not load- through, without does not load
it listens; similar to balance. actively balance.
a network address redistributing
translation (NAT) connections) using
the port number
policy on a
where it listens.
general-purpose
firewall.
l Can route
connections to a
specific server pool
based on HTTP
content.
The way that FortiWeb determines which policy to apply to a connection varies by operation mode. The appliance
applies only one policy to each connection.
If a TCP connection does not match any of the policies, FortiWeb either refuses the connection (if it is operating
in reverse proxy mode) or denies the connection (if it is operating in other operation modes). Even if the TCP
connection has a matching policy and is allowed, subsequently, if the HTTP/HTTPS request is not allowed by the
policys profiles, it is considered to be in violation of the policy and the client may be blocked at the application
(request) level or connection level, depending on the Action that you configure.
Policies are not applied while they are disabled. See Enabling or disabling a policy on page 692.
that your FortiWeb appliance can ignore when it enforces your policies. FortiGuard FortiWeb Security Service
service updates the predefined global white list. However, you can also whitelist your own custom URLs, cookies,
and parameters on the CustomGlobalWhiteList tab in Server Objects> Global> GlobalWhiteList.
When enabled, white-listed items are not flagged as potential problems, nor incorporated into auto-learning
data. This feature reduces false positives and improves performance.
To include white list items during policy enforcement and auto-learning reports, you must first disable them in the
global white list.
1. Go to Server Objects> Global> GlobalWhiteList and select the Predefined Global White List tab.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Server Policy Configuration category. For details, see Permissions on page 69.
2. To see the items that each section contains and to expose those items Enable check box, click the plus(+)
and minus (-) icons.
3. In the row of the item that you want to disable, click the switch to off in the Enable column.
4. Click Apply.
5. To verify that an item is no longer whitelisted, you can enable auto-learning, then make a request to a
protected web site. The auto-learning report should omit any items that you have disabled, such as the
/favicon.ico URL. Alternatively, use the parameter or URL to attempt to trigger an attack signature that
should block it.
1. Go to Server Objects> Global> GlobalWhiteList and select the Custom Global White List tab.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Server Policy Configuration category. For details, see Permissions on page 69.
3. From Type, select the part of the HTTP request where you want to white list an object. Available
configuration fields vary by the type that you choose.
l If Type is URL:
Request Type Indicate whether the Request URL field will contain a literal URL (Simple
String), or a regular expression designed to match multiple URLs
(Regular Expression).
Request URL Depending on your selection in the Request Type field, enter either:
l the literal URL, such as /robots.txt, that the HTTP request must
contain in order to match the rule. The URL must begin with a backslash
(/).
l a regular expression, such as ^/*.html, matching all and only the URLs
to which the rule should apply. The pattern does not require a slash (/);
however, it must at match URLs that begin with a slash, such as
/index.html.
Do not include the domain name, such as www.example.com.
To create and test a regular expression, click the >> (test) icon. This
opens the Regular Expression Validator window where you can
fine-tune the expression (see Regular expression syntax on page 918)
l If Type is Parameter, in Name, type the name of the variable exactly as it appears in the URL or HTTP
body (varies by HTTP GET/POST method).
For example, if the URL ends with the parameter substring ?userName=rowan, you would type
userName (note the capital letter).
l If Type is Cookie:
Name Type the name of the cookie as it appears in the HTTP request, such as
NID.
4. Click OK.
5. To verify that an item is now whitelisted, you can enable auto-learning, then make a request to a protected
web site. The auto-learning report should include any items that you have whitelisted. Alternatively, use the
parameter or URL to attempt to trigger an attack signature that would normally block it; the item should now
be allowed.
See also
Inline protection profiles combine previously configured rules, profiles, and policies into a comprehensive set that
can be applied by a policy. Inline protection profiles contain only the features that are supported in inline
topologies, which you use with operation modes such as reverse proxy and true transparent.
Inline protection profiles primary purpose is to block attacks, especially for use in conjunction with auto-learning
profiles. If used in conjunction with auto-learning profiles, you should configure the offline protection profile to
log but not block attacks in order to gather complete session statistics for the auto-learning feature.
Inline protection profiles include features that require an inline network topology. They
can be configured at any time, but cannot be applied by a policy if the FortiWeb
appliance is operating in a mode that does not support them. For details, see How
operation mode affects server policy behavior on page 654.
1. Before configuring an inline protection profile, first configure any of the following that you want to include in
the profile:
To save time, you may be able to use auto-learning to generate protection profiles and
their components by observing your web servers traffic. For details, see Auto-learning
on page 207.
l an X-Forwarded-For: or other X-header rule (see Defining your proxies, clients, & X-headers on page 386)
l a file upload restriction (see Limiting file uploads on page 637)
l an allowed method set (see Specifying allowed HTTP methods on page 613)
l a URL access rule (see Restricting access to specific URLs on page 453)
l a signature set (see Blocking known attacks & data leaks on page 538)
l a padding oracle protection rule (see Defeating cipher padding attacks on individually encrypted inputs on page
573)
l a cookie security policy (see Protecting against cookie poisoning and other cookie-based attacks on page 482)
l a cross-site request forgery (CSRF) protection rule (see Defeating cross-site request forgery (CSRF)attacks on
page 578)
l a page order rule (see Enforcing page order that follows application logic on page 586)
l a parameter validator (see Validating parameters (input rules) on page 597)
l a hidden fields protector (see Preventing tampering with hidden inputs on page 607)
l a start pages rule (see Specifying URLs allowed to initiate sessions on page 591)
l a brute force login attack detector (see Preventing brute force logins on page 506
l a protocol constraints rule (see HTTP/HTTPS protocol constraints on page 618)
l a rewriting or redirection set (see Rewriting & redirecting on page 510)
l a content caching rule (see Caching on page 530)
l a user tracking policy (see Tracking users on page 341)
l an authentication policy (see Offloading HTTP authentication & authorization on page 294)
l a site publishing policy (see Single sign-on (SSO) (site publishing) on page 317)
l a file compression rule (see Configuring compression offloading on page 648)
l a file decompression rule (see Configuring temporary decompression for scanning & rewriting on page 651)
l a DoS protector (see Grouping DoS protection rules on page 504)
l a client IP set (see Blacklisting & whitelisting clients using a source IP or source IP range on page 471)
l the IP reputation policy (see Blacklisting source IPs with poor reputation on page 465)
l the Device Tracking feature and device reputation security policies (see Blocking client devices with poor
reputation on page 474)
l a FortiGate that provides a list of quarantined source IPs (see Receive quarantined source IP addresses from
FortiGate on page 202)
l a trigger if you plan to use policy-wide log and alert settings (see Viewing log messages on page 768)
2. Go to Policy> WebProtectionProfile and select the InlineProtectionProfile tab.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
A dialog appears.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 63 characters.
Session Management Enable to add a cookie to the reply in order for FortiWeb to be able to
track the state of web applications across multiple requests (i.e., to
implement HTTP sessions). Also configure Session Timeout.
This feature adds the FortiWebs own session support, and does not
duplicate or require that your web applications have its own sessions.
For details, see HTTP sessions & security on page 50.
After this time elapses during which there were no more subsequent
requests, after which the FortiWeb appliance will regard the next
request as the start of a new HTTP session.
Signatures Select the name of the signature set, if any, that will be applied to
matching requests. Also configure Enable AMF3 Protocol Detection.
Attack log messages for this feature vary by which type of attack was
detected. For a list, see Blocking known attacks & data leaks on page
538.
Enable AMF3 Protocol Enable to scan requests that use action message format 3.0 (AMF3)
Detection for:
Enable XML Protocol Enable to scan for matches with attack and data leak signatures in Web 2.0
Detection (XML AJAX), SOAP, and other XML submitted by clients in the bodies of
HTTP POST requests.
Illegal XML Format Enable to validate that XML elements and attributes in the requests
body conform to the W3C XML 1.1 standard, the XML 2.0 standard,
or both. Malformed XML, such as without the final > or with multiple
>> in the closing tag, is often an attempt to exploit an unhandled error
condition in a web applications XHTML or XML parser.
If the request fails the validation, FortiWeb takes the specified action.
Note: If FortiWeb is deployed behind a NAT load balancer and this option
is enabled, to prevent FortiWeb from blocking all connections when it
detects a violation of this type, define an X-header that indicates the
original clients IP (see Defining your proxies, clients, & X-headers on
page 386).
In addition, select a severity level and trigger policy.
Enable JSON Protocol Enable to scan for matches with attack and data leak signatures in JSON
Detection data submitted by clients in HTTP requests with Content-Type:
values application/json or text/json.
Illegal JSON Format Enable to scan for illegal formatting in JSON data. If FortiWeb detects
illegal formatting, it takes the specified action.
l Alert Accept the request and generate an alert email, log message, or
both.
l Alert & Deny Block the request and generate an alert, log message,
or both.
l Period Block Block requests for the number of seconds specified by
Block Period. The range is 1 to 3600. See also Monitoring currently
blocked IPs on page 814.
Note: If FortiWeb is deployed behind a NAT load balancer and this option
is enabled, to prevent FortiWeb from blocking all connections when it
detects a violation of this type, define an X-header that indicates the
original clients IP (see Defining your proxies, clients, & X-headers on
page 386).
In addition, select a severity level and trigger policy.
Custom Policy Select the name of a combination source IP, rate limit, HTTP header,
and URL access policy, if any, that will be applied to matching
requests. See Combination access control & rate limiting on page
460.
Padding Oracle Protection Select the name of padding oracle protection rule, if any, that will be
applied to matching requests. See Defeating cipher padding attacks
on individually encrypted inputs on page 573.
HTTP Header Security Select the name of HTTP header security policy, if any, to apply to
matching responses.
CSRF Protection Select the name of cross-site request forgery protection rule, if any, to
apply to matching requests. See Defeating cross-site request forgery
(CSRF)attacks on page 578.
Cookie Security Policy Select the name of a cookie security policy to apply to matching requests.
See Protecting against cookie poisoning and other cookie-based attacks on
page 482.
If the Security Mode option in the policy is Signed, ensure that Session
Management is On.
Parameter Validation Select the name of the parameter validation rule, if any, that will be
applied to matching requests. See Validating parameters (input
rules) on page 597.)
Hidden Fields Protection Select the name of the hidden fields protection rule, if any, to use to
protect hidden fields on your web site. See Preventing tampering with
hidden inputs on page 607.
File Upload Restriction Select an existing file upload restriction policy, if any, that will be
applied to matching HTTP requests. See Limiting file uploads on page
637.
HTTP Protocol Constraints Select the name of an HTTP parameter constraint, if any, that will be
applied to matching requests. See HTTP/HTTPS protocol constraints
on page 618.
Attack log messages for this feature vary by which type of constraint
was violated.
Brute Force Login Select the name of a brute force login attack profile, if any, that will be
applied to matching requests. See Preventing brute force logins on
page 506.
URL Access Select the name of the URL access policy, if any, that will be applied
to matching HTTP requests. See Restricting access to specific URLs
on page 453.
Page Access Select the page access rule, if any, that defines the URLs that must
be accessed in a specific order. See Enforcing page order that follows
application logic on page 586.
Start Pages Select the start pages rule, if any, that represent legitimate entry
points into your web pages and web services. See Specifying URLs
allowed to initiate sessions on page 591.
Allow Method Select an existing allow method policy, if any, that will be applied to
matching HTTP requests. See Specifying allowed HTTP methods on
page 613.
IP List Select the name of a client white list or black list, if any, that will be applied
to matching requests. See Blacklisting & whitelisting clients using a source
IP or source IP range on page 471.
Geo IP Select the name of a geographically-based client black list, if any, that will
be applied to matching requests. See Blacklisting & whitelisting countries &
regions on page 467.
DoS Protection Select the name of an existing DoS prevention policy. For details, see
Grouping DoS protection rules on page 504.
IP Reputation Enable to apply IP reputation intelligence. See Blacklisting source IPs with
poor reputation on page 465.
FortiGate Quarantined IPs Enable to detect source IP addresses that a FortiGate unit is currently
preventing from interacting with the network and protected systems.
Then, select the action that FortiWeb takes if it detects a quarantined
IP address:
l Alert Accept the request and generate an alert email, log message, or
both.
l Alert & Deny Block the request and generate an alert, log message,
or both.
Note: If FortiWeb is deployed behind a NAT load balancer and this
option is enabled, to prevent FortiWeb from blocking all connections
when it detects a violation of this type, define an X-header that
indicates the original clients IP (see Defining your proxies, clients, &
X-headers on page 386).
Allow Known Search Enable to exempt popular search engines spiders from DoS sensors,
Engines brute force login sensors, HTTP protocol constraints, combination rate
& access control (called advanced protection and custom policies in
the web UI), and blocking by geographic location (Geo IP).
This option improves access for search engines. Rapid access rates,
unusual HTTP usage, and other characteristics that may be
suspicious for web browsers are often normal with search engines. If
you block them, your web sites rankings and visibility may be
affected.
URL Rewriting Select the name of a URL rewriting rule set, if any, that will be applied
to matching requests.
HTTP Authentication Select the name of an authorization policy, if any, that will be applied
to matching requests. For details, see Offloading HTTP
authentication & authorization on page 294.
Site Publish Select the name of a site publishing policy, if any, that will be applied to
matching requests. For details, see Single sign-on (SSO) (site publishing)
on page 317.
File Compress Select the name of an compression policy, if any, that will be applied to
matching requests. For details, see Configuring compression offloading on
page 648.
File Uncompress Select the name of a decompression policy, if any, that will be applied to
matching requests. For details, see Configuring temporary decompression
for scanning & rewriting on page 651.
Web Cache Select the name of a content caching policy, if any, that will be used for
matching requests. See Caching on page 530.
User Tracking Select the name of a user tracking policy, if any, to use for matching
requests. See Tracking users on page 341.
Device Tracking Enable to begin tracking client devices. When this feature is enabled, each
device is tracked regardless of its location or IP, and security violations can
be defined according to the risk level of devices using device reputation
security policies. For details, see Blacklisting client devices with poor
reputation.
Device Reputation Security Select the name of a device reputation security policy, if any, so that
Policy FortiWeb can carry out violation actions according to the risk level of
devices defined in a device reputation security policy.
Redirect URL Type a URL including the FQDN/IP and path, if any, to which a client
will be redirected if:
If you do not enter a URL, depending on the type of violation and the
configuration, the FortiWeb appliance will log the violation, may
attempt to remove the offending parts, and could either reset the
connection or return an HTTP 403 Access Forbidden or 404
File Not Found error message.
Redirect URL With Reason Enable to include the reason for redirection as a parameter in the
URL, such as
reason=Parameter%20Validation%20Violation, when
traffic has been redirected using Redirect URL. The FortiWeb
appliance also adds fortiwaf=1 to the URL to detect and cancel a
redirect loop (if the redirect action would otherwise recursively triggers
an attack event).
Data Analytics Enable to gather hit, attack, and traffic volume statistics for each
server policy that includes this profile. See Configuring policies to
gather data on page 806 and Viewing web site statistics on page 807.
To view or modify a component without leaving the page, next to the drop-down menu where you have
selected the component, click Detail.
5. Click OK.
6. If you intend to use this protection profile in conjunction with an auto-learning profile in order to indicate which
attacks and other aspects should be discovered, also configure the auto-learning profile. For details, see
Configuring an auto-learning profile on page 234.
7. To apply the inline protection profile, select it in a server policy. For details, see Configuring a server policy on
page 677.
See also
Offline protection profiles combine previously configured rules, profiles, and policies into a comprehensive set
that can be applied by a policy. Offline protection profiles contain only the features that are supported in out-of-
band topologies and asynchronous inspection, which are used with operation modes such as transparent
inspection and offline protection.
Offline protection profiles primary purpose is to detect attacks, especially for use in conjunction with auto-
learning profiles. Depending on the routing and network load, due to limitations inherent to out-of-band
topologies and asynchronous inspection, FortiWeb may not be able to reliably block all of the attacks it detects,
even if you have configured FortiWeb with an Action setting of Alert & Deny. In fact, if used in conjunction with
auto-learning profiles, you should configure the offline protection profile to log but not block attacks in order to
gather complete session statistics for the auto-learning feature.
Offline protection profiles only include features that do not require an inline network
topology. You can configure them at any time, but a policy cannot apply an offline
protection profile if the FortiWeb appliance is operating in a mode that does not
support them. For details, see How operation mode affects server policy behavior on
page 654.
1. Before configuring an offline protection profile, first configure any of the following that you want to include in
the profile:
To save time, you may be able to use auto-learning to generate protection profiles and
their components by observing your web servers traffic. For details, see Auto-learning
on page 207.
l an X-Forwarded-For: or other X-header rule (see Defining your proxies, clients, & X-headers on page 386)
l an allowed method policy (see Specifying allowed HTTP methods on page 613)
l a file upload restriction policy (see Limiting file uploads on page 637)
l a URL access policy (see Restricting access to specific URLs on page 453)
l a signature set (see Blocking known attacks & data leaks on page 538)
l an oracle padding protection rule (see Defeating cipher padding attacks on individually encrypted inputs on
page 573)
l a cookie security policy (see Protecting against cookie poisoning and other cookie-based attacks on page 482)
l a parameter validation policy (see Validating parameters (input rules) on page 597)
l a hidden field protection rule (see Preventing tampering with hidden inputs on page 607)
l a brute force login attack profile (see Preventing brute force logins on page 506
l a protocol constraints profile (see HTTP/HTTPS protocol constraints on page 618)
l a robot control profile (see Blacklisting content scrapers, search engines, web crawlers, & other robots on page
474)
l an IP list (see Blacklisting & whitelisting clients using a source IP or source IP range on page 471)
l the IP reputation policy (see Blacklisting source IPs with poor reputation on page 465)
l a file uncompress rule (see Configuring temporary decompression for scanning & rewriting on page 651)
l a trigger if you plan to use policy-wide log and alert settings (see Viewing log messages on page 768)
l a user tracking policy (see Tracking users on page 341)
2. Go to Policy> WebProtectionProfileand select the OfflineProtectionProfile tab.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Protection Configuration category. For details, see Permissions on page
69.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 63 characters.
Session Management Enable to use your web applications session IDs in order for FortiWeb
to be able to track the state of web applications across multiple
requests. Also configure Session Timeout.
After this time elapses during which there were no more subsequent
requests, after which the FortiWeb appliance will regard the next
request as the start of a new HTTP session.
Session Key Type the name of the session ID, if any, that your web application
uses in the URL to identify each session.
page.php?mysession=123ABC&user=user1
Signatures Select the name of the signature set, if any, that FortiWeb applies to
matching requests.
Attack log messages for this feature vary by which type of attack was
detected. For a list, see Blocking known attacks & data leaks on page
538.
Enable AMF3 Protocol Enable to scan requests that use action message format 3.0 (AMF3)
Detection for:
Enable XML Protocol Enable to scan for matches with attack and data leak signatures in Web 2.0
Detection (XML AJAX) and other XML submitted by clients in the bodies of HTTP
POST requests.
Illegal XML Format Enable to validate that XML elements and attributes in the requests
body conforms to the W3C XML 1.1 and/or XML 2.0 standards.
Malformed XML, such as without the final > or with multiple >> in the
closing tag, is often an attempt to exploit an unhandled error condition
in a web applications XHTML or XML parser.
If the request fails the validation, FortiWeb takes the specified action.
l Alert Accept the request and generate an alert email, log message, or
both.
l Alert & Deny Block the request and generate an alert, log message,
or both.
In addition, select a severity level and trigger policy.
Enable JSON Protocol Enable to scan for matches with attack and data leak signatures in JSON
Detection data submitted by clients in HTTP requests with Content-Type:
values application/json or text/json.
Illegal JSON Format Enable to scan for illegal formatting in JSON data. If FortiWeb detects
illegal formatting, it takes the specified action.
l Alert Accept the request and generate an alert email, log message, or
both.
l Alert & Deny Block the request and generate an alert, log message,
or both.
In addition, select a severity level and trigger policy.
Custom Policy Select the name of a combination source IP, rate limit, HTTP header,
and URL access policy, if any, that is applied to matching requests.
See Combination access control & rate limiting on page 460.
Padding Oracle Protection Select the name of padding oracle protection rule, if any, that will be
applied to matching requests. See Defeating cipher padding attacks
on individually encrypted inputs on page 573.
Parameter Validation Rule Select the name of the HTTP parameter validation rule, if any, that
will be applied to matching requests. See Validating parameters
(input rules) on page 597.
Hidden Fields Protection Select the name of a hidden fields group, if any, that will be applied to
Rule matching requests. See Preventing tampering with hidden inputs on
page 607.
File Upload Restriction Select an existing file upload restriction policy, if any, that will be
Policy applied to matching requests. See Limiting file uploads on page 637.
HTTP Protocol Constraints Select the name of an HTTP protocol constraint, if any, that will be
applied to matching requests. See HTTP/HTTPS protocol constraints
on page 618.
Attack log messages for this feature vary by which type of attack was
detected. For a list, see HTTP/HTTPS protocol constraints on page
618.
URL Access Policy Select the name of the URL access policy, if any, that will be applied
to matching requests. See Restricting access to specific URLs on
page 453.
Allow Request Method Select an existing allowed method policy, if any, that will be applied to
Policy matching requests. See Specifying allowed HTTP methods on page
613.
Brute Force Login Select the name of a brute force login attack profile, if any, that will be
applied to matching requests. See Preventing brute force logins on
page 506.
IP List Policy Select the name of a client black list or white list, if any, that will be
applied to matching requests. See Blacklisting & whitelisting clients
using a source IP or source IP range on page 471.
Geo IP Select the name of a geographically-based client black list, if any, that will
be applied to matching requests. See Blacklisting & whitelisting countries &
regions on page 467.
Allow Known Search Enable to exempt popular search engines spiders from DoS sensors,
Engines brute force login sensors, HTTP protocol constraints, and combination
rate & access control (called advanced protection and custom
policies in the web UI).
This option improves access for search engines. Rapid access rates,
unusual HTTP usage, and other characteristics that may be abnormal
for web browsers are often normal with search engines. If you block
them, your web sites rankings and visibility may be affected.
File Uncompress Rule Select the name of a file decompression policy, if any, that will be applied
to matching requests. See Configuring temporary decompression for
scanning & rewriting on page 651.
User Tracking Select the name of a user tracking policy, if any, to use for matching
requests. See Tracking users on page 341.
Data Analytics Enable to gather hit, attack, and traffic volume statistics for each
server policy that includes this profile. See Configuring policies to
gather data on page 806 and Viewing web site statistics on page 807.
To view or modify a component without leaving the page, next to the drop-down menu where you have
selected the component, click Detail.
5. Click OK.
6. If you will use this offline protection profile in conjunction with an auto-learning profile in order to indicate
which attacks and other aspects should be discovered, also configure the auto-learning profile. For details,
see Configuring an auto-learning profile on page 234.
7. To apply the offline protection profile, select it in a policy. For details, see Configuring a server policy on page
677.
See also
Server policies:
Server policy behavior and supported features vary by operation mode. For details, see How operation mode
affects server policy behavior on page 654. It also varies by whether or not the policy uses IPv6 addresses.
If a policy has any virtual servers or a server pool members with IPv6 addresses, it
does not apply features that do not yet support IPv6, even if they are selected.
To achieve more complex policy behaviors and routing, you can chain multiple policies
together. See Defining your web servers on page 351.
To configure a policy
The maximum number of server policies you can create depends on the model of your
FortiWeb appliance. For details, see AppendixB: Maximum configuration values on
page 907.
Do not configure policies you will not use. FortiWeb allocates memory with
each server policy, regardless of whether it is actually in active use.
Configuring extra policies unnecessarily consumes memory and decreases
performance.
1. Before you configure a policy, you usually should first configure any of the following that you must, or want to,
include in the policy:
Alternatively, you can create missing components on-the-fly while configuring the
policy, without leaving the page. To do this, select Create New from each policy
components drop-down menu.
However, when creating many components, you can save time by leaving the
policy page, going to the other menu areas, and creating similar profiles by
cloning, then modifying each clone.
Generally speaking, because policies tie other components together and apply
them to clients connections with your web servers, they should be configured
last. See Workflow on page 34.
l If the policy will govern secure connections via HTTPS, you must upload the web servers certificate, define a
certificate verification rule, and possibly also an intermediate CA certificate group. See Secure connections
(SSL/TLS) on page 399.
l Define your web servers by configuring either physical servers or domain servers within a server pool. You can
use the pools to distribute connections among the servers. See Creating a server pool on page 359.
l Define one or more HTTP content routing policies that forward traffic based on headers in the HTTP layer. See
Routing based on HTTP content on page 373.
l Define one or more host names or IP addresses if you want to accept or deny requests based upon the Host:
field in the HTTP header. See Defining your protected/allowed HTTP Host: header names on page 349.
l Configure a virtual server or V-zone to receive traffic on the FortiWeb appliance. See Configuring virtual servers
on your FortiWeb on page 393 or Configuring a bridge (V-zone) on page 175.
l Configure an inline or offline (out-of-band) protection profile. See Configuring a protection profile for inline
topologies on page 658 (any mode except offline protection), Configuring a protection profile for an out-of-band
topology or asynchronous mode of operation on page 669 (offline protection mode only).
l If you want the FortiWeb appliance to gather auto-learning data, either configure an auto-learning profile and
its required components or use the default. See Running auto-learning on page 237.
l If you want to present a customized error page when a request is denied by a protection profile, edit the error
page. See Customizing error and authentication pages (replacement messages) on page 720.
2. Go to Policy> ServerPolicy.
To access this part of the web UI, your administrator accounts access profile must have Read and Write
permission to items in the Server Policy Configuration category. For details, see Permissions on page 69.
Policy Name Type a name that can be referenced by other parts of the configuration. Do
not use spaces or special characters. The maximum length is 63
characters.
Deployment Mode Select the method of distribution that the FortiWeb appliance uses
when it accepts connections for this policy.
Virtual Server Select the name of a virtual server, data capture (listening) network
interface, or v-zone (bridge).
or
The name and purpose of these settings varies by operation mode:
Data Capture Port
l Reverse proxy Virtual Server identifies the IP address and network
or
interface of incoming traffic that FortiWeb routes and to which the policy
V-zone applies a profile.
l Offline protection Data Capture Port identifies the network
interface of incoming traffic that the policy attempts to apply a
profile to. The IP address is ignored.
HTTP Content Routing To specify HTTP content routing policies and options that this policy
uses, click Add, then complete the following settings for each entry:
Server Pool Select the server pool whose members receive the connections. A
server pool can contain a single physical server or domain server. For
details, see Creating a server pool on page 359.
Protected Hostnames Select a protected host names group to allow or reject connections
based upon whether the Host: field in the HTTP header is empty or
does or does not match the protected host names group. For details,
see Defining your protected/allowed HTTP Host: header names on
page 349.
Caution: Unlike HTTP 1.1, HTTP 1.0 does not require the Host:
field. The FortiWeb appliance does not block HTTP 1.0 requests
because they do not have this field, regardless of whether or not you
have selected a protected host names group.
Client Real IP Select to configure FortiWeb to use the source IP address of the client
that originated the request when it connects to a back-end server on
behalf of that client.
Blocking Port Select which network interface FortiWeb uses to send TCP RST
(connection reset) packets when it attempts to block the request or
connection after it detects traffic that violates a policy. For details on
blocking behavior, see Topology for offline protection mode on page
94.
Syn Cookie Enable to prevent TCP SYN floods. Also configure Half Open
Threshold.
For more information, see Preventing a TCP SYN flood on page 503.
Half Open Threshold Type the TCP SYN cookie threshold in packets per second. Also
configure Syn Cookie.
HTTP Service Select the custom or predefined service that defines the TCP port
number where the virtual server receives HTTP traffic.
HTTPS Service Select the custom or predefined service that defines the TCP port
number where the virtual server receives HTTPS traffic. Also configure
Certificate.
Certificate Select the server certificate that FortiWeb uses to encrypt or decrypt
SSL-secured connections.
Certificate Intermediate Select the name of a group of intermediate certificate authority (CA)
Group certificates, if any, that FortiWeb presents to clients. An intermediate
CA can complete the signing chain and validate the server certificates
CA signature.
Alternatively, you can include the entire signing chain in the server
certificate itself before you upload it to FortiWeb. See Uploading a
server certificate on page 417 and Supplementing a server certificate
with its signing chain on page 420.
Show/Hide advanced SSL Click to show or hide the settings that allow you to specify a Server
settings Name Indication (SNI) configuration, increase security by disabling
specific versions of TLS and SSL for this policy, and other advanced
SSL settings.
Add HSTS Header Enable to combat MITM attacks on HTTP by injecting the RFC 6797
strict transport security header into the reply. For example:
This header forces clients to use HTTPS for subsequent visits to this
domain. If the certificate is invalid, the clients web browser receives a
fatal connection error and does not display a dialog that allows the
user to override the certificate mismatch error and continue.
Max. Age Specify the time to live in seconds for the HSTS header.
Certificate Verification Select the name of a certificate verifier, if any, that FortiWeb uses to
validate an HTTP clients personal certificate.
For true transparent proxy mode, configure this setting in the server
pool configuration instead. See Certificate Verification in Creating a
server pool on page 359.
Note: The client must support SSL 3.0, TLS 1.0, TLS 1.1, or TLS 1.2.
Enable URL Based Client Specifies whether FortiWeb uses a URL-based client certificate group
Certificate to determine whether a client is required to present a personal
certificate.
URL Based Client Specifies the URL-based client certificate group that determines
Certificate Group whether a client is required to present a personal certificate.
If the URL the client requests does not match an entry in the group,
the client is not required to present a personal certificate.
Max HTTP Request Length Specifies the maximum allowed length for an HTTP request with a
URL that matches an entry in the URL-based client certificate group.
Enable OCSP Stapling Click to enable OCSP stapling for the certificate specified in
Certificate. For details, see "Using OCSP Stapling" on page 452.
Available only if you specify a value for HTTPS Service.
OCSP Stapling Group Select an OCSP stapling policy to apply to the certificate specified in
Certificate.
Available only if Enable OCSP Stapling is enabled.
Client Certificate Enable to configure FortiWeb to include the X.509 personal certificate
Forwarding presented by the client during the SSL/TLS handshake, if any, in an
X-Client-Cert: HTTP header when it forwards the traffic to the
protected web server.
FortiWeb still validates the client certificate itself, but this forwarding
action can be useful if the web server requires the client certificate for
the purpose of server-side identity-based functionality.
Enable Server Name Select to use a Server Name Indication (SNI) configuration instead of
Indication (SNI) or in addition to the server certificate specified by Certificate.
If you select Enable Strict SNI, FortiWeb always ignores the value of
Certificate.
Enable Strict SNI Select to configure FortiWeb to ignore the value of Certificate when it
determines which certificate to present on behalf of server pool members,
even if the domain in a client request does not match a value in the SNI
configuration.
SNI Policy Select the Server Name Indication (SNI) configuration that determines
which certificate FortiWeb presents on behalf of the members of a server
pool.
SSL Protocols Specify which versions of the SSL or TLS cryptographic protocols
clients can use to connect securely to the FortiWeb appliance or back-
end servers.
For more information, see Supported cipher suites & protocol versions
on page 401.
SSL/TLS encryption level Specify whether the set of cipher suites that FortiWeb allows creates a
medium-security, high-security or customized security configuration.
If Customized is selected, you can select a cipher and then use the
arrow keys to move it to the appropriate list.
You can also enable support for the ChaCha-Poly1305 cipher suite
using a CLIcommand. See Enabling ChaCha-Poly1305 cipher suite
support on page 404.
For more information, see Supported cipher suites & protocol versions
on page 401.
Enable Perfect Forward Enable to configure FortiWeb to generate a new public-private key
Secrecy pair when it establishes a secure session with a DiffieHellman key
exchange.
Prioritize RC4 Cipher Suite Enable to configure FortiWeb to use the RC4 cipher when it first
attempts to create a secure connection with a client.
Enable only when: TLS 1.0 is enabled in SSL Protocols and SSL/TLS
encryption level is either Medium or a custom encryption level that
includes RC4-SHAor RC4-MD5.
Disable Client-Initiated SSL Select to configure FortiWeb to ignore requests from clients to
Renegotiation renegotiate TLS or SSL.
Redirect HTTP to HTTPS Select to automatically redirect all HTTP requests to the HTTPS
service with the same URL and parameters.
Also configure HTTPS Service and ensure the service uses port 443
(the default).
FortiWeb does not apply the protection profile for this policy (specified
by Web Protection Profile) to the redirected traffic.
This option can replace redirection functionality that you create using
URL rewriting rules. For more information, see Example: HTTP-to-
HTTPS redirect on page 519.
Web Protection Profile Select the profile to apply to the connections that this policy accepts,
or select Create New to add a new profile in a pop-up window,
without leaving the current page.
View Profile Details Click to display the settings of the current profile without leaving the
current page.
Auto Learn Profile Select the auto-learning profile, if any, to use in order to discover attacks,
URLs, and parameters in your web servers HTTP sessions, or select
Create New to add a new auto-learning profile in a pop-up window without
leaving the current page. For details, see Configuring an auto-learning
profile on page 234.
Monitor Mode Enable to override any actions included in the profiles, and instead
accept the request and generate an alert email and/or log message
for all policy violations.
This setting does not affect any rewriting or redirection actions in the
protection profiles, including the action to remove poisoned cookies.
Note: Logging and/or alert email occur only if you enable and
configure them. See Logging on page 749 and Alert email on page
780.
URL Case Sensitivity Enable to differentiate uniform resource locators (URLs) according to
upper case and lower case letters for features that act upon the URLs
in the headers of HTTP requests, such as start page rules, IP list
rules, and page access rules.
5. Click OK.
The server policy is displayed in the list on Policy> ServerPolicy. Initially, it is enabled. For information on
disabling a policy without deleting it, see Enabling or disabling a policy on page 692.
Legitimate traffic should now be able to flow, while policy-violating traffic (that is, traffic that is prohibited by
the settings in your policy or protection profile) may be blocked, depending on your Action settings for the
rule that the traffic has violated.
Whitelisted items are not included in policy enforcement. See Configuring the global
objectwhitelist on page 655.
6. To verify the policy, test it by forming connections between legitimate clients and servers at various points
within your network topology. Also attempt to send traffic that violates your policy, and should be logged,
modified, or blocked.
If you have another FortiWeb appliance, you can use its web vulnerability scanner to
verify that your policy is blocking attacks as you expect. For details, see Vulnerability
scans on page 703.
If a connection fails, you can use tools included in the firmware to determine whether the problem is local to
the appliance or elsewhere on the network. See Troubleshooting on page 843 and Reducing false positives on
page 837. Also consider troubleshooting recommendations included with each features instructions.
See also
l HTTP pipelining
l How operation mode affects server policy behavior
l How to offload or inspect HTTPS
l How to force clients to use HTTPS
l Enabling or disabling a policy
l Sequence of scans
l External load balancers: before or after?
l HTTP sessions & security
HTTP pipelining
For clients that support HTTP 1.1, FortiWeb accelerates transactions by bundling them inside the same TCP
connection, instead of waiting for a response before sending/receiving the next request. This can increase
performance when pages containing many images, scripts, and other auxiliary files are all hosted on the same
domain, and therefore logically could use the same connection.
Many browsers used on smart phones prefer to pipeline their HTTP requests.
When FortiWeb is operating in reverse proxy or true transparent proxy mode, it can automatically use HTTP
pipelining for requests with the following characteristics:
end
See also
When the operation mode is reverse proxy, disabling a policy could block traffic if no
remaining active policies match that traffic. When no policies exist or none are
enabled, the FortiWeb appliance blocks all HTTP/HTTPS traffic.
Even if you disable a server policy, it still consumes memory (RAM). If you do not plan to use the policy for some
time, consider deleting it instead.
1. Go to Policy> ServerPolicy.
2. In the row corresponding to the policy that you want to enable, click the switch on in the Enable column.
3. In the row corresponding to the policy that you want to disable, click the switch off in the Enable column.
See also
Anti-defacement
The anti-defacement features monitors your web sites for defacement attacks. If it detects a change, it can
automatically reverse the damage.
This feature can be especially useful if you are a hosting provider with many customers, such as favorite local
restaurants or community associations, who have basic web pages that should not be changed, but it is
impractical to manually monitor them on a continuous basis.
Content that will not be backed up includes all database-driven content that is
inserted into web pages using AJAX, PHP, JSP, ASP, or ColdFusion, such as
stepin boards, forums, blogs, and shopping carts: page content does not reside
within the page markup itself, but instead resides in a back-end database that is
queried and whose results are dynamically inserted into page content at runtime
when the client requests a page. Separately from configuring anti-defacement,
you should regularly back up MySQL, Oracle, PostgreSQL, and other databases
and defend them with controls such as FortiDB.
The anti-defacement feature examines a web sites files for changes at specified time intervals. If it detects a
change that could indicate a defacement attack, the FortiWeb appliance can notify you and quickly react by
automatically restoring the web site contents to the previous backup.
Before updating a web site where you are using web site anti-defacement, disable
both the Enable Monitor and Restore Changed Files Automatically options.
Otherwise, the FortiWeb appliance will perceive your changes as a defacement
attempt and undo them.
To configure anti-defacement
Field Description
Total Files Displays the total number of files on the web site.
Total Backup Displays the total number of files that have been backed up onto the
FortiWeb appliance for recovery purposes. Those files that you choose not
to monitor will not be backed up.
Total Changed Displays the total number of files that have changed.
A dialog appears.
Web Site Name Type a name for the web site. This name is not used when monitoring the
web site. It does not need to be the web sites FQDN or virtual host name.
Enable Monitor Enable to monitor the web sites 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.
Note: While you are intentionally modifying the web site, you must
turn off this option and Restore Changed Files Automatically.
Otherwise, the FortiWeb appliance will detect your changes as a
defacement attempt, and undo them.
Hostname/IP Address Type the IP address or FQDN of the web 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 host name that may appear in the Host:
field of HTTP headers.
Connection Type Select which protocol (FTP, SSH , or Windows Share) to use when
connecting to the web site in order to monitor its contents and download
web site backups.
FTP/SSH Port Enter the TCP port number on which the web sites real server listens.
The standard port number for FTP is 21; the standard port number for
SSH is 22.
Windows Share Name Type the name of the shared folder on the web server, such as
Share. Do not include the CIFS host name or workgroup name.
Folder of Web Site Type the path to the web sites folder, such as public_html or
wwwroot, on the real server. The path is relative to the initial location
when logging in with the user name that you specify in User Name.
The anti-defacement file filter is a list of folder (directory) or file names that
the anti-defacement feature does not monitor,or a list of items that anti-
defacement always monitors. See Specifying files that anti-defacement
does not monitor on page 699.
User Name Enter the user name, such as FortiWeb, that the FortiWeb appliance will
use to log in to the web sites real server.
Password Enter the password for the user name you entered in User Name.
Alert Email Policy From the drop-down list, select existing email settings that contains one or
more recipient email addresses (MAIL TO:) to which the FortiWeb
appliance sends an email when it detects that the web site has changed.
Monitor Interval for Root Enter the time interval in seconds between each monitoring
Folder connection from the FortiWeb appliance to the web server. During this
connection, the FortiWeb appliance examines Folder of Web Site (but
not its subfolders) to see if any files have changed by comparing the
files with the latest backup.
Monitor Interval for Other Enter the time interval in seconds between each monitoring
Folder connection from the FortiWeb appliance to the web server. During this
connection, the FortiWeb appliance examines subfolders to see if any
files have been changed by comparing the files with the latest backup.
Maximum Depth of Type how many folder levels deep to monitor for changes to the web
Monitored Folders sites files.
Files in subfolders deeper than this level are not backed up.
Skip Files Larger Than 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 default file size limit is 10240 KB.
Skip Files With These Type zero or more file extensions, such as iso, avi, to exclude
Extensions from the web site backup. Separate each file extension with a comma.
Note: Backing up large files, such as video and audio, can impact
performance.
Restore Changed Files Enable to automatically restore the web site to the previous revision
Automatically number when FortiWeb detects that the web site has been changed.
Note: While you are intentionally modifying the web site, you must
turn off this option and Enable Monitor. Otherwise, the FortiWeb
appliance detects your changes as a defacement attempt, and
undoes them.
Acknowledge Changed File Enable to automatically accept changes to the web site when
Automatically FortiWeb detects that the web site has been changed.
4. Click Test Connection to test the connection between the FortiWeb appliance and the web server.
5. Click OK.
During the next interval, FortiWeb should connect to download its first backup. You should notice that Total
Files and Total Files will increase, and Connected should become and remain a green check mark.
If not, first verify the login and IP address that you provided. Also, on the web server, check the file system
permissions for the account that FortiWeb is using to connect. (FortiWeb must be able to both read and, if it
will be restoring files, write to the folder and files. On Microsoft Windows, you may need to examine your
security policy configuration to make sure that the account is authenticating as itself, and is not degrading to
the guest account.) Verify that a route exists between the FortiWeb and the web server, and that connectivity
is reliable, with no packet loss. Also verify that any routers or firewalls between them, including
WindowsFirewall, are not blocking SSH, FTP, or CIFS connections. Other troubleshooting varies by the
protocol that FortiWeb is using to connect, such as checking for a compatible protocol version and cipher
suite.
See also
You can create a list of folder (directory) or file names that the anti-defacement feature does not monitor. You can
also create a list of items that anti-defacement always monitors.
FortiWeb applies the filters in these lists to any web site you configure using Web Protection> Web Anti
Defacement> Anti Defacement.
1. Go to WebProtection> Web Anti Defacement and select the Anti Defacement File Filter tab.
2. Click Create New and complete the following settings:
l Black File List A list of the names of folders and files that the anti-
defacement feature does not monitor. FortiWeb monitors all other folders
and files.
l White File List A list of the names of folders and files that the anti-
defacement feature monitors. FortiWeb does not monitor any other
folders or files.
FortiWeb still applies criteria in the anti-defacement configuration to
these items. For example, if the file size exceeds the maximum,
FortiWeb does not monitor it.
3. Click OK.
4. Click Create New and complete the following settings:
File Name Enter the name of the folder or file to add to the list.
Ensure that the name exactly matches the folder or file that you want
to specify. For Directory items, include the / (forward slash).
For example, if File Type is Directory and you want to add a folder
abc that is under the root folder of a web site, enter /abc.
You can restrict the filter condition to a specific file by including file
path information in File Name. For example, a web site contains
many files with the name 123.txt. To specify the instance located
in the abc folder only, enter /abc/123.txt.
5. Repeat the filter member creation steps until the list contains all the required folder and file names.
The anti-defacement feature maintains a list of files that have changed for each web site it monitors. You can use
this list to review, accept, and revert the changes.
To restore all the web site files, see Reverting a defaced web site on page 701.
Alternatively, to automatically acknowledge all changes to files (for example, if you are updating the web site),
use the Acknowledge Changed File Automatically setting in the web site's anti-defacement configuration.
1. Go to WebProtection> WebAnti-Defacement and select the Anti Defacement tab. For the appropriate
web site, click the value in the Total Changed column.
l Select an item in the list, and then click Acknowledge to accept the individual change.
l Select an item in the list, and then click the Revert icon. In the list of previous versions, click the Revert icon for
the version to revert to. (FortiWeb adds this revert action as a new version in the list.)
When you configure a FortiWeb appliance to protect a web site via anti-defacement, FortiWeb periodically
downloads a backup copy of that web sites files automatically. It creates a new backup revision in the following
cases:
l When the FortiWeb appliance initiates monitoring for the first time, the FortiWeb appliance downloads a backup
copy of the web sites files and store it as the first revision.
Backup copies omit files that exceed the file size limit or match the file extensions that
you have configured the FortiWeb appliance to omit. See Anti-defacement on page
693.
l If the FortiWeb appliance could not successfully connect during a monitor interval, it creates a new revision the next
time that it re-establishes the connection.
If you do not enable Restore Changed Files Automatically, you can still manually revert the defaced web site after
a defacement attack to any known good backup revision that the FortiWeb appliance has downloaded.
3. In the row corresponding to the copy that you want to restore, click the Revert to this time icon.
The FortiWeb appliance connects to the web server and replaces defaced files from the revision you selected.
4. Click OK.
Compliance
Compliance regimes, whether requires by law or business organizations, typically require that you demonstrate
effective security policies and practices.
Requirements vary by the regime. HIPAA and the Sarbanes-Oxley Act (SOX) emphasize the need for database
security, authorization, and the prevention of data leaks. HITECH requires disclosure of security breaches. PCI
DSS concerns the prevention of information disclosure but also requires periodic scans.
Database security
As the front door to your databases, your web sites are critical to secure. FortiWeb can help to apply ad hoc
security to them by properly constraining web inputs of all kinds, and by preventing data leaks in your web
applications reply traffic.
If your database has other avenues for input, however, that back door may still be open to attack. Consider a
database security specialist such as FortiDB.
Authorization
To ensure that only authenticated individuals can access your web sites, and only for the URLS that they are
authorized for, you can use FortiWeb to add PKI authentication and/or HTTP authorization.
For instructions, see How to apply PKI client authentication (personal certificates) on page 425 and Offloading
HTTP authentication & authorization on page 294.
Large companies and organizations often have large stores of personally identifiable information that is valuable
on the black market. Often this takes the form of credit card numbers and passwords, but could also be more
specialized information such as:
If even your logs must not contain sensitive information, you can configure FortiWeb to omit it. See Obscuring
sensitive data in the logs on page 760.
Vulnerability scans
You can scan for known vulnerabilities on your web servers and web applications, helping you to design protection
profiles that are an effective and efficient use of processing resources.
Vulnerability reports from a certified vendor can help you comply with regulations and certifications that require
periodic vulnerability scans, such as Payment Card Industry Data Security Standard (PCI DSS).
Run vulnerability scans during initial FortiWeb deployment (see How to set up your FortiWeb on page 83) and
any time you are staging a new version of your web applications. You may also be required by your compliance
regime to provide reports on a periodic basis, such as quarterly.
Each vulnerability scan starts from an initial URL, authenticates if set up to do so, then scans for vulnerabilities in
web pages that it crawls to from links on the initial page. After performing the scan, the FortiWeb appliance
generates a report from the scan results.
Create and run web vulnerability scans early in the configuration of your FortiWeb
appliance. Use the reports to locate vulnerabilities and fine-tune your protection
settings.
If you have many web servers, you may want a FortiScan appliance to:
1. Optionally, configure email settings. Email settings included in vulnerability scan profiles cause FortiWeb to
email scan reports (see Configuring email settings on page 780).
2. Prepare the staging or development web server for the scan (see Preparing for the vulnerability scan on page
704).
3. Create a scan schedule, unless you plan to execute the scan manually. The schedule defines the frequency
the scan will be run (see Scheduling web vulnerability scans on page 705).
4. Create a scan profile. The profile defines which vulnerabilities to scan for (see Configuring vulnerability scan
settings on page 706).
5. Create a scan policy. The policy integrates a scan profile and schedule (see Running vulnerability scans on
page 712).
6. Either start the vulnerability scan manually (see Manually starting & stopping a vulnerability scan on page
715), or wait for it to run automatically according to its schedule.
7. Examine vulnerability scan report. The report provides details and analysis of the scan results (see Viewing
vulnerability scan reports on page 716).
See also
Network accessibility
You may need to configure each target host and any intermediary NAT or firewalls to allow the vulnerability scan
to reach the target hosts.
For example, you might schedule to avoid peak traffic hours, to restrict unrelated network access, and to ensure
that the target hosts will not be powered off during the vulnerability scan.
To determine the current traffic load, see Real Time Monitor widget on page 743. For scheduling information,
see Scheduling web vulnerability scans on page 705.
Rapid access can result in degraded network performance during the scan. If you do
not rate limit the vulnerability scan, some web servers could perceive its rapid rate of
requests as a denial of service (DoS) attack. You may need to configure the web server
to omit rate limiting for connections originating from the IP address of the FortiWeb
appliance. Alternatively, you can configure the vulnerability scan to send requests
more slowly. See Delay Between Each Request on page 709.
See also
A vulnerability scan schedule defines when the scan will automatically begin, and whether the scan is a one-time
or periodically recurring event.
1. Go to WebVulnerabilityScan> WebVulnerabilityScanSchedule.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Vulnerability Scan Configuration category. For details, see Permissions
on page 69.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Date If One Time type is selected, select the date to run the scan.
Day If the Recurring type is selected, select the days of the week to run the
scan.
4. Click OK.
5. To use the profile, select it in a web vulnerability scan policy (see Running vulnerability scans on page 712).
See also
A vulnerability scan profile defines a web server that you want to scan, as well as the specific vulnerabilities to
scan for. Vulnerability scan profiles are used by vulnerability scan policies, which determine when to perform the
scan and how to publish the results of the scan defined by the profile.
1. If FortiWeb must authenticate in order to reach all URLs that will be involved in the vulnerability scan,
configure the web application (if it provides form-based authentication) with an account that FortiWeb can use
to log in.
For best results, the account should have permissions to all functionality used by the
web site. If URLs and inputs vary by account type, you may need to create multiple
accounts one for each non-overlapping set and run separate vulnerability scans
for each account.
2. Go to WebVulnerabilityScan> WebVulnerabilityProfile.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Vulnerability Scan Configuration category. For details, see Permissions
on page 69.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
Hostname/IP or URL Type the fully qualified domain name (FQDN), IP address, or full URL
to indicate which directory of the web site you want to scan. Behavior
of the scan varies by the type of the entry:
Unless you will enter an IP address for the host, you must have
configured a DNS server that the FortiWeb appliance can use to query
for the FQDN. For details, see Configuring DNS settings on page 187.
Note: This starting point for the scan can be overridden if the web
server automatically redirects the request after authentication. See
Login with HTTP Authentication and Login with specified URL/data.
Scan Enable detection of any of the following vulnerabilities that you want
to include in the scan report:
Scan Mode Select whether the scan job will use Basic Mode (use HTTP GET only
and omit both user-defined and predefined sensitive URLs) or
Enhanced Mode (use both HTTP POST and GET, excluding only
user-defined URLs).
Basic Mode will avoid alterations to the web sites databases, but
only if all inputs always uses POST requests. It also omits testing of
the following URLs, which could be sensitive:
l /formathd
l /formatdisk
l /shutdown
l /restart
l /reboot
l /reset
Caution: Fortinet strongly recommends that you do not scan for
vulnerabilities on live web sites, even if you use Basic Mode.
Instead, duplicate the web site and its database into a test
environment, and then use Enhanced Mode with that test
environment.
Basic Mode cannot be guaranteed to be non-destructive. Many web
sites accept input through HTTP GET requests, and so it is possible
that a vulnerability scan could result in database changes, even
though it does not use POST. In addition, Basic Mode cannot test for
vulnerabilities that are only discoverable through POST, and therefore
may not find all vulnerabilities.
Request Timeout Type the number of seconds for the vulnerability scanner to wait for a
response from the web site before it assumes that the request will not
successfully complete, and continues with the next request in the scan. It
will not retry requests that time out.
Delay Between Each Type the number of seconds to wait between each request.
Request
Some web servers may rate limit the number of requests, or blacklist
clients that issue continuous requests and therefore appear to be a
web site harvester or denial of service (DoS) attacker. Introducing a
delay can be useful to prevent the vulnerability scanner from being
blacklisted or rate limited, and therefore slow or unable to complete its
scan.
Note: Increasing the delay will increase the time required to complete
the scan.
5. Click Login Options blue arrow to expand the section, then configure the following:
Login with HTTP Enable to use basic HTTP authentication if the web server returns
Authentication HTTP 401 Unauthorized to request authorization. Also configure
User and Password.
User Type the user name to provide to the web site if it requests HTTP
authentication.
Login with specified Enable to authenticate if the web server does not use HTTP 401
URL/data Authorization Required, but instead provides a web page with
a form that allows the user to authenticate using HTTP POST. Also
configure Authenticate URL and Authenticate Data.
Note: If a web site requires authentication and you do not configure it,
the scan results will be incomplete.
Authenticate URL Type the URL, such as /login.jsp, that the vulnerability scan will use to
authenticate with the web application before beginning the scan.
6. Click Scan Web Site URLs Options blue arrow to expand the section, then configure the following:
Crawl entire website Select this option to automatically follow links leading from the initial
automatically starting point that you configured in Hostname/IP or URL. The
vulnerability scanner will stop following links when it has scanned the
number of URLs configured in Crawl URLs Limit.
Crawl URLs Limit Type the maximum number of URLs to scan for vulnerabilities while
automatically crawling links leading from the initial starting point.
Note: The actual number of URLs scanned could exceed this limit if
the vulnerability scanner reaches the limit but has not yet finished
crawling all links on a page that it has already started to scan.
Specify URLs for scanning Select this option to manually specify which URLs to scan, such as
/login.do, rather than having the vulnerability scanner
automatically crawl the web site. Enter each URL on a separate line in
the text box.
Exclude scanning Enable to exclude specific URLs, such as /addItem.cfm, from the
following URLs vulnerability scan. Enter each URL on a separate line in the text box.
This may be useful to accelerate the scan if you know that some URLs
do not need scanning. It could also be useful if you are scanning a live
web site and wish to prevent the scanner from inadvertently adding
information to your databases.
7. Click OK.
8. To use the profile, select it in a web vulnerability scan policy (see Running vulnerability scans on page 712).
See also
A vulnerability scan policy defines the scheduling type of scan (an immediate scan or a scheduled scan), the
profile to use, the file format of the report, and recipients.
1. Configure a vulnerability scan profile. See Configuring vulnerability scan settings on page 706.
2. If the scan will run by a schedule instead of being manually initiated, create a vulnerability scan schedule. See
Scheduling web vulnerability scans on page 705.
3. Go to WebVulnerabilityScan> WebVulnerabilityScanPolicy.
Field Description
Status Indicates whether the scan is idle (the status indicator is solid green) or
running (the status indicator is flashing red and yellow).
Start/Stop The Start/Stop icon appears only if the policy is configured as Run
Now. If so, the icon changes depending on the current status of the
scan:
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Vulnerability Scan Configuration category. For details, see Permissions
on page 69.
Name Type a unique name that can be referenced in other parts of the
configuration. Do not use spaces or special characters. The maximum
length is 35 characters.
l Run Now The scan can be manually started at any time by the user.
See Manually starting & stopping a vulnerability scan on page 715.
l Schedule The scan is performed according to the schedule defined in
Schedule.
Schedule Select the predefined schedule to use for the scan. See Scheduling
web vulnerability scans on page 705.
Profile Select the profile to use when running the vulnerability scan. See
Configuring vulnerability scan settings on page 706.
Report Format Enable one or more file formats for the vulnerability scan report:
l HTML
l MHT (MIME HTML, which can be included in email)
l PDF
l RTF (Rich Text Format, which can be opened in word processors such as
OpenOffice or Microsoft Word)
l TXT (plain text)
Email Select the email settings, if any, to use in order to send results of the
vulnerability scan. See Configuring email settings on page 780.
6. Click OK.
If Type is Run Now, the scan begins immediately. Otherwise, it begins at the time that you configured in
Schedule. Time required varies by the network speed and traffic volume, load of the target hosts (especially
the number of request timeouts), and your configuration of Delay Between Each Request.
When the scan is complete, FortiWeb generates a report based on the scan results. See Viewing vulnerability
scan reports on page 716.
See also
1. Go to WebVulnerabilityScanWebVulnerabilityScanPolicy.
2. Locate a vulnerability scan whose Schedule column says Run Now and whose status indicator is idle.
You cannot manually start a scan that has been scheduled in advance, or that is currently in progress.
3. In the row for that vulnerability scan, click the Start icon.
FortiWeb connects to the target host configured in the profile and, if enabled to do so, authenticates.
A summary of scan results appears in the section hidden by the expansion plus sign (+) in the Name column.
You can view and/or download the full scan report via the web UI (see Viewing vulnerability scan reports on
page 716 and Downloading vulnerability scan reports on page 717). If email settings were selected in the
scan, a scan report is also delivered to its recipients.
To stop a scan
1. Go to WebVulnerabilityScan> WebVulnerabilityScanPolicy.
2. Locate a vulnerability scan whose status indicator is is running.
3. In the row for that vulnerability scan, click the Stop icon.
The vulnerability scan stops. The status indicator returns to idle. In the Name column, you can click the
expansion plus sign (+) to view a summary of the scan results to the point where you stopped the scan.
See also
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Web Vulnerability Scan Configuration category. For details, see Permissions on
page 69.
WebVulnerabilityScan> ScanHistory
Field Description
View Click to view a scan report. See Downloading vulnerability scan reports on
page 717.
Target Server Displays the host name of the server that was scanned for vulnerabilities.
Click this link to view the scan report associated with this server.
URLs Found Displays the number of URLs on the target host that were scanned for
vulnerabilities.
Alerts Found Displays the total number of vulnerabilities discovered during the scan.
Scan Time Displays the date and time that the scan was performed.
Scan Mode Indicates whether the scan job used Basic Mode (use HTTP GET only and
omit both user-defined and predefined sensitive URLs) or Enhanced
Mode (use both HTTP POST and GET, excluding only user-defined URLs).
See also
1. Go to WebVulnerabilityScan> ScanHistory.
2. Mark the check box next to the scan report that you want to download.
3. Click Download.
A dialog appears.
5. Click Save.
6. If prompted, select the location on your computer to store the HTML report.
See also
The System menu configures a variety of settings that apply to the entire FortiWeb appliance.
Many system settings must be configured during the initial installation. This section
only contains optional settings that can be configured later. For required
system settings, see the appropriate section of How to set up your FortiWeb on page
83.
l The name appears in the System Information widget on System> Status> Status. For more information about
the System Information widget, see System Information widget on page 733.
l It is used in the command prompt of the CLI.
l It is used as the SNMP system name. For information about SNMP, see SNMP traps & queries on page 785.
l FortiWeb uses it as the NASidentifier for communications with a Radius server. See Configuring RADIUS queries
on page 303.
The System Information widget and the get system status CLI command display the full host name. If
the host name is longer than 16 characters, the name may be truncated and end with a tilde (~) to indicate that
additional characters exist, but are not displayed.
For example, if the host name is FortiWeb1234567890, the CLI prompt would be FortiWeb123456789~#.
Administrators whose access profiles permit Write access to items in the System Configuration category can
change the host name.
You can also configure the local domain name of the FortiWeb appliance. For details,
see Configuring DNS settings on page 187.
4. Click OK.
See also
If your appliances hardware model, network cabling, and configuration supports it, you can configure fail-to-
wire/bypass behavior. This allows traffic to pass through unfiltered between 2 ports (a link pair) while the
FortiWeb appliance is shut down, rebooting, or has unexpectedly lost power such as due to being accidentally
unplugged or PSU failure.
l when the operation mode is true transparent proxy, transparent inspection, or WCCP
l in standalone mode (not HA)
l for a bridge (V-zone) between ports wired to a CP7 processor or other hardware
which provides support for fail-to-wire
l FortiWeb 600D: port1 + port2
In the case of HA, dont use fail-open instead, use a standby HA appliance to
provide full fault tolerance.
Bypass results in degraded security while FortiWeb is shut down, and therefore
HA is usually a better solution: it ensures that degraded security does not occur if
one of the appliances is shut down. If it is possible that both of your HA FortiWeb
appliance could simultaneously lose power, you can add an external bypass
device such as FortiBridge.
Fail-to-wire may be useful if you are required by contract to provide uninterrupted connectivity, or if you consider
connectivity interruption to be a greater risk than being open to attack during the power interruption.
Aside from the usual network topology requirements for the transparent operation modes, there are no special
requirements for fail-to-wire. During setup, after setting the operation mode, you will simply go to System>
Network> Fail-open and select either:
l PowerOff-Bypass Behave as a wire when the FortiWeb appliance is powered off, allowing connections to pass
directly through from one port to the other, bypassing all policy scans and modifications.
l PowerOff-Cutoff Interrupt connectivity when the FortiWeb appliance is powered off. Bypass is disabled. This is
the default.
See also
FortiWeb uses these pages when the client authentication method in a site publishing configuration is HTML
Form Authentication. For more information, see Single sign-on (SSO) (site publishing) on page 317.
l The error page FortiWeb uses to respond to a HTTP request that violates a policy and the configured action is Alert
& Deny or Period Block.
l The "Server Unavailable!" page that FortiWeb returns to the client when none of the server pool members are
available either because their status is Disable or Maintenance or they have failed the configured health check.
FortiWeb uses these pages for all server policies. If you require a page content that is customized for a specific
policy, create an ADOM that contains the custom pages for that policy.
l 200 OK. Typically indicates success, and accompanies resource requested by the client.
l 400 Bad Request. Typically indicates wrong syntax.
l 403 Forbidden. Typically indicates inaccessible files.
l 404 File Not Found. Typically indicates missing files.
l 500 Internal Server Error. Typically indicates one of many possible conditions such as a servlet runtime error.
l 501 Not Implemented. Typically indicates a non-existent function on the web application.
Although you can add the predefined macros to your custom messages, you cannot create macros and you
cannot modify the label macros. You can modify an image macro to reference a predefined image or one that you
have uploaded.
Label macros
You can use the following label macros anywhere in the HTML code for Attack Block Page and Server
Unavailable Message messages:
Macro Description
l The URL of a web page blocked by either the web filtering or URL
blocking feature.
l The URL of a web page that contains a blocked file that a client has
tried to download.
The source IP address of the client that attempted to access the web
%%SOURCE_IP%%
service.
%%EVENT_ID%% An ID number that identifies the attack type. Use this number to help you
locate the log for the event in the FortiWeb attack log.
You can use the following label macros anywhere in the HTML code for the Site Publish Authentication
messages:
Macro Description
The authentication server reply message. For an example of how you can
customize the message by replacing this macro with JavaScript, see
%%REPLY_TAG%%
Customize the message returned for LDAP errors (%%REPLY_TAG%%
macro) on page 723.
%%TOKEN_POST_URL%% The login URL where users insert their token code.
Macro Description
%%RSA_LOGIN_POST_ The login URL where users post their RSA SecurID credentials.
URL%%
%%RSAC_POST_URL%% The login URL where users post their RSA SecurID credentials.
%%ACCOUNT%% The username credential of a user who exceeded the maximum number of
login attempts.
The length of time that FortiWeb prevents a user from attempting to log in
%%PERIOD_TIME%% again, after the user has exceeded the allowed number of login attempts.
The site publishing policy specifies the value.
Image macros
Use the following format to add an image macro anywhere in a custom error or authentication message:
%%IMAGE:<image_name>%%
where <image_name> is the name of either a predefined image or one you have uploaded. To view or upload
images, go to System > Config > Replacement Message, and then select Manage Images tab. For more
information, see To view or add images used in error or authentication pages on page 722.
For example, in the default Attack Block Page message, the macro %%IMAGE%%:logo_v2_fnet%% adds
the predefined image logo_v2_fnet. If you add the image test to the list of images, use
%%IMAGE%%:test%% to add it to the HTML code.
1. If your custom page requires a custom image, see To view or add images used in error or authentication
pages on page 722.
For information about using macros in the code, see Macros in custom error and authentication pages on
page 721.
6. Click Save to save your changes or Restore Defaults to revert to the preset version of the page.
Ensure the image is no larger than 24 kb and that its type matches the value you selected for Content Type.
4. Click OK, and then click Return to return to the list of customizable pages.
However, you can use JavaScript to customize the message that is displayed.
Replace the macro and its formatting with the following script:
<h2>
<script type="text/javascript">
var r = "%%REPLY_TAG%%"
if (r == "Failed to search user DN" )
{
document.write("<b>Invalid Username</b>")
}
else if (r == "Failed to bind LDAP server" )
{
document.write("<b>Invalid Password</b>")
}
else if (r == "Username or password can't be null" )
{
document.write("<b>Username or password empty</b>")
}
else if (r == "Invalid credentials" )
{
document.write("<b>Invalid Username or Password</b>")
}
else if (r != "" )
{
document.write(r)
}
</script>
</h2>
You can add basic stateful firewall functionality to FortiWeb. The firewall monitors TCP, UDP, and ICMP traffic
and determines which packets to allow.
By default, the value of the system firewall policy Default Action setting is Accept.
This allows any traffic that does not match a firewall policy rule to access the FortiWeb
network interfaces.
When the firewall policy Default Action setting is Deny and the policy has no rules,
FortiWeb only allows administrative access to ports. For example, the firewall
prevents requests that do no match a rule from reaching virtual servers.
3. Click OK.
4. Add any additional firewall addresses you require.
5. Go to System> Firewall and select the Firewall Service tab.
Protocol Select the protocol that this firewall service inspects: TCP, UDP, or
ICMP.
Minimum Source Port Select the start port in the range of source ports for this firewall
service.
Maximum Source Port Select the end port in the range of source ports for this firewall service.
Minimum Destination Port Select the start port in the range of destination ports for this firewall
service.
Maximum Destination Port Select the end port in the range of destination ports for this firewall service.
l Deny Firewall blocks traffic that does not match a policy rule. However, administrative access is still allowed
on network interfaces for which it has been configured.
l Accept Firewall allows traffic that does not match a policy rule.
10. To add a policy rule, click Create New, and then complete the following settings:
Ingress Interface Specify incoming traffic that this rule applies to by selecting a network
interface.
Egress Interface Specify outgoing traffic that this rule applies to by selecting a network
interface.
Source Specify the source address of traffic that this rule applies to by
selecting an address from the firewall addresses you configured
earlier (using System> Firewall> Firewall Address).
Destination Specify the destination address of traffic that this rules applies to by
selecting an address from the firewall addresses you configured earlier
(using System> Firewall> Firewall Address).
Service Select the protocol and port range that this rule applies to by selecting
a firewall service configuration (using System> Firewall> Firewall
Service).
Action Select the action FortiWeb takes for traffic that matches this rule:
Advanced settings
Several system-wide options that determine how FortiWeb scans traffic and caches server responses are
configurable on System> Config> Advanced.
You can also configure the size of FortiWebs scan buffers. For details, see config
system advanced in the FortiWeb CLI Reference.
Note: The shared IP address rate limit for some features (see
Preventing brute force logins on page 506 and Limiting the total HTTP
request rate from an IP on page 488) will be ignored unless you
enable this option.
Maximum Body Cache Size Type the maximum size in kilobytes (KB) of the body of the HTTP
response from the web server that FortiWeb will cache per URL.
Responses are cached to improve performance on compression,
decompression, and rewriting on often-requested URLs.
Type the maximum size in kilobytes (KB) of the body of the HTTP
response from the web server that FortiWeb will buffer and scan for
data leak protection (DLP).
Maximum DLP Cache Size
Responses are cached to improve performance on compression,
decompression, and rewriting on often-requested URLs.
See also
Down the street, Giant Gelato, which distributes ice cream to eight provinces, might have a LAN for the entire
staff of 250 people, each with one or more computers. Requests that come from the Giants Gelato offices public
IP therefore may actually originate from many possible clients, and therefore normally could be much more
frequent. However, like many offices, the LAN uses source IP network address translation (SNAT) at the point
that it links to the Internet. As a result, from FortiWebs perspective, the private network address of each client is
impossible to know: it only knows the single public IP address of Giant Gelatos router. So there is a single source
IP address for Giant Gelato. However, there is a 250:1 ratio of clients to the source IP address.
This is a big proportionate difference. While a low rate limit might seem generous to Tiny Treats, Giant Gelato
would be unhappy if you applied the same rate limit to its IP address.
Lets say that both companies need access to the same ice cream inventory web application: Tiny Treats buys
from Giant Gelato. Each view in the application contains the page itself, but also up to 15 images of ice cream, 3
external JavaScripts, and an external CSS style sheet, for a total of 20 HTTP requests in order to produce each
view.
40 requests per second then might be more than adequate for Tiny Treats: the clerk could page through the
inventory twice every second, if she wanted to.
But for Giant Gelato, its clients would frequently see completely or half-broken views: some images or CSS would
be missing, or page requests denied the first or second time, because some other clients on Giant Gelatos LAN
had already consumed the 40 requests allowed to it per second of time. Normal use would be impossible.
To be practical, then, you would not base your rate limiting solely on the source IP address of requests. Instead,
you would want dual thresholds:
See also
l Advanced settings
l Limiting the total HTTP request rate from an IP
l Preventing brute force logins
Secure is an action, an ongoing way to behave; it is not a set-and-forget device. Each day, vulnerabilities,
known exploits, and best practices can change.
Knowledge is power.
To get the most value out of your FortiWeb appliance, use it to keep informed about your network not just to
protect it. FortiWeb appliances have many tools that you can use to monitor statuses, traffic, and attacks. You
can also use them to discover new web server vulnerabilities.
Status dashboard
System> Status> Status appears when you log in to the web UI. It contains a dashboard with widgets that
each indicate performance level or other system statuses.
In the default dashboard setup, widgets display the serial number and current system status of the FortiWeb
appliance, including uptime, system resource usage, host name, firmware version, system time, and status of
CLI widget that enables you to use the command line interface (CLI) through the web UI.
To customize the dashboard, select which widgets to display, where they are located on the page, and whether
they are minimized or maximized.
To move a widget, position your mouse cursor on the widgets title bar, then click and drag the widget to its new
location.
To display any of the widgets not currently shown on System> Status> Status, click Add Content. Any
widgets currently already displayed on System> Status> Status are grayed out in the Add Content menu, as
you can only have one of each display on the page.
Adding a widget
To display the default set of widgets on the dashboard, select Back to Default.
To see the available options for a widget, position your mouse cursor over the icons in the widgets title bar.
Options vary slightly from widget to widget, but always include options to close, minimize or maximize the widget.
A minimized widget
Button/field Description
Button/field Description
Close Click to close the widget on the dashboard. FortiWeb prompots you to
confirm the action. To display the widget again, click Add Content near
the top of the page.
To access the dashboard, your administrator's account access profile must have Read permission to items in the
System Configuration category. To use features that alter the FortiWeb or perform actions, you may also need
Write permissions in various categories. For details, see Permissions on page 69.
In addition to displaying system information, the System Information widget enables you to configure some
basic attributes such as the host name, operation mode, and high availability (HA) mode, and to change the
firmware.
FortiWeb administrators whose access profiles permit Write access to items in the System Configuration
category, can change the system time, host name, firmware, and operation mode, and high availability (HA)
mode.
Field Description
HA Status Displays the status of high availability (HA) for this appliance, either
Standalone or Active-Passive. The default value is Standalone.
Click Configure to configure the HA status for this appliance. See
Configuring a high availability (HA) FortiWeb cluster on page 130.
Click Change to change the host name. See Changing the FortiWeb
appliances host name on page 718.
Serial Number Displays the serial number of the FortiWeb appliance. Use this
number when registering the hardware or virtual appliance with
Fortinet Technical Support.
On hardware appliance models of FortiWeb, the serial number (e.g.
FV-3KC3R11111111) is specific to the FortiWeb appliances
hardware and does not change with firmware upgrades.
Operation Mode Displays the current operation mode of the FortiWeb appliance.
System Time Displays the current date and time according to the FortiWeb
appliances internal clock.
Firmware Version Displays the version of the firmware currently installed on the
FortiWeb appliance.
Field Description
System Uptime Displays the time in days, hours, and minutes since the FortiWeb appliance
last started.
Administrative Domain To delete existing appliance-wide policies and settings then enable
ADOMs, click Enable. See also Administrative domains (ADOMs) on
page 62.
FIPS-CC Mode Displays whether Federal Information Processing Standards (FIPS) and
Common Criteria (CC) compliant mode is enabled. You use a
CLIcommand to enable this mode.
See also
Field Description
FortiGuard
Field Description
l attack signatures
l predefined data types
l predefined suspicious URLs
l global white list objects
Possible states are:
FortiWeb l Valid The appliance currently has a valid, non-trial license, and can
Security Service download updates itself from the FDN. You can trigger this manually
and/or schedule the appliance to regularly poll and automatically install
the newest available package updates. See Connecting to FortiGuard
services on page 190.
l Expired The contract is no longer in effect.
To renew, either contact your reseller or go to the Fortinet Technical
Support web site.
Also indicates the current version number of the installed service
package, the expiry date of the service contract (if any) for this
appliance, and the previous time and method of update.
l Valid The appliance currently has a valid, non-trial license, and can
download updates itself from the FDN. You can trigger this manually
and/or schedule the appliance to regularly poll and automatically install
the newest available package updates. See Connecting to FortiGuard
services on page 190.
l Expired The contract is no longer in effect.
To renew, either contact your reseller or go to the Fortinet Technical
Support web site.
Also indicates the current version number of the installed service
package, the expiry date of the service contract (if any) for this
appliance, and the previous time and method of update.
Field Description
l Valid The appliance currently has a valid, non-trial license, and can
download updates itself from the FDN. You can trigger this manually
FortiWeb IP and/or schedule the appliance to regularly poll and automatically install
Reputation the newest available package updates. See Connecting to FortiGuard
Service services on page 190.
l Expired The contract is no longer in effect.
To renew, either contact your reseller or go to the Fortinet Technical
Support web site.
Also indicates the current version number of the installed service
package, the expiry date of the service contract (if any) for this
appliance, and the previous time and method of update.
See also
The CLI Console widget requires that your web browser support JavaScript.
To use the console, first click within the console area. Doing so automatically logs you in using the same
administrator account you used to access the web UI. You can then type commands into the CLI Console
widget. Alternatively, you can copy and paste commands from or into the console.
The prompt, by default the model number such as FortiWeb-3000C#, contains the host name of the FortiWeb
appliance. To change the host name, see Changing the FortiWeb appliances host name on page 718.
Click Detach to open the widget in a separate browser window. In this separate window, you can click
Customize to open the Console Preferences pop-up window. Use this dialog to change the buffer length and
input method, as well as the appearance of the console.
Setting/button/field Description
Preview (pane) Shows a preview of your changes to the CLI Console widgets
appearance.
Text Click the current color swatch to the left of this label, then click a color from
the color palette to the right to change the color of the text in the CLI
Console.
Background Click the current color swatch to the left of this label, then click a color from
the color palette to the right to change the color of the background in the
CLI Console.
Use external command Select to display a command input field below the normal console
input box emulation area. When this option is enabled, you can enter commands by
typing them into either the console emulation area or the external
command input field.
Console buffer length Type the number of lines the console buffer keeps in memory. The valid
range is from 20 to 9999.
Setting/button/field Description
Font Select a font from the list to change the display font of the CLI Console.
Size Select the size in points of the font. The default size is 10points.
Reset Defaults Click to reset the CLI console preferences to the factory default settings.
See also
The widget displays CPU and memory usage as an animated bar and as a percentage
of the usage for core processes only. CPU and memory usage for management
processes (for example, for HTTPS connections to the web UI) is excluded.
Normal idle load varies by hardware platform, firmware, and configured features. To determine your specific
baseline for idle, configure your system completely, reboot, then view the system load. After at least 1 week of
uptime with typical traffic volume, view the system load again to determine the normal non-idle baseline.
To determine your available disk space, you can alternatively connect to the CLI and enter the command:
diagnose system mount list
Button Description
Reboot Click to halt and restart the operating system of the FortiWeb appliance.
ShutDown Click to halt the operating system of the FortiWeb appliance, preparing its
hardware to be powered off.
Button Description
Attack logs help you track policy violations. Each message shows the date and time that the attack attempt
occurred. For more information, see Viewing log messages on page 768.
Attack log messages can also be delivered by email, Syslog, FortiAnalyzer, or SNMP.
For more information, see Logging on page 749, Configuring logging on page 752,
and SNMP traps & queries on page 785.
l HTTP Throughput Monitor Displays the traffic volume throughput during each time period.
l Attack Event History Displays the number of each type of common exploit, SQL injection, cross-site scripting
(XSS), or information disclosure attacks that were prevented.
l HTTP Hit History Displays the total number of page requests.
For each graph, you can select the following options:
l For Attack Event History and HTTP Hit History, the size of the interval (Time interval) the graph displays
l The policy statistics to view, or the statistics for all policies (Total Traffic, Total Attack Event History or Total
HTTP Hit History)
By positioning your cursor over a point in the graph, you can display information for that point in time, such as (for
HTTP Traffic Monitor) the traffic volume at that point in time.
See also
Event logs help you track system events on your FortiWeb appliance such as firmware changes, and network
events such as changes to policies. Each message shows the date and time that the event occurred. For more
information, see Viewing log messages on page 768.
Event log messages can also be delivered by email, Syslog, FortiAnalyzer, or SNMP.
For more information, see Logging on page 749, Configuring log destinations on page
756, and SNMP traps & queries on page 785.
l Policy Name Shows the name of the policy. For information on policies, see How operation mode affects server
policy behavior on page 654.
l Status Displays whether the policy is enabled or disabled (see Enabling or disabling a policy on page 692.)
l Concurrent Connections Shows the total number of connections that the policy currently governs.
l Connection/Sec Shows the number of connections the policy is governing per second.
Operation widget
The Operation widget on the dashboard displays the:
The detected physical link status indicator does not indicate whether you have
administratively enabled or disabled the network interface. To bring up or bring down a
network interface, see Network interface or bridge? on page 160.
Operation widget
See also
Go to System> Status> PolicyStatus to access summary information about server policies and their activity.
The top pane of the dashboard is a list of configured policies. The bottom pane is a list of physical or domain
servers associated with the selected polices. For HTTP content routing policies, the list of servers is organized by
content routing policy.
In the policy list, Status displays whether the policy is enabled or disabled (see Enabling or disabling a policy on
page 692.) The Concurrent Connections and Connection/Sec columns shows information about the
connections the policy currently governs.
For information on the other policy properties that are displayed, such as Vserver and Mode, see Configuring a
server policy on page 677.
For information on the server properties that are displayed, such as Pool and IP/Domain Name, see Creating a
server pool on page 359.
l Green icon The server health check is currently detecting that the web server is responsive to connections
(up).
The green icon does not indicate whether the policy is enabled or disabled. Depending
on the operation mode, a disabled policy may block traffic from clients to the web
server, effectively causing the web server to appear to be down to clients, even
though it is up to FortiWeb. See Enabling or disabling a policy on page 692.
It also does not indicate both HTTP and HTTPS separately. Protocol and port number
used are according to your configuration in the server pool.
If the server health check is mistakenly detecting that your web server is down, but it is actually up, verify that
you have specified the correct SSL/TLS and port number settings for the web server in the server pool. Also verify
that the web server is configured to respond to the protocol configured in the server health check, and that
connections are permitted by any intermediary network or host-based firewalls such as Windows Firewall.
Alternatively, to monitor the status of web servers, you can use SNMP traps. For
details, see SNMP traps & queries on page 785.
Session Count
In the top pane, the Concurrent Connections and Connection/Sec columns display a count of client
connections that the virtual server is maintaining.
In the bottom pane, the Concurrent Connections column displays a count of connections to server pools that
contain one or more back-end servers.
In some cases, the virtual server maintains a client session even though the client is not requesting data from the
back-end server. When this happens, the Concurrent Connections column in the bottom pane is 0 even
though the Concurrent Connections value in the top pane indicates there are one or more current sessions.
If supported by your FortiWeb model, System> Config> RAID enables you to view the status of the
redundant array of independent disks (RAID) that the FortiWeb appliance uses to store most of its data, including
logs, reports, auto-learning data, and web site backups for anti-defacement. You can also use this CLI command
to view the statuses of each disk in the array, its total disk space capacity, and RAID level:
diagnose hardware raid list
RAID is supported on models that originally shipped with the firmware version FortiWeb4.0MR1 or later, such as
FortiWeb1000D, 3000C/CFsx/D/DFsx, and 4000D.
On older appliances that have been upgraded to FortiWeb4.0MR1, you may be able
to see this part of the web UI, but RAID is not activated, and the disk status is will
always be Not Present
FortiWeb-VM does not support RAID from within the virtual appliance. However,
depending on your hypervisors storage repository, you can configure the hypervisor to
store its data on a SAN or external RAID. To manage your storage repository, see the
documentation for your hypervisor.
Currently, only RAID level 1 is supported, and cannot be changed. On FortiWeb 3000C/4000C and
3000D/4000D, the RAID array has a hardware controller. On FortiWeb 1000D, the array has a software controller.
RAID level 1 is also known as mirroring, and writes all data twice each drive is an exact copy of the other. This
does not increase disk write speed via striping, nor detection and correction of errors via parity. However, it does
improve availability by reducing the overall hardware failure rate of the RAID: the chance that both disks together
will fail is much lower than the chance of failure of a single disk.
Rebuilding RAID after a disk failure will result in some loss of data in packet payloads
retained with corresponding logs.
To access this part of the web UI, your administrator's account access profile must have Read and Write
permission to items in the System Configuration category. For details, see Permissions on page 69.
Logging
To diagnose problems or track actions that the FortiWeb appliance performs as it receives and processes traffic,
configure the FortiWeb appliance to record log messages.
Log messages can record attack, system, and/or traffic events. They are also the source of information for alert
email and many types of reports.
When you configure protection profiles, many components include an Action option that determines the
response to a detected violation. Actions combine with severity levels and trigger policies to determine whether
and where a log message, message on the Attack Log Console widget, SNMP trap, and/or alert email will be
generated.
Dialog showing actions, severity level, and triggers that affect logging
Before logging will occur, however, you must first enable and configure it.
You can select a priority level that log messages must meet in order to be recorded. For more information, see
Log severity levels on page 751.
For a detailed description of each FortiWeb log message, as well as log message structure, see the FortiWeb Log
Message Reference.
The FortiWeb appliance can save log messages to its memory, or to a remote location such as a Syslog server or
FortiAnalyzer appliance. For more information, see Configuring logging on page 752. The FortiWeb appliance
can also use log messages as the basis for reports. For more information, see Reports on page 791.
The FortiWeb appliance also displays event and attack log messages on the dashboard. For more information,
see Attack Log widget on page 742 and Event Log Console widget on page 745.
See also
l Log types
l Log severity levels
l Configuring logging
l Viewing log messages
Log types
Each log message contains a Type (type) field that indicates its category, and in which log file it is stored.
Log types
Avoid recording highly frequent log types such as traffic logs to the local hard disk for
an extended period of time. Excessive logging frequency can cause undue wear on the
hard disk and may cause premature failure.
Level
(0 is Name Description
greatest)
For each location where the FortiWeb appliance can store log files (disk, memory, Syslog or FortiAnalyzer), you
can define a severity threshold. The FortiWeb appliance will store all log messages equal to or exceeding the log
severity level you select.
For example, if you select Error, the FortiWeb appliance will store log messages whose log severity level is
Error, Critical, Alert, and Emergency.
Avoid recording log messages using low log severity thresholds such as information or
notification to the local hard disk for an extended period of time. A low log severity
threshold is one possible cause of frequent logging. Excessive logging frequency can
cause undue wear on the hard disk and may cause premature failure.
To optimize logging performance and help you to notice important new information, within a specific time frame,
FortiWeb will only make one log entry for these repetitive events. It will not log every occurrence. To adjust the
interval at which FortiWeb will record identical log messages during an ongoing attack, see max-dos-alert-
interval <seconds_int> in the FortiWeb CLI Reference.
Configuring logging
You can configure the FortiWeb appliance to store log messages either locally (that is, to the hard disk) and or
remotely (that is, on a Syslog or ArcSight server or FortiAnalyzer appliance). Your choice of storage location may
be affected by several factors, including the following.
l Logging only locally may not satisfy your requirements for off-site log storage.
l Attack logs and traffic logs cannot be logged to local memory.
l Very frequent logging may cause undue wear when stored on the local hard drive. A low severity threshold is one
possible cause of frequent logging. For more information on severity levels, see Log severity levels on page 751.
For information on viewing locally stored log messages, see Viewing log messages on page 768.
To configure logging
1. Set the severity level threshold that log messages must meet or exceed in order to be sent to each log storage
device. If you will store logs remotely, also configure connectivity information such as the IP address. See
Configuring log destinations on page 756, Configuring Syslog settings on page 762, Configuring FortiAnalyzer
policies on page 764, and Configuring SIEM policies on page 765
2. Group Syslog, FortiAnalyzer, and SIEM settings and select those groups in Trigger Action settings
throughout the configuration of web protection features. See Configuring triggers on page 767.
3. Enable logging in general. See Enabling log types, packet payload retention, & resource shortage alerts on
page 753.
4. If you want to log attacks, select an Alert option as the Action setting when configuring attack protection.
5. Monitor your log messages via the web UI or through alert email for events that require action from network
administrators. See Viewing log messages on page 768 and Alert email on page 780. Configure reports that
are derived from log data to review trends in your network. See Reports on page 791.
Enabling log types, packet payload retention, & resource shortage alerts
You can enable or disable logging for each log type, as well as configure system alert thresholds, and which policy
violations should cause the appliance to retain the TCP/IP packet payload (HTTP headers and a portion of the
HTTP body, if any) that can be viewed with its corresponding log message.
For more information on log types, see Log types on page 750.
To enable logging
Enable Attack Log Enable to log violations of attack policies, such as server information
disclosure and attack signature matches, if that feature is configured such
that Action is set to Alert, Alert & Deny, or Alert & Erase.
Enable Traffic Log Enable to log traffic events such as HTTP requests and responses,
and the expiration of HTTP sessions.
Enable Traffic Packet Log Enable to retain the packet payloads of all HTTP request traffic.
Unlike attack packet payloads, only HTTP request traffic packets are
retained (not HTTP responses), and only the first 4KB of the payload
from the buffer of FortiWebs HTTP parser.
Enable Event Log Enable to log local events, such as administrator logins or rebooting the
FortiWeb appliance.
Ignore SSL Errors Allows you to stop FortiWeb from logging SSL errors. This is useful when
you use high-level security settings, which generate a high volume of these
types of errors.
Retain Packet Payload For Mark the check boxes of the attack types or validation failures to retain
the buffer from FortiWebs HTTP parser. Packet retention is enabled
by default for most types.
Note: FortiWeb retains only the first 4KB of data from the offending
HTTP request payload that triggered the log message. If you require
forensic analysis of, for example, buffer overflow attacks that would
exceed this limit, you must implement it separately.
CPU Utilization Select a threshold level (60% to 99%) beyond which CPU usage triggers an
event log entry.
Memory Utilization Select a threshold level (60% to 99%) beyond which memory usage triggers
an event log entry.
Log Disk Utilization Select a threshold level (60% to 99%) beyond which log disk usage triggers
an event log entry.
Trigger Policy Select an trigger, if any, to use when memory usage or CPU usage reaches
or exceeds its specified threshold.
3. Click Apply.
See also
Alert email can be enabled here, but must be configured separately first. See Alert
email on page 780.
For logging accuracy, you should verify that the FortiWeb appliances system time is accurate. For details, see
Setting the system time & date on page 124.
Avoid recording highly frequent log types such as traffic logs to the local hard disk for
an extended period of time. Excessive logging frequency can cause undue wear on the
hard disk and may cause premature failure.
You can also configure FortiWeb to send log information to an FTP or TFTPserver in
report form.
Disk Enable to record log messages to the local hard disk on the FortiWeb appliance.
If the FortiWeb appliance is logging to its hard disk, you can use the web UI to view
log messages stored locally on the FortiWeb appliance. For details, see Viewing log
messages on page 768.
Log Level Select the severity level that a log message must equal or exceed
in order to be recorded to this storage location. For information
about severity levels, see Log severity levels on page 751.
When log disk Select what the FortiWeb appliance will do when the local disk is
is full full and a new log message occurs, either:
Caution: Enabling Syslog could result in excessive log messages being recorded in
Syslog.
Syslog entries are controlled by Syslog policies and trigger actions associated with
various types of violations. If this option is enabled, but a trigger action is not selected
for a specific type of violation, every occurrence of that violation will be transmitted to
the Syslog server in the Syslog Policy field.
Note: Logs stored remotely cannot be viewed from the FortiWeb web UI.
Syslog Policy Select the settings to use when storing log messages remotely. The
Syslog settings include the address of the remote Syslog server and
other connection settings. For more information see Configuring
Syslog settings on page 762.
Log Level Select the severity level that a log message must equal or exceed in
order to be recorded to this storage location. For information about
severity levels, see Log severity levels on page 751.
Facility Select the facility identifier that the FortiWeb appliance will use to
identify itself when sending log messages to the first Syslog
server.
Alert Mail Enable to generate alert email when log messages are created.
Distribution of alert email is controlled by email policies and trigger actions associated
with various types of violations. If this option is enabled, but a trigger action is not
selected for a specific type of violation, every occurrence of that violation will result in
an alert email to the individuals associated with the policy selected in the Email Policy
field.
Email Policy Select the email settings to use for alert emails. For more information
see Logging on page 749.
Log entries to FortiAnalyzer are controlled by FortiAnalyzer policies and trigger actions
associated with various types of violations. If this option is enabled, but a trigger
action has not been selected for a specific type of violation, every occurrence of that
violation will be recorded to the FortiAnalyzer specified in FortiAnalyzer Policy.
Note: Before enabling this option, verify that log frequency is not too great. If logs are
very frequent, enabling this option could decrease performance and cause the
FortiWeb appliance to send many log messages to FortiAnalyzer.
Note: Logs stored remotely cannot be viewed from the FortiWeb web UI.
FortiAnalyzer Select the settings to use when storing log messages remotely.
Policy FortiAnalyzer settings include the address and other connection
settings for the remote FortiAnalyzer. For more information see
Configuring FortiAnalyzer policies on page 764.
Log Level Select the severity level that a log message must equal or exceed in
order to be recorded to this storage location. For information about
severity levels, see Log severity levels on page 751.
SIEM Enable to store log messages to a SIEM (security information and event
management) server. According to the specified SIEM policy, the action will be one of
the followings:
If this option is enabled, but no trigger action is selected for a specific type of
violation, FortiWeb records every occurrence of that violation to the resource specified
by SIEM Policy.
Note: Before you enable this option, verify that log frequency is not too great. If logs
are very frequent, enabling this option can decrease performance and cause the
FortiWeb appliance to send many log messages to the resource.
Note: You cannot view logs stored remotely from the FortiWeb web UI.
Log Level Select the severity level that a log message must equal or exceed in
order to be recorded to this storage location. For information about
severity levels, see Log severity levels on page 751.
SIEM Policy Select the settings to use when storing log messages remotely. SIEM
settings configure a connection to the storage resource. For more
information see Configuring SIEM policies on page 765.
3. Click Apply.
4. Enable the log types that you want your log destinations to receive. See Enabling log types, packet payload
retention, & resource shortage alerts on page 753.
See also
Sensitive data definitions are not retroactive. They will hide strings in subsequent log
messages, but will not affect existing ones.
2. On the top right side of the page, mark one or both of the following check boxes:
l Enable Predefined Rules Use the predefined credit card number and password data types. See
Predefined suspicious request URLs on page 229.
l Enable Custom Rules Use your own regular expressions to define sensitive data. See Auto-learning on
page 207.
3. Click Create New.
A dialog appears.
4. In Name, type a unique name that can be referenced in other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. Select either General Mask (a regular expression that will match any substring in the packet payload) or
Field Mask (a regular expression that will match only the value of a specific form input).
l In the field next to General Mask, type a regular expression that matches all the strings or numbers that
you want to obscure in the packet payloads.
For example, to hide a parameter that contains the age of users under 14, you could enter:
age\=[1-13]
Valid expressions must not start with an asterisk (*). The maximum length is 255 characters.
l For Field Mask, in the left-hand field (Field Name), type a regular expression that matches all and only
the input names whose values you want to obscure. (The input name itself will not be obscured. If you
wish to do this, use General Mask instead.) Then, in the right hand field (Field Value), type a regular
expression that matches all input values that you want to obscure. Valid expressions must not start with an
asterisk (*). The maximum length is 255 characters.
For example, to hide a parameter that contains the age of users under 14, for Field Name, you would
enter age, and for Field Value, you could enter [1-13].
Field masks using asterisks are greedy: a match for the parameters value will obscure
it, but will also obscure the rest of the parameters in the line. To avoid this, enter an
expression whose match terminates with, but does not consume, the parameter
separator.
For example, if parameters are separated with an ampersand (&), and you want to
obscure the value of the Field Name username but not any of the parameters that
follow it, you could enter the Field Value:
.*?(?=\&)
username****&age=13&origurl=%2Flogin
To test a regular expression, click the >> (test) button. This opens the
Regular Expression Validator window where you can fine-tune the
expression (see Regular expression syntax on page 918).
6. Click OK.
The expression appears in the list of regular expressions that define sensitive data that will be obscured in the
logs.
When viewing new log messages, data types matching your expression are replaced with a string of asterisks.
Syslog settings can be referenced by a trigger, which in turn can be selected as the trigger action in a protection
profile, and used to send log messages to one or more Syslog servers whenever a policy violation occurs.
You can use each Syslog policy to configure connections to up to 3 Syslog servers.
Logs stored remotely cannot be viewed from the FortiWeb web UI. If you need to view
logs from the web UI, also enable local storage. For details, see Enabling log types,
packet payload retention, & resource shortage alerts on page 753.
1. Before you can log to Syslog, you must enable it for the log type that you want to use as a trigger. For details,
see Enabling log types, packet payload retention, & resource shortage alerts on page 753.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Log&Report category. For details, see Permissions on page 69.
4. If the policy is new, in Policy Name, type the name of the policy as it will be referenced in the configuration.
5. Click Create New.
A dialog appears.
9. Mark the Enable TLS check box if you want to create a TLS connection between the FortiWeb and the
Syslog server to protect the log messages transport.
If the remote host does not receive the log messages, verify the FortiWeb appliances network interfaces (see
Configuring the network interfaces on page 162) and static routes (see Adding a gateway on page 179), and
the policies on any intermediary firewalls or routers. If ICMP is enabled on the remote host, try using the
executetraceroute command to determine the point where connectivity fails. For details, see the
FortiWeb CLI Reference.
See also
Once you create FortiAnalyzer connection settings, it can be referenced by a trigger, which in turn can be selected
as a trigger action in a protection profile, and used to record policy violations.
Logs stored remotely cannot be viewed from the web UI of the FortiWeb appliance. If
you require the ability to view logs from the web UI, also enable local storage. For
details, see Enabling log types, packet payload retention, & resource shortage alerts
on page 753.
1. Before you can log to FortiAnalyzer, you must enable logging for the log type that you want to use as a trigger.
For details, see Enabling log types, packet payload retention, & resource shortage alerts on page 753.
Policy Name Enter a unique name that other parts of the configuration can
reference.
4. Click OK.
5. To add a FortiAnalyzer Server to the policy, click Create New.
Encrypt Log Transmission Select to transmit logs to the FortiAnalyzer appliance using SSL.
6. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
10. To verify logging connectivity, from the FortiWeb appliance, trigger a log message that matches the types and
severity levels that you have chosen to store on the remote host. Then, on the remote host, confirm that it has
received that log message.
If the remote host does not receive the log messages, verify the FortiWeb appliances network interfaces (see
Configuring the network interfaces on page 162) and static routes (see Adding a gateway on page 179), and
the policies on any intermediary firewalls or routers. If ICMP ECHO_RESPONSE (pong) is enabled on the
remote host, try using the execute traceroute command to determine the point where connectivity
fails. For details, see the FortiWeb CLI Reference.
You cannot use the web UI to view logs stored remotely. To view logs from the web UI,
also enable local storage. For details, see Enabling log types, packet payload
retention, & resource shortage alerts on page 753.
1. Before you can log to the resource, you enable logging for the log type that you want to use as a trigger. For
details, see Enabling log types, packet payload retention, & resource shortage alerts on page 753.
3. For Policy Name, enter a unique name that other parts of the configuration can reference.
4. Click Create New, and then do one of the following:
l To configure a connection to an ArcSight server, for Policy Type, select ArcSight CEF, and enter an IP
address and port for the server.
l To configure a connection to an QRadar server, for Policy Type, select QRadar CEF, and enter an IP
address and port for the server.
l To configure a connection to an Azure Event Hub, for Policy Type, select Azure CEF.
The Azure CEF policy type requires you to complete Azure event hub settings through the config system
eventhub CLI command or Azure PowerShell. For more information, see the FortiWeb CLI Reference and
FortiWeb-VM for Azure Install Guide.
5. Click OK.
6. If required, add any additional resources to the policy.
7. To verify logging connectivity, from the FortiWeb appliance, trigger a log message that matches the types and
severity levels that you have chosen to store on the remote resource. Then, on the remote resource, confirm
that it has received that log message.
If an ArcSight server does not receive the log messages, verify the FortiWeb appliances network interfaces
(see Configuring the network interfaces on page 162) and static routes (see Adding a gateway on page 179),
and the policies on any intermediary firewalls or routers. If ICMP ECHO_RESPONSE (pong) is enabled on
the remote host, try using the execute traceroute command to determine the point where
connectivity fails. For details, see the FortiWeb CLI Reference.
See also
1. Before you can create reports that contain logging information, you enable logging for the log type that you
want to capture in a report. For details, see Enabling log types, packet payload retention, & resource shortage
alerts on page 753.
FTP/TFTP Policy Name Enter a unique name that other parts of the configuration can
reference.
Authentication Specifies whether the server requires a user name and password for
authentication, rather than allowing anonymous connections.
Username Enter the user name that FortiWeb uses to authenticate with the server.
File Folder Specifies the location on the server where FortiWeb stores reports.
4. Click OK.
5. To verify logging connectivity, from the FortiWeb appliance, configure a report that uses this FTP/TFTP
policy, and then run it (or wait for it to run at its scheduled time). Then, on the FTP or TFTP server, confirm
that FortiWeb transmitted the report to the specified folder.
For more information on configuring FortiWeb to send a report to an FTP or TFTP server, see Selecting the
reports file type & delivery options on page 802.
See also
Configuring triggers
Triggers are sets of notification servers (Syslog, FortiAnalyzer, and alert email) that you can select in protection
rules. The FortiWeb appliance will contact those servers when traffic violates the policy and therefore triggers
logging and/or alert email.
You can also receive security event notification via SNMP. See SNMP traps & queries
on page 785.
For example, if you create a trigger that contains email and Syslog settings, that trigger can be selected as the
trigger action for specific violations of a protection profiles sub-rules. Alert email and Syslog records will be
created according to the trigger when a violation of that individual rule occurs.
To configure triggers
1. Before you create a trigger, first create any settings it will reference, such as email, Syslog and/or
FortiAnalyzer settings (see Configuring email settings on page 780, Configuring Syslog settings on page 762,
and Configuring FortiAnalyzer policies on page 764).
4. In Name, type a unique name that can be referenced by other parts of the configuration. Do not use spaces or
special characters. The maximum length is 35 characters.
5. Pick an existing policy from one or more of the four Email, Syslog, FortiAnalyzer, or SIEM policies from the
drop-down lists. FortiWeb will use these notification devices for all protection rule violations that use this
trigger.
6. Click OK.
7. To apply the trigger, select it in the Trigger Action setting in a web protection feature, such as a hidden field
rule, or an HTTP constraint on illegal host names.
Depending on the type of log, some log messages cannot be viewed from the web UI.
Log messages are in human-readable format, where each columns name, such as Source (src in a raw
(unformatted) view), indicates its contents.
To assist you in forensics and troubleshooting false positives, if the request matched an attack signature, the part
of the packet that matched is highlighted.
An attacks origin is not always the same as the IP that appears in your logs. Network address
translation (NAT) at various points between a web browser and your web servers can mask the original IP address
of the attacker. Depending on your configuration of Use X-Header to Identify Original Clients IP, attack logs
Source column may contain the IP address of the client according to X-Forwarded-For: or a similar header
in the HTTP layer, not the SRC field in the IP header. In that case, the corresponding traffic logs Source column
will not match, since it reflects the IP layer. (Typically in that scenario, the connection has been relayed by a load
balancer or proxy, and therefore the IP would be that of the load balancer, which is not the real origin of the
attack.) Relatedly, if Shared IP is enabled, FortiWeb will attempt to differentiate innocent clients that share the
same public address with an attacker according to the IP layer SRC field due to NAT.
Not all attack detections will be logged. In some cases, only one entry will be logged when there are many
attack instances. See Log rate limits on page 752. Relatedly, server information disclosure detections will not be
logged if you have configured Action to be Erase, no Alert. See Blocking known attacks & data leaks on page
538.
When you view log messages using the web UI, the log message is displayed in columns, with graphics and other
formatting. In some cases, it is useful to view the log message exactly as it appears in the log file, as a single line
of text consisting of field-value pairs. Use one of the following methods to view a log message in its raw form:
l Right-click a column heading, select Detailed Information, and then click Apply. The log message is displayed
with no formatting in the Detailed Information column.
l Download a complete log file or a file that contains all log messages for a specific time period. See Downloading log
messages on page 776.
For example, while using auto-learning, you can configure protection profiles with an action of Alert (log but not
deny), allowing the connection to complete in order to gather full auto-learning data.
You can use the Action column to determine whether or not an attack attempt was permitted to reach a web
server. (This column is displayed by default. Right-click a column heading to select the columns to display.)
Additionally, if the FortiWeb appliance is operating in offline protection mode or transparent inspection mode,
due to asynchronous inspection where the attack may have reached the server before it was detected by
FortiWeb, you should also examine the server itself.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Log&Report category. For details, see Permissions on page 69.
Columns and appearance varies slightly by the log type. For details on structure or interpretations of and
troubleshooting suggestions for individual log messages, see the FortiWeb Log Reference.
Initially, the page displays the most recent log messages for that log type.
Button/setting Description
(Refresh button) Click to update the page with any logs that have been recorded since you
previously loaded the page.
Add Filter Click to create a filter based on log message fields. Only messages that are
in the most recent 100,000 messages and match the criteria in the filter are
displayed. When you search by date and time, all messages with the
selected date are displayed.
(right-click column heading) Right-click a column heading to access settings that add or hide columns
that correspond to log fields or remove any filters you have applied.
(Log Management button) Click to download, delete, or view the contents of a log file.
Button/setting Description
(Generate Log Detail PDF) Click to generate a detailed report of the selected attack log message in
PDF format.
2. If you want to view log messages in a rotated log file, click Log Management.
A page appears, listing each of the log files for that type that are stored on the local hard drive.
3. Mark the check box next to the file whose log messages you want to view.
4. Click View.
The page displays the log messages in the file you selected.
Packet payload tables display the decoded packet payload associated with the log message that it caused. This
supplements the log message by providing the actual data that triggered the regular expression, which may help
you to fine-tune your regular expressions to prevent false positives, or aid in forensic analysis.
2. In the row corresponding to the log message whose packet payload you want to view, click the log message.
There may not be a Packet Log icon for every log message, such as for normal HTTP responses and attack
types where you have not enabled packet payload retention.
In a frame to the right the log messages, the log message appears in table format, as well as the decoded
HTTP headers and packet payload. Parameters and file uploads are in either the URL or (for HTTP POST
requests) Data fields. Cookies can be either in the Cookie or Data fields.
See also
l Enabling log types, packet payload retention, & resource shortage alerts
l Coalescing similar attack log messages
l Downloading log messages
l Logging
l Download one or more whole log files. (If the log has not yet been rotated, there may be only one file.)
l Download only the log messages that occurred within a specific time period, regardless of which file contains
them.
System Time Displays the date and time according to the FortiWeb appliances clock at
the time that this page was loaded, or when you last clicked the Refresh
button.
Start Time Choose the starting point for the log download by selecting the year, month
and day as well as the hour, minute and second that defines the first of the
log messages to download.
End Time Choose the end point for the log download by selecting the year, month
and day as well as the hour, minute and second that defines the last of the
log messages to download.
3. Click Download.
If there are no log messages of that log type in that time period, a message appears:
no logs selected
Click Return and revise the time period or log type selection.
4. If a file download dialog appears, choose the directory where you want to save the file.
Your browser downloads the log file in a .tgz compressed archive. Time required varies by the size of the log
and the speed of the network connection.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Log&Report category. For details, see Permissions on page 69.
3. Mark the check box next to the file that you want to download.
4. Click Download.
A dialog appears.
5. Select either Normal format (raw, plain text logs) or CSV format (comma-separated value).
Raw, unencrypted logs can be viewed with a plain text editor. CSV-formatted, unencrypted logs can be
viewed with a spreadsheet application, such as Microsoft Excel or OpenOffice Calc.
6. If you would like to password-encrypt the log files using 128-bit AES before downloading them, enable
Encryption and type a password in Password.
Encrypted logs can be decrypted and viewed by archive viewers that support this encryption, such as 7zip 9.20
or WinRAR 5.0.
7. Click OK.
8. If a file download dialog appears, choose the directory where you want to save the file.
Your browser downloads the log file as a .log or .csv file, depending on which format you selected. Time
required varies by the size of the log and the speed of the network connection.
3. Either:
To delete all log files, mark the check box in the column heading. All rows check boxes will become marked.
To delete some log files, mark the check box next to each file that you want to delete.
To make attack log messages easier to review, when the total number of attack types exceeds 32 in a single day,
FortiWeb aggregates two types of messages signature attacks and HTTP protocol constraints violations in
the Aggregated Attacks page.
For more information on the signatures and constraints that generate the aggregated messages, see Blocking
known attacks & data leaks on page 538 and HTTP/HTTPS protocol constraints on page 618.
Some attacks only generate one log message per interval while an attack is underway.
They are effectively already coalesced. See Log rate limits on page 752 and Viewing
log messages on page 768.
2. Each row of aggregated log messages is initially grouped into similar attack types, not primarily by day or
time.
If you want to aggregate attacks by time instead, click Aggregate log by Date.
Each page in the display contains up to 7 dates worth of aggregated logs. To view dates before that time,
click the arrow to go to the next page.
To expand a row in order to view individual items comprising it, click the blue arrow in the #column.
3. To view a list of all log messages comprising that item, click the items row. Details appear in a pane to the
right.
Alert email
To notify you of serious attack and/or system failure events, you can configure the FortiWeb appliance to
generate an alert email.
Alerts appear on the dashboard. FortiWeb will also generate alert e-mail if you configure email settings and
include them in a trigger that is used by system resource thresholds and/or traffic policies.
Alert email are based upon events that are also in log messages. If you have received an alert email and want to
know more about the events, go to the corresponding log messages. For information on viewing locally stored log
messages, see Viewing log messages on page 768.
1. Configure email settings so that FortiWeb will be able to connect to an SMTP server that will deliver alerts.
See Configuring email settings on page 780.
2. If you want to receive email about attacks or policy violations, add the email settings to the trigger that is used
by those policies. See Configuring triggers on page 767.
3. If you want to receive email about system resource statuses, configure alert thresholds. See Logging on page
749.
4. If you want to receive copies of event log messages via email, See Configuring alert email for event logs on
page 783.
For example, you might configure a signature set to monitor for SQL-injection violations and take specific actions
if those types of violations occur. The specific actions can include sending an alert email, in which case the email
is sent to the individuals identified in the email settings attached to the trigger used for the SQL injection
violation. The trigger could also include recording the violation in Syslog or FortiAnalyzer. For more information
on Syslog or FortiAnalyzer settings, see Configuring Syslog settings on page 762 and Configuring FortiAnalyzer
policies on page 764.
The alert email settings also enables you to define the interval that emails are sent if the same alert condition
persists following the initial occurrence.
For example, you might configure the FortiWeb appliance to send only one alert message for each 15-minute
interval after warning-level log messages begin to be recorded. In that case, if the alert condition continues to
occur for 35 minutes after the first warning-level log message, the FortiWeb appliance would send a total of three
alert email messages, no matter how many warning-level log messages were recorded during that period of time.
For more information on the severity levels of log messages, see Log severity levels on page 751.
1. Enable alert email for each log type that you want to generate alert email. For details, see Logging on page
749.
SMTP server Type the fully qualified domain name (FQDN, e.g.
mail.example.com) or IP address of the SMTP relay or server,
such as a FortiMail appliance, that the FortiWeb appliance uses to
send alerts and generated reports.
Caution: If you enter a domain name, you must also configure the
FortiWeb appliance with at least one DNS server. Failure to configure
a DNS server may cause the FortiWeb appliance to be unable to
resolve the domain name, and therefore unable to send the alert. For
information on configuring use of a DNS server, see Configuring DNS
settings on page 187.
SMTP Port Enter the port on the SMTP server that listens for alerts and generated
reports from FortiWeb.
Email From Type the sender email address, such as [email protected], that
the FortiWeb appliance will use when sending alert email messages.
SMTP Username Type the user name of the account on the SMTP relay (e.g.
fortiweb) that FortiWeb uses to send alerts.
SMTP Password Type the password of the account on the SMTP relay that FortiWeb
uses to send alerts.
Apply & Test Click to save the current settings and test the connection to the SMTP
server.
Log Level Select the priority threshold that log messages must meet or exceed in
order to cause an alert. For more information on log levels, see Log
severity levels on page 751.
Interval Type the number of minutes between each alert if an alert condition of the
specified severity level continues to occur after the initial alert.
Enable Email attachments Check to apply compression to the alert email policy. With the compression
compression function being enabled, event logs and alerts will be attached to the emails
in ZIP format, otherwise they will be attached in TXT format.
Company Name Custom your alert email by inserting a company name. Enter a company
name; the specified name will be displayed on the top of the email content.
Company Logo Custom your alert email by inserting a company logo. Select a company
logo; the specified logo will be displayed on the top of the email content.
Only JPG is acceptable, and the maximum acceptable file size of the logo
is 36KB.
5. Click OK.
6. Group the email settings in a trigger (see Configuring triggers on page 767).
7. Add the appliances sender address (in the example above, [email protected]) to your address
book. Depending on your anti-spam software/device, you may also need to adjust other settings to ensure
that email from this appliance is not accidentally dropped or tagged as spam.
8. To verify your settings and connectivity to the email server/relay, click Apply & Test.
See also
l Logging
l Configuring triggers
l Configuring alert email for event logs
Alert Enable to generate alert email when log messages are created.
Mail
Distribution of alert email is controlled by email policies and trigger actions associated with
various types of violations. If this option is enabled, but a trigger action is not selected for a
specific type of violation, every occurrence of that violation will result in an alert email to the
individuals associated with the policy selected in the Email Policy field.
Email Policy Select the email settings to use for alert emails. For more information see
Configuring email settings on page 780.
3. Click Apply.
See also
System> Config> SNMP enables you to configure the FortiWeb appliances simple network management
protocol (SNMP) agent to allow queries for system information and to send traps (alarms or event messages) to
the computer that you designate as its SNMP manager. In this way you can use an SNMP manager to monitor
the FortiWeb appliance.
Before you can use SNMP, you must activate the FortiWeb appliances SNMP agent and add it as a member of at
least one community. You must also enable SNMP access on the network interface through which the SNMP
manager connects. (See Configuring the network interfaces on page 162.)
On the SNMP manager, you must also verify that the SNMP manager is a member of the community to which the
FortiWeb appliance belongs, and compile the necessary Fortinet-proprietary management information blocks
(MIBs) and Fortinet-supported standard MIBs. For information on MIBs, see MIB support on page 791.
1. Add the MIBs to your SNMP manager so that you will be able to receive traps and perform queries. For
instructions, see the documentation for your SNMP manager.
SNMP Agent Enable to activate the SNMP agent, so that the FortiWeb appliance
can send traps and receive queries for the communities in which you
enabled queries and traps.
Location Type the physical location of the FortiWeb appliance, such as floor2.
The location can be up to 35 characters long, and can contain only letters
(a-z, A-Z), numbers, hyphens (-) and underscores (_).
Contact Type the contact information for the administrator or other person
responsible for this FortiWeb appliance, such as a phone number (555-
5555) or name (jdoe). The contact information can be up to 35 characters
long, and can contain only letters (a-z, A-Z), numbers, hyphens (-) and
underscores (_).
4. Click Apply.
5. Create at least one SNMP community to define which hosts are allowed to query, and which hosts will receive
traps. See Configuring an SNMP community.
See also
On FortiWeb, SNMP communities are also where you enable the traps that will be sent to that group of hosts.
You can add up to three SNMP communities. Each community can have a different configuration for queries and
traps, and the set of events that trigger a trap. You can also add the IP addresses of up to eight SNMP managers
to each community to designate the destination of traps and which IP addresses are permitted to query the
FortiWeb appliance.
2. If you have not already configured the agent, do so before continuing. See To configure the SNMP agent on
page 785.
Community Name Type the name of the SNMP community to which the FortiWeb
appliance and at least one SNMP manager belongs, such as public.
Ensure that the SNMP manager and FortiWeb use the same protocol and
password.
Ensure that the SNMP manager and FortiWeb use the same protocol and
password.
Hosts
IP Address Type the IP address of the SNMP manager that, if traps or queries are
enabled in this community:
Queries For each protocol the community uses, enter the port number (161 by
default) on which the FortiWeb appliance listens for SNMP queries
from the SNMP managers in this community, then enable queries for
that protocol.
For supported queries, see the FortiWeb MIB file and MIB support on
page 791.
Traps For each protocol the community uses, enter the port number (162 by
default) for the source port (Local) and destination port (Remote) for trap
packets sent to SNMP managers in this community, then enable traps for
that protocol.
4. Enable traps for the SNMP events that you want FortiWeb to notify your SNMP managers.
While most trap events are described by their names, the following events occur when a threshold has been
exceeded:
5. Click OK.
6. To verify your SNMP configuration and network connectivity between your SNMP manager and your FortiWeb
appliance, be sure to test both traps and queries (assuming you have enabled both). Traps and queries
typically occur on different port numbers, and therefore verifying one does not necessarily verify that the other
is also functional. To test queries, from your SNMP manager, query the FortiWeb appliance. To test traps,
cause one of the events that should trigger a trap.
MIB support
The FortiWeb SNMP agent supports a few management information blocks (MIBs).
Supported MIBs
Fortinet Core MIB This Fortinet-proprietary MIB enables your SNMP manager to query for
system information and to receive traps that are common to multiple
Fortinet devices.
RFC-1213 (MIB II) The FortiWeb SNMP agent supports MIB II groups, except:
l There is no support for the EGP group from MIB II (RFC 1213, section
3.11 and 6.10).
l Protocol statistics returned for MIB II groups (IP, ICMP, TCP, UDP, and
so on.) do not accurately capture all FortiWeb traffic activity. More
accurate information can be obtained from the information reported by
the FortiWeb MIB.
RFC-2665 (Ethernet-like The FortiWeb SNMP agent supports Ethernet-like MIB information, except
MIB) the dot3Tests and dot3Errors groups.
To obtain these MIB files, go to System > Config > SNMP and click the following links:
To view a trap or querys name, object identifier (OID), and description, open its MIB file in a plain text editor.
All traps sent include the message, the FortiWeb appliances serial number, and host name.
For instructions on how to configure traps and queries, see SNMP traps & queries on page 785.
See also
Reports
Before it can generate a report, in addition to log files and scan results, FortiWeb appliances require a report
profile in order to generate a report. A report profile is a group of settings that contains the report name, file
format, subject matter, and other aspects that the FortiWeb appliance considers when generating the report.
FortiWeb appliances can generate reports automatically, according to the schedule that you configure in the
report profile, or manually, when you click the Run now icon in the report profile list.
1. Before you generate a report, collect log data and/or vulnerability scan data that will be the basis of the report.
For information on enabling logging to the local hard disk, see Configuring logging on page 752 and
Vulnerability scans on page 703.
4. In Report Name, type the name of the report as it will be referenced in the configuration. The name cannot
contain spaces.
5. If you are creating a new report profile, select from Type either to run the report immediately after
configuration (On Demand) or run the report at configured intervals (On Schedule). This cannot be changed
later.
For on-demand reports, the FortiWeb appliance does not save the report profile after
the generating the report. If you want to save the report profile, but do not want to
generate the report at regular intervals, select On Schedule, but then in the
Schedule section, select Not Scheduled.
6. In Report Title, type a display name that will appear in the title area of the report. The title may include
spaces.
Report Scope Select the time span of log messages from which to generate the report.
You can also create a data filter to include in the report only those logs that
match a set of criteria. For more information, see Restricting the reports
scope on page 796.
Report Types Select one or more subject matters to include in the report. For more
information, see Choosing the type & format of a report profile on page
799.
Report Format Select the number of top items to include in ranked report subtypes, and
other advanced features. For more information, see Choosing the type &
format of a report profile on page 799.
Schedule Select when the FortiWeb appliance will run the report, such as
weekly or monthly. For more information, see Scheduling reports on
page 801.
Output Select the file formats and destination email addresses, if any, of reports
generated from this report profile. For more information, see Selecting the
reports file type & delivery options on page 802.
9. Click OK.
On-demand reports are generated immediately. Scheduled reports are generated at intervals set in the
schedule. For information on viewing generated reports, see Viewing & downloading generated reports on
page 804.
See also
Title Page Logo Select No Logo to omit the title page logo.
Select Custom to include a logo, then click Select to locate the logo
file, and click Upload to save it to the FortiWeb appliances hard disk
for use in the report title page. See To upload a logo file on page 795.
Select Custom to include a logo, then click Select to locate the logo
file, and click Upload to save it to the FortiWeb appliances hard disk
for use in the report header. The header logo will appear on every
page in PDF- and Microsoft Word (RTF)-formatted reports, and at the
top of the page in HTML-formatted reports.
1. Expand the Properties section of the Log Report Config dialog. (See To configure a report profile on page
792.)
2. Select the Custom option of either Title Page Logo or Header Logo.
3. Click the Select link.
A dialog appears.
When adding a logo to the report, select a logo file format that is compatible with your selected file format
outputs. If you select a logo that is not supported for a file format, the logo will not appear in that output. For
example, if you provide a logo graphic in WMF format, it will not appear in PDF or HTML output.
1. Expand the Properties section of the Log Report Config dialog. (See To configure a report profile on page
792.)
2. Click the Select link beside the logo name you want to remove in either Title Page Logo or Header Logo.
A dialog appears.
Time Period Select the time span of the report, such as This Month or Last N
Days.
Alternatively, select and configure From Date and To Date.
Past N Days This option appears only when you have selected Last N Hours,
Last N Days, or Last N Weeks from Time Period, and therefore
Past N Weeks must define N.
From Date Select and configure the beginning of the time span. For example, you
may want the report to include log messages starting from May5,2006
Hour at 6PM. You must also configure To Date.
To Date Select to configure the end of the time span. For example, you may want
the report to include log messages up to May6, at 12AM. You must also
Hour select and configure From Date.
None Select this option to include all log messages within the time span.
Select this option to include only the log messages whose values
match your filter criteria, such as Priority . Also select whether log
messages must meet every other configured criteria (all) or if
meeting any one of them is sufficient (any) to be included.
Include logs that match the
following criteria To exclude the log messages which match a criterion, mark its not
check box, located on the right-hand side of the criterion.
Criteria are the fields of log messages. For more information on log
messages, see the FortiWeb Log Reference.
Priority Mark the check box to filter by log severity threshold (in raw logs, the pri
field), then select the name of the severity, such as Emergency, and
whether to include logs that are greater than or equal to (>=), equal to
(=), or less than or equal to (<=) that severity.
Type the source IP address (in raw logs, the src field) that log
messages must match.
Source(s) Note: Source(s) may be the IP address according to an HTTP
header such as X-Forwarded-For: instead of the SRC at the IP
layer. See Defining your proxies, clients, & X-headers on page 386.
Destination(s) Type the destination IP address (in raw logs, the dst field) that log
messages must match.
Type the HTTP method (in raw logs, the http_method field) that log
Http Method(s)
messages must match, such as get or post.
User(s) Type the administrator account name (in raw logs, the user field) that
log messages must match, such as admin.
Type the action (in raw logs, the action field) that log messages must
Action(s)
match, such as login or Alert.
Subtype(s) Type the subtype (in raw logs, the subtype field) that log messages
must match, such as waf_information.
Type the policy name (in raw logs, the policy field) that log messages
Policy(s)
must match.
Service(s) Type the service name (in raw logs, the src field) that log messages
must match, such as http or https.
Type the message (in raw logs, the msg field) that log messages must
Message(s)
match.
Signature Subclass Type the signature subclass type (in raw logs, the signature_
Type(s) subclass field) that log messages must match.
Type the signature ID value (in raw logs, the signature_id field)
Signature ID(s)
that log messages must match.
Source Country(s) Type the source country value (in raw logs, the srccountry field)
that log messages must match.
Mark the check boxes for the days of the week whose log messages you
Day of Week
want to include.
When configuring a report profile, you can configure various advanced options that affect how many log
messages are used to formulate ranked report subtypes, and how results will be displayed.
(To start at the beginning of the report configuration instructions, see To configure a report profile on page 792.)
Report Types Each query group contains multiple individual queries, each of
which correspond to a chart that will appear in the generated
report. You can select all queries within the group by marking
the check box of the query group, or you can expand the query
group and then individually select each query that you want to
include:
l PCI Reports
l Attack Activity
l Traffic Activity
l Event activity
For example:
l If you want the report to include charts about both normal traffic
and attacks, you might enable both of the query groups Attack
Activity and Event Activity.
l If you want the report to specifically include only a chart about top
system event types, you might expand the query group Event
Activity, then enable only the individual query Top Event Types.
Report Format
Include reports with no Enable to include reports for which there is no data. A blank report
matching data will appear in the summary. You might enable this option to verify
inclusion of report types selected in the report profile when filter
criteria or absent logs would normally cause the report type to be
omitted.
Advanced
Some ranked reports rank not just one aspect, but two, such as
Top Sources By Top Destination: this report ranks top
source IP addresses for each of the top destination IP
addresses. For these double ranked reports, you can also
configure the rank threshold of the second aspect by entering
the second threshold in values of the second variable for
each value of the first variable 1..30.
Note: Reports that do not include Top in their name display all
results. Changing the ranked reports values will not affect these
reports.
Include Summary
Enable to include a listing of the report profile settings.
Information
Scheduling reports
When configuring a report profile, you can select whether the FortiWeb appliance will generate the report on
demand or according to the schedule that you configure. (To start at the beginning of the report configuration
instructions, see To configure a report profile on page 792.)
Schedules
Not Scheduled If you select this option, the report will only be generated on
demand, when you manually click the Run now icon from the
report profile list. For more information, see Reports on page
791.
Daily Select to generate the report each day. Also configure Time.
These Dates Select to generate the report on specific date of each month,
then enter those date numbers. Separate multiple date
numbers with a comma. Also configure Time.
Select the time of the day when the report will be generated.
Time This option does not apply if you have selected Not
Scheduled.
File Output Enable file formats that you want to generate and store on the
FortiWeb appliances hard drive.
l PDF
l MS Word (RTF)
l plain text (Text), and
l MIME HTML (MHT, which can be included in email)
Enable file formats that you want to generate for an email that will be
Email Output
mailed to the recipients defined by the email settings.
Email Policy Select the predefined email settings that you want to associate with
the report output. This determines who receives the report email.
Email Attachment
Type a file name that will be used for the attached reports.
Name
Compress Report Enable to enclose the generated report formats in a compressed archive,
Files as a single attachment.
Select the formats for files that FortiWeb sends to the FTP or TFTP
FTP/TFTP Output
server specified by FTP/TFTP Policy.
FTP/TFTP Policy Select the policy that defines a connection to the appropriate server. See
Configuring FTP/TFTP policies on page 766.
In FortiWeb HA clusters, generated reports (PDFs, HTML, RTFs, plain text, or MHT)
are recorded on their originating appliance. If you cannot locate a report that should
have been generated, a failover may have occurred. Reports generated during that
period will be stored on the other appliance. To view those reports, switch to the other
appliance.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Log&Report category. For details, see Permissions on page 69.
Refresh Click to refresh the display with the current list of completed, generated
reports.
(icon)
Rename
Select the check box next to a report and click Rename to rename it.
(icon)
Report Files Displays the name of the generated report, the date and time at which
it was generated, and, if necessary to distinguish it from other reports
generated at that time, a sequence number.
To view the report in HTML format, click the name of the report. The
report appears in a pop-up window.
Displays the data and time when the FortiWeb appliance started to
Started
generate the report.
Finished Displays the date and time when the FortiWeb appliance completed the
generated report.
Displays the file size in bytes of each of the HTML files that comprise
an HTML-formatted report.
Size (bytes) This column is empty for the overall report, and contains sizes only for
its component files. To see the component files, click the blue
expansion arrow.
Other Formats Click the name of an alternative file format, if any were configured to be
generated by the report profile, to download the report in that file format.
(links)
See also
l Configuring logging
l Reports
l Data analytics
Data analytics
In addition to log-based reports, FortiWeb also includes data analytics to help you track web server usage from a
page hit, traffic volume, and attack point of view.
See also
l Sequence of scans
l Reports
1. Upload a geographic location data file (see Updating data analytics definitions on page 806).
2. Enable the Data Analytics option on any inline protection or offline protection profile used by your server
policies.
See also
1. Download the .dat file from the Fortinet Technical Support web site:
https://support.fortinet.com/
If you want to check the integrity of the .dat file, also download its checksum (.md5). For instructions on how
to use it, see the documentation for your checksum software.
2. Log in to the web UI of the FortiWeb appliance as the admin administrator, or an administrator account
whose access profile contains Read and Write permissions in the Maintenance category.
7. Click Upload.
Your browser uploads the file. A message appears to display the progress of the upload. Time required varies
by the size of the file and the speed of your network connection.
See also
l A country/region, state, and city Public IP addresses that are known to belong to routers in a specific physical
location.
l Undetermined City/State An IP address where the exact city and/or state could not be determined. This
appears when zooming in to view a country. An IP with an undetermined city/state can occur if complete, precise
location data is not available, or perhaps if the IP address belongs to multiple regions such as can occur in border
regions.
l Internal IPs 10.*, 172.16.*, or 192.168.* addresses that are reserved for private networks according to RFC
1918, and therefore might be located anywhere on the planet.
To make sure that the mappings are correct, you should periodically update
FortiWebs geography-to-IP mappings. See Updating data analytics
definitions on page 806.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Log&Report category. For details, see Permissions on page 69.
Data analytics organizes the data collected by server policies into two distinct cross-sections. Click the buttons on
the top right corner to toggle between:
l Geographic Location View Displays data per clients geographical location (e.g.Canada, China,
Portugal, Morocco, Brazil, Australia, etc.) in graphical format.
While this view is selected, a format toggle appears below the view toggle. The format toggle allows you to
choose what will accompany the data analytics charts: either List (for a table of statistics by country) or Map
(for a map of the Earth). To display the statistics for a country/region, hover your mouse cursor over it. The
statistics will appear in a tool tip.
If you click a specific country/region on the map of the Earth, the map will zoom in to show the states within
that area. Similar to the view of the entire Earth, to display statistics for a sub-region, hover your mouse cursor
over it. The statistics appear in a tool tip.
Select either:
l Hit Display the number of legitimate page hits, and percentage of total requests, originating from
each country.
In the unlabeled column to the right of the Percentage column, icons indicate the range of percentage by
color-coded dots:
Red Greater than 12%
Orange 9% - 12%
Yellow 6% - 9%
Blue 3% - 6%
Green 0% - 3%
l Data Display the traffic volume in bytes, and percentage of total requests, originating from country.
l Attack Display the attack count, and percentage of total requests, originating from each country.
Geographic location is based upon the apparent origin according to the source IP
address of the request. Accuracy may vary due to network address translation (NAT)
and/or clients use of proxies such as Tor and IPSec, SSH, or other VPN tunnels which
alter the source IP address in packets and therefore can cause clients traffic to appear
to originate from a location other than their actual location.
l Web Site View Displays data about the popular URLs and commonly attempted attacks on your web sites
in graphical format. The page includes a pie chart (if there is data available) and two panels with bar graphs.
l Hit Display the top 10 countries of origin for legitimate page hits.
l Data Display the top 10 countries of origin for traffic volume.
l Attack Display the top 10 countries of origin for attacks.
In the Top 10 Panel, from the Category drop-down list, select either:
l Host Display the top 10 domain names by hits, attacks, or traffic volume (depending on your selection in Type).
l URL Display the top 10 URLs by hits, attacks, or traffic volume (depending on your selection in Type).
In the Time Trend Panel, from the Time Interval drop-down list, select a time interval (e.g. 1Week), then click
the Pre Period (previous) and Next Period buttons to advance by that interval through the time span that you
have selected in either Time Range or your custom data filter.
For example, if Type is Attack and Category is Host, the panel displays the 10 domains that received the most
attack attempts. Lets say that a trend of attacking www.example.com is consistent over time. (You could confirm
this suspicion in the TimeTrendPanel.) This could represent either an advanced persistent threat (APT) an
attacker that is an adversary of that specific organization, and likely to continue and attempt more evolved threats
until she or he discovers a viable exploit or it could simply be an attack attempt because security-wise, that
specific web server is an easy target. Attacks on weak hosts might be discouraged by applying patches, cloaking
the web server, configuring sever protection rules on FortiWeb to mitigate the hosts weaknesses, etc. An APT
however, indicates a collectively greater risk than a lone attack attempt against a weak host, and will likely
continue regardless of increasing attack difficulty. If you determine that the attacker(s) is an APT, you might
decide to devote more resources to protecting that web server, including a full web application source code and
security practice audit, as well as configuring anti-defacement.
l Click Refresh to re-populate the graphs with the most recent data. (The web UI displays data current at the time of
the most recent refresh or page load. It does not continuously update.)
l Click Generate PDF to download a PDF copy of the current statistics.
l Select either:
l Custom-defined Define the domain name (Host:), URL, policy name, and/or time span to include
matching statistics. For details, see Filtering the data analytics report.
l Pre-defined Choose a time span from the Time Range drop-down list to view its statistics.
See also
By default, in Filter Type, the Pre-defined option is selected, and so the data analytics reports include statistics
based solely upon one of a few pre-defined time periods, which you can select from Time Range.
However, you can define your own time span, as well as filter statistics based upon criteria other than time.
2. Select the view to use: Web Site View or Geographic Location View.
3. From Filter Type, select the Custom-defined option.
4. Click Filter.
A dialog appears.
5. Configure the following criteria, if any, that a statistic must match in order to be included in the report:
Policy Type the name of a server policy that is gathering data for data analytics. It
must use a profile where you have enabled Data Analytics. Otherwise, it
will not include any statistics.
Host Type a domain name or IP address in the Host: field of the HTTP header
of requests.
URL Type a URL. It usually should be a web page that initiates a session.
(Session-initiating URL hit counts may more closely correlate to visit
counts. For example, web application preference pages are seldom visited
in a session.)
Case Sensitivity Enable to differentiate uniform resource locators (URLs) and Host:
HTTP header fields according to upper case and lower case letters.
Use Time Filter Enable to use only statistics within a specific time period, defined by From
and To.
From Click the calendar icon or its accompanying text field to define the date at
the beginning of the time period, then select the Hour, Minute, and
Second to define the time of day.
To Click the calendar icon or its accompanying text field to define the date at
the end of the time period, then select the Hour, Minute, and Second to
define the time of day.
6. Click OK.
The page refreshes and displays data restricted by the new filter. The filter applies until you either:
Clear the filter by clicking the Filter button to raise the dialog again, click Reset, then click OK.
See also
Bot analysis
Log&Report> Monitor> BotAnalysis displays statistics on access by automated clients suchas search
engine indexers, content scrapers, and other tools. Statistics are gathered by Real Browser Enforcement in anti-
DoS rules, Bad Robot and Allow Known Search Engines. Based on this data, if an automated tool is abusing
access, you can configure rate limiting such as with Combination access control & rate limiting on page 460.
See also
Monitor> BlockedIPs displays all client IP addresses whose requests the FortiWeb appliance is temporarily
blocking because the client violated a rule whose Action is Period Block. Since at any given time a period block
might be applied by one server policy but not by another, client IPs are sorted by and listed under the names of
server policies.
If a client was inadvertently blocked due to a false positive, you can immediately release it from being blocked by
clicking the Delete icon next to its entry in the table. (If it is being blocked by multiple policies, you should delete
the clients entry under each policy name. Otherwise, the client will still be blocked by some policies.)
Alternatively, the IP address will automatically be removed from the list when its block period expires.
If a client frequently is correctly added to the period block list, and is a suspected
attacker, you may be able to improve both security and performance by
permanently blacklisting that source IP address. See Blacklisting & whitelisting
clients using a source IP or source IP range on page 471 and Sequence of scans
on page 35.
If the client is not an attacker, in addition to removing his or her IP from this list,
you may need to adjust the configuration that caused the period block, such as
adjusting DoS protection so that it does not block normal request rates.
Otherwise, the client may quickly reappear in the period block list.
To access this part of the web UI, your administrators account access profile must have Read and Write
permission to items in the Log&Report category. For details, see Permissions on page 69.
See also
To begin tracking a client device that triggered a security violation, FortiWeb generates a unique Client Device ID
according to a set of its characteristics, including the time zone, source IP, operating system, browser, language,
CPU, color depth, and screen size. When a Client Device ID is assigned to a device, FortiWeb also begins
tracking that device's last access date and historical threat weight. It is possible to monitor each device that
FortiWeb tracks in the webUI.
Currently tracked client devices can be sorted and filtered according to the following characteristics:
Characteristic Description
(Refresh Button) Click to update the page with any logs that have been recorded since you
previously loaded the page
Characteristic Description
l Browser Type
l Client Device ID
l Color Depth
l CPU
l Historical Threat Weight
l Language
l Last Access Date
l OSType
l Screen Size
l Source IP
l Time Zone
(drag and drop column Change the order in which columns are displayed.
heading)
(right-click column Access settings that add or hide columns, reset to the default columns, or
heading) remove all filters.
Client Device ID The unique ID assigned to the device based on its physical characteristics when
a device profile is created upon triggering a security violation.
Last AccessDate The date of the most recent event triggered by the device. This is updated
when:
Note:If the threat weight of a security violation is set to OFF, the last access
date will not be updated when the device triggers that security violation.
Time Zone The time zone the device is set to at the time of the last access date.
Source IP The device's IP address at the time of the last access date.
OSType The device's operating system at the time of the last access date.
Browser Type The browser the device used at the time of the last access date.
Language The device's language at the time of the last access date.
CPU The device's central processing unit at the time of the last access date.
Characteristic Description
Color Depth The number of bits the devices uses to indicate the color of individual pixels at
the time of the last access date.
Screen Size The device's screen size at the time of the last access date.
Historical Threat Weight The sum of the threat weights of all the security violations launched by the
device at the time of the last access date. This indicates the total risk of the
device defined in the selected device reputation security policy.
Canvas The device's canvas fingerprinting digital token at the time of the last access
date.
WebGL The device's WebGL fingerprinting digital token at the time of the last access
date.
FortiGuard updates
One of the most important things you can do is to ensure that your FortiWeb is receiving regular updates from the
FortiGuard FortiWeb Web Security service and FortiGuard Antivirus service.
Without these updates, your FortiWeb cannot detect the newest threats.
Event logs record FortiGuard update attempts. In addition to scheduling polls for automatic updates, you can also
manually update the service packages or initiate an connectivity test to the FDN at any time. For details, see
Connecting to FortiGuard services on page 190.
To keep informed about the latest security threats and news, visit:
http://www.fortiguard.com
Vulnerability scans
After your initial deployment, it is a good idea to periodically scan your web servers for newly discovered
vulnerabilities to current threats. If you discover new threats, adjust your configuration to combat them.
Without periodic scans, you may not be aware of the newest threats, and you may not have
configured your FortiWeb defend against them.
For details, see Vulnerability scans on page 703.
If you have many web servers, you may want a appliance to:
This topic is a collection of fine-tuning and best practice tips and guidelines to help you configure your FortiWeb
appliances for the most secure and reliable operation.
While many features are optional or flexible such that they can be used in many ways, some practices are
generally a good idea because they reduce complication, risk, or potential issues.
Hardening security
FortiWeb is designed to enhance the security of your web sites and web applications, and when fully configured,
it can automatically plug holes commonly used by attackers to compromise a system.
Topology
l To protect your web servers, install the FortiWeb appliance or appliances between the web servers and a general
purpose firewall such as a FortiGate. FortiWeb complements, and does not replace, general purpose
firewalls. FortiWeb appliances are designed specifically to address HTTP/HTTPS threats; general purpose
firewalls have more features to protect at lower layers of the network.
l Make sure web traffic cannot bypass the FortiWeb appliance in a complex network environment.
l Disable all network interfaces that should not receive any traffic.
For example, if administrative access is typically through port1, the Internet is connected to port2, and web
servers are connected to port3, you would disable (bring down) port4. This would prevent an attacker with
physical access from connecting a cable to port4 and thereby gaining access if the configuration inadvertently
allows it.
l Define the IP addresses of other trusted load balancers or web proxies to prevent spoofing of HTTP headers such
as X-Forwarded-For: and X-Real-IP: (see Defining your proxies, clients, & X-headers on page 386).
Administrator access
l As soon as possible during initial FortiWeb setup, give the default administrator, admin, a password. This super-
administrator account has the highest level of permissions possible, and access to it should be limited to as few
people as possible.
l Change all administrator passwords regularly. Set a policy such as every 60 days and follow it. (Click the Edit
Password icon to reveal the password dialog.)
l Instead of allowing administrative access to the FortiWeb appliance from any source, restrict it to trusted internal
hosts. (IPv6 entries of ::/0 will be ignored, but you should configure all IPv4 entries.) See Trusted hosts on page 73.
On those computers that you have designated for management, apply strict patch and security policies. Always
password-encrypt any FortiWeb configuration backup that you download to those computers to mitigate the
information that attackers can gain from any potential compromise. See Encryption Password on page 273.
l Do not use the default administrator access profile for all new administrators. Create one or more access profiles
with limited permissions tailored to the responsibilities of the new administrator accounts. See Configuring access
profiles on page 282.
l By default, an administrator login that is idle for more than five minutes times out. You can change this to a longer
period in Idle Timeout, but Fortinet does not recommend it. Left unattended, a web UI or CLI session could allow
anyone with physical access to your computer to change FortiWeb settings. Small idle timeouts mitigate this risk.
l Administrator passwords should be at least 8 characters long and include both numbers and letters. For additional
security, use Enable Strong Passwords to force the use of stronger passwords. See Global web UI & CLI settings on
page 73.
l Restrict administrative access to a single network interface (usually port1), and allow only the management
access protocols needed in System >Network >Interface.
Use only the most secure protocols. Disable PING, except during troubleshooting. Disable HTTP, SNMP, and
TELNET unless the network interface only connects to a trusted, private administrative network. See
Configuring the network interfaces on page 162.
Restricting accepted administrative protocols in the Edit Interface dialog in System> Network> Interface
l Disable all network interfaces that should not receive any traffic.
For example, if administrative access is typically through port1, the Internet is connected to port2, and web
servers are connected to port3, you would disable (bring down) port4. This would prevent an attacker with
physical access from connecting a cable to port4 and thereby gaining access if the configuration inadvertently
allows it.
l Similar to applying trusted host filters to your FortiWeb administrative accounts, apply URL access control rules to
limit potentially malicious access to the administrative accounts of each of your web applications from untrusted
networks. See Restricting access to specific URLs on page 453.
User access
l Authenticate users only over encrypted channels such as HTTPS, and require mutual authentication the web
server or FortiWeb should show its certificate, but the client should also authenticate by showing its certificate.
Password-based authentication is less secure than PKI authentication. For certificate-based client authentication,
see How to apply PKI client authentication (personal certificates) on page 425. For certificate-based
Buffer hardening
While analyzing traffic, FortiWebs HTTP parser must extract and buffer each part in the request or response. The
buffer allows FortiWeb to scan and/or rewrite it before deciding to block or forward the finished traffic. Buffers are
not infinite due to the physical limitations inherent in all RAM, they are allocated a maximum size. If the part of
the request or response is too large to fit the buffer, FortiWeb must either pass or block the traffic without further
analysis of that part.
Practically speaking, while oversized requests are not common, when they do exist, they may be harmless. Movie
uploads are a common example. HTTP GET requests involving many database queries with encrypted values are
another example. In these cases, hardening the buffer could result in many false positives during normal use.
Such false positives are to be avoided because the flood of information could distract you from real attacks.
In terms of attacks, large DoS attacks from a single attacker are impractical: if the attacking host must consume
its own bandwidth or CPU faster than the web server can process it, the attack wont work. Therefore DoS request
traffic is unlikely to be oversized.
Determined attackers, though, often craft oversized requests to mask an exploit. Tactics to pad an
attack with harmless data in order to push the payload beyond the scan buffer are popular with more
knowledgeable and motivated APT attackers, and with black hat researchers crafting exploit packages for
Metasploit and other tools that ultimately land in the hands of script kiddies. Similar to buffer overflow attacks,
these padded attacks attempt to bypass and exploit inherent limits. If a request cannot fit into the buffer, it might
be a padded attack.
If your web applications do not require oversized requests to work, you can toughen security by
blocking oversized requests. Configure HTTP constraints with Malformed Request etc. (see HTTP/HTTPS
protocol constraints on page 618). Also configure exceptions for URLs that require you to ignore the buffer
limitations, such as music or movie uploads.
To determine your appropriate HTTP constraints, first observe your normal traffic. Compare it with FortiWebs
buffer counts and maximum sizes.
URL size, excluding appended parameters and the Usually 2KB Malformed Request
parameter delimiter (?) (e.g. /path/to/app)
HTTP/HTTPS protocol
HTTP header lines individual size Buffer
constraints
Adobe Flash (AMF) parameters total size Buffer Total URL Parameters Length
However, to avoid POODLEother attacks that exploit SSL 3.0 vulnerabilities, disable SSL 3.0 in all server
policies.
Improving performance
When you configure your FortiWeb appliance and its features, there are many settings and practices that can
yield better performance.
System performance
l Delete or disable unused policies. FortiWeb allocates memory with each server policy, regardless of whether it is
actually in active use. Configuring extra policies unnecessarily consumes memory and decreases performance.
l To reduce latency associated with DNS queries, use a DNS server on your local network as your primary DNS. See
Configuring DNS settings on page 187.
l If your networks devices support them, you can create one or more VLAN interfaces. VLANs reduce the size of a
broadcast domain and the amount of broadcast traffic received by network hosts, which improves network
performance. See Adding VLAN subinterfaces on page 168.
l If you have enabled the server health check feature as part of a server pool and one of the pool members is down
for an extended period, you can improve the performance of your FortiWeb appliance by disabling the physical
server, rather than allowing the server health check to continue checking for the server's responsiveness. See
Configuring server up/down checks on page 352.
l Use the least intensive, earliest possible scan to deflect attacks. See Sequence of scans on page 35.
l Use Period Block if possible as the Action setting for DoS protection rules. This setting allows FortiWeb to conserve
scanning resources that are under heavy demand during a DoS or DDoS attack.
Antivirus performance
l Disable scanning of BZIP2 if it is not necessary.
l Reduce the scanning buffer to the minimum necessary.
l Reduce the number of redundant levels of compression that FortiWeb will scan. Normally, people will not put a ZIP
file within a ZIP file, because it is inconvenient to open and does not offer significant compression ratio
improvements. Nested compression is usually used by viruses to bypass antivirus scanners.
l are usually more computationally intensive than a literal string comparison such as:
/index.html
The usual case will tell you the average CPU and RAM load. The worst case will
tell you if your regular expression could sometimes cause potential hang-like
conditions, temporarily blocking traffic throughput until it finishes evaluating.
If the worst possible match string is short and not complex to match, the regular
expression may not be worth your time to optimize.
For example, when using auto-learning to discover if street addresses are a valid input, scanning for postal codes
or state abbreviations instead may dramatically improve performance. Apattern to fully match all possible street
addresses is significantly more complex, involving many more computations, and the most difficult addresses to
verify might be complex enough to impact traffic throughput.
l Avoid backtracking (i.e. revisiting the match string after failing to match part of the pattern). Backtracking occurs
when regular expression features use recursion (definite or indefinite). Thiscan increase execution time
exponentially. Examples include the following:
l Avoid nested parentheses with indefinite repeats such as:
^((a+)b+)*
which can take a very long time to evaluate, especially if a long string does not match, but this cannot be
determined until the very last character is evaluated.
In the above example, both the + and * indicate matches that repeat potentially infinitely, forcing the
regular expression engine to continue until it finds the longest possible match (or runs out of RAM; see
Killing system-intensive processes on page 892). Using both in a nested set of parentheses compounds
the problem.
$0$1\?user=$2
To use back-references, FortiWeb must keep the text that matched the capture groups in memory, which
increases RAM consumption.
l Order matters if using alternate match patterns (i.e. multiple patterns are concatenated with a pipe (|)).
Put rare patterns last. If you put less likely patterns first, most times FortiWeb will be evaluating the string
multiple times not once before it finds a match. This significantly decreases performance.
Match character by character, not word by word. If words begin with the same characters, it is not efficient
to evaluate the beginning of the match string multiple times once for each possible word.
For example, to match the words the, then, this, and these, this expression is easy to read, but
inefficient because it evaluates the first two characters (th) up to 4 times:
\b(this|the|then|these)\b
While harder to read, this expression improves performance, evaluating th once, and will match the most
common word in English (the) before considering less probable words:
\bth(e(n|se)|is)\b
Worst-case evaluations do not increase computation time linearly, but exponentially. When such an
expression is compiled, it also consumes much more RAM. Use the smallest possible repetition, or an
alternative expression.
l Avoid Unicode character properties such as /p{Nd} if you can use a character class instead. Due to the huge
numbers and complexity of potential matches in Unicode, these can be dramatically slower.
l Avoid look-ahead match conditions such as:
?!abcdefge
?=abcdefge
To do this, FortiWeb must make additional computations in the example above, 8 in the best case scenario,
an immediate match. FortiWeb also must keep the originally consumed match string in memory while it does
this, which increases RAM consumption.
Logging performance
l If you have a FortiAnalyzer, store FortiWebs logs on the FortiAnalyzer to avoid resource usage associated with
writing logs to FortiWebs own hard disks. See Configuring log destinations on page 756.
l If you do not need a traffic log, disable it to reduce the use of system resources. See Logging on page 749.
l Reduce repetitive log messages. Use the alert email settings, as shown in the illustration Log&Report>
LogPolicy> EmailPolicy, to define the interval that emails are sent if the same condition persists following the
initial occurrence. See Configuring email settings on page 780.
l Avoid recording log messages using low severity thresholds, such as information or notification, to the local hard
disk for an extended period of time. Excessive logging frequency saps system resources and can cause undue wear
on the hard disk and may cause premature failure. See Configuring log destinations on page 756.
Report performance
Generating reports can be resource intensive. To avoid performance impacts, consider scheduling report
generation during times with low traffic volume, such as at night and on weekends. See the illustration
Log&Report> Report> ReportConfig and Scheduling reports on page 801.
Keep in mind that most reports are based upon log messages. All caveats regarding log performance also apply.
Auto-learning performance
l Each URL in an auto-learning report includes the right-click menu option Auto-learning. If a URL is dynamic or hard
to predict effectively and may generate inaccurate data, you can improve performance by pausing or stopping auto-
learning for that URL. See Pausing auto-learning for a URL on page 238.
l Once you have collected enough auto-learning data for generating protection profiles, consider turning off the auto-
learning function to save resources. To do so, deselect the auto-learning profile in applicable server policies. See
How operation mode affects server policy behavior on page 654.
l Use less computationally intensive data types and suspicious URLs, and disable unneeded ones, where possible.
See Regular expression performance tips on page 826.
l Reduce the list of predefined data type groups to include just those the FortiWeb appliance is likely to encounter
when gathering data for an auto-learning report. By pruning the list, you reduce the resources used to recognize
data types, freeing them to improve the throughput of the FortiWeb appliance. See Auto-learning on page 207.
l When configuring a suspicious URL pattern, clear one or more web server type options if you do not operate all
three web servers, as shown in the illustration AutoLearn> PredefinedPattern> SuspiciousURL. By pruning the
list, you reduce the resources used by the FortiWeb appliance when applying the rule. See Auto-learning on page
207.
l When you configure a signature set as part of a web protection profile, consider limiting the scope and
application of the Information Disclosure options shown in the illustration Disabling unnecessary server
information disclosure signatures in WebProtection> KnownAttacks> Signatures >Signature Details. (Click
the blue arrow next to Information Disclosure to see the list.)
Do you need to watch for all information types? If not, disable them to increase performance. Disable
signatures that do not apply to your web servers. For example, if your web server does not run Adobe
ColdFusion, you could disable CF Source Code Leakage to omit that scan and improve performance. See
Specifying URLs allowed to initiate sessions on page 591.
The Information Disclosure feature can potentially require the FortiWeb appliance to rewrite the
header of every request from a server, resulting in reduced performance. Fortinet recommends enabling
this feature only to help you identify information disclosure through logging, and until you can reconfigure
the server to omit such sensitive information.
l If you use the web anti-defacement feature, tune your configuration to avoid backing up overly large files. See the
illustration Omitting large files from the backup in Web Protection >WebAnti-Defacement> WebSitewithAnti-
Defacement and Anti-defacement on page 693Anti-defacement on page 693.
Omitting large files from the backup in Web Protection >WebAnti-Defacement> WebSitewithAnti-Deface-
ment
Unless you need to back up large files, reduce the setting for the Skip Files Larger Than option from the
default of 10240 KB.
Use the Skip Files With These Extensions option to exclude specific types of large files, such as
compressed files and video clips.
The tcp-buffer option in system network-option defines the TCP_mem variable to indicate to
FortiWeb how the TCP stack should behave regarding memory usage. It consists of three values (the values are
measured in memory pages):
l low: This value indicates the peformance value for a desired low memory usage threshold. Below this point, the
TCP stack does not adjust the memory usage by interacting with TCP receive and send buffers for the sockets.
l pressure: This value tells FortiWeb the point at which it must start pressuring memory usage down. Memory
pressure is continued until the memory usage enters the lowe threshold and it maintains the default behavior of the
low threshold. This downward pressure is applied by adjusting the TCP receive and send buffers for the sockets
until the low threshold performance can be maintained.
l high: This value indicates the maximum memory pages FortiWeb may use. If this value is reached, TCP streams
and packets are dropped until FortiWeb begins using fewer memory pages again.
Setting the tcp-buffer option as default, high, or max from the CLI specifies the three values to
FortiWeb as following:
Note that although the tcp-buffer option can provide an increase in throughput on high bandwidth networks, it
decreases the number of concurrent TCP connections established on FortiWeb.
Example
config system network-option
set tcp-buffer high
end
To enhance availability, set up two FortiWeb appliances to act as an active-passive high availability (HA) pair. If
your main FortiWeb appliance fails, the standby FortiWeb appliance can continue processing web traffic with only
a minor interruption. For details, see Configuring a high availability (HA) FortiWeb cluster on page 130.
Heartbeat and synchronization packets contain sensitive configuration information and can consume
considerable network bandwidth. For best results, directly connect the two HA interfaces using a crossover
cable. If your system uses switches instead of crossover cables to connect the HA heartbeat interfaces, those
interfaces must be reachable by Layer 2 multicast.
l When configuring an HA pair, pay close attention to the options ARP Packet Numbers and ARP Packet Interval.
The FortiWeb appliance broadcasts ARP packets to the network to ensure timely failover. Delayed broadcast
intervals can slow performance. Set the value of ARP Packet Numbers no higher than needed.
When the FortiWeb appliance broadcasts ARP packets, it does so at regular intervals. For performance reasons,
set the value for ARP Packet Interval no greater than required.
Some experimentation may be needed to set these options at their optimum value. See Configuring a high
availability (HA) FortiWeb cluster on page 130.
Configure an SNMP community and enable the HA heartbeat failed option. For details, see Configuring an
SNMP community on page 787.
Focusing your energies on real attacks is vital. But often attacks differ from normal traffic in subtle ways.
Are 20 requests per second per client a DoS attack? Is a request URL with 250 characters abnormally long?
Should form inputs allow SQL queries?
How many of your attack logs are real, and how many are false positives?
Normal traffic is your best judge. Use it to adjust your FortiWebs protection settings and reduce attack logs that
arent meaningful.
For example, social media buttons for Twitter append an encoded version of your web pages URL as long
parameters named original_referer and url after the request URL to twitter.com.
This is normal, and used by Twitter to pre-fill the viewers tweet about your web site. This way, your readers do
not need to manually abbreviate and then paste your URL into their tweet. Long request URLs (and parameters)
are therefore typical for Twitter, and therefore would not necessarily be indicative of a security bypass attempt.
On other web applications, however, where URLs and parameters are short, this might be suspicious it could
be part of a clickjacking, URL-encoded shell code, or padded exploit. In those cases, you might create a shorter
HTTP constraint (see HTTP/HTTPS protocol constraints on page 618).
Likewise, a single corporate front page or Zenphoto gallery page might involve 81 requests for images,
JavaScripts, CSS pages, and other external components. A search page, however, might normally only have 6
requests, and merit a lower threshold when configuring rate limiting (Rate limiting on page 487).
If practical, use FortiWebs auto-learning to study traffic and suggest appropriate rules. Alternatively, you can
enable a feature with the Action set to Alert, then adjust the thresholds, create exceptions, or disable signatures
until you no longer receive many false positives, yet still detect attacks. Enable extended attack signature sets
gradually, checking for excessive false positives after you enable each one. (Extended signature sets can contain
signatures that are necessary in come cases, but are known sources of false positives.) For SQL Injection
detection, you can also enable False Positive Mitigation to reduce false positives (see False Positive Mitigation
for SQL Injection signatures).
For recommended initial rate limit thresholds, see the documentation for
each setting.
If a signature causes false positives, but disabling it would allow attacks, you
can use packet capture and analysis tools such as Wireshark to analyze the
differences between your typical traffic and attacks, then craft a custom
signature (see Defining custom data leak & attack signatures on page 563)
targeting the attacks but excluding your normal traffic.
If you need to save time, or dont feel comfortable doing this, you can
contact Fortinet Technical Support for professional services.
If you have written an attack signature yourself, or used regular expressions to define large sets of web pages
where you will be applying rate limiting, be sure to use the >> (test) button with Request URL and other similar
settings to check:
l your regular expressions syntax (see Regular expression syntax on page 918)
l all expected matches
l all non-matches
Regular expressions that do not match enough attack permutations cause false negatives; regular expressions
that match unintended traffic cause false positives.
Regular backups
Make a backup before executing operations that can cause large configuration changes, such as:
l Manual (see To back up the configuration via the web UI on page 271)
Go to System > Maintenance > Backup & Restore, and select the Local Backup tab.
l Via FTP/SFTP (see To back up the configuration via the web UI to an FTP/SFTP server on page 272).
To lessen the impact on performance, schedule the FTP backup time for off-peak
hours.
Go to System> Maintenance> Backup & Restore, and select the FTP Backup tab.
Event log messages stored in memory are cleared when the FortiWeb appliance shuts down. If you require the
ability to save a few logs, you can copy and paste the HTML from the GUI page that is displaying the memory
logs. Otherwise, if you need to be able to keep and download many logs, you should instead configure FortiWeb
to store event logs on disk. See Configuring logging on page 752 and Downloading log messages on page 776.
Event log messages stored in memory are cleared when the FortiWeb appliance shuts down. If you require the
ability to save a few logs, you can copy and paste the HTML from the GUI page that is displaying the memory
logs. Otherwise, if you need to be able to keep and download many logs, you should instead configure FortiWeb
to store event logs on disk. See Configuring logging on page 752 and Downloading log messages on page 776.
Troubleshooting
This topic provides guidelines to help you resolve issues if your FortiWeb appliance is not behaving as you expect.
Keep in mind that if you cannot resolve the issue on your own, you can contact Fortinet Technical Support.
See also
Administration
How do I recover the password of the admin account?
What is the maximum number of ADOMs I can create?
How do I upload and validate a license for FortiWeb-VM?
How do I troubleshoot a high availability (HA) problem?
FortiGuard
Why did the FortiGuard service update fail?
Security
How do I detect which cipher suite is used for HTTPS connections?
How can I strengthen my SSL configuration?
Why cant a browser connect securely to my back-end server?
Performance
How do I use performance tests to determine maximum performance?
How can I measure the memory usage of individual processes?
Upgrade
How do I reformat the boot device (flash drive) when I restore or upgrade the firmware?
How do I set up RAID for a replacement hard disk?
However, you can use the local console to reset the password. For detailed instructions, see Resetting passwords
on page 894.
Alternatively, you can reset the FortiWeb appliance to its default state (including the default administrator
account and password) by restoring the firmware. For instructions, see Restoring firmware (clean install) on
page 901.
When you purchase a license for FortiWeb-VM, Fortinet Technical Support (https://support.fortinet.com)
provides a license file that you can use to convert the trial license to a permanent, paid license.
You can upload the license via the web UI. The uploading process does not interrupt traffic or trigger an appliance
reboot.
For detailed instructions for accessing the web UI and uploading the license, see the FortiWeb-VM Install Guide.
https://192.168.1.99/
For FortiWeb-VM deployed on AWS, the URL is the public DNS address displayed in the instance information
for the appliance in your AWS console.
For AWS deployments, by default, the password is the AWS instance ID.
3. Go to System> Status> Status. The FortiGuard Information widget contains the link you use to upload
a license file.
FortiGuard Information widget on System> Status> Status in the web UI before license upload
4. Click Update.
5. Browse to the license file (.lic) you downloaded earlier from Fortinet, then click OK.
FortiWeb connects to Fortinet to validate its license. In most cases, the process is complete within a few
seconds. A message appears:
License has been uploaded. Please wait for authentication with registration
servers.
6. In the message box, click Refresh.
If you uploaded a valid license, the following message is displayed:
License has been successfully authenticated with registration servers.
The web UI logs you out. The login dialog reappears.
7. Log in again.
8. To verify that the license was uploaded successfully, log in to the web UI again, then view the FortiGuard
Information widget. The VM License row should say Valid.
Also view the System Information widget. The Serial Number row should have a number that indicates the
maximum number of vCPUs that can be allocated according to the FortiWeb-VM software license, such as
FVVM020000003619 (where VM02 indicates a limit of 2 vCPUs).
l Ensure that the cluster members have the same Group ID value, and that no other HA cluster uses this value.
l Specify different Device Priority values for each member of the cluster and select the Override option. This
configuration ensures that the higher priority appliance (the one with the lowest value) is maintained is the
master as often as possible.
3. Use the following commands to collect information about the HA cluster:
Command Purpose
get system status Displays information about current HA cluster members, including:
get global system l HA mode
status (if ADOMs are l HA Status
enabled) l Serial number
l Priority
l HA role
Helps confirm if the 2 appliances are part of the same cluster and
which one is the master.
execute ha disconnect Run on master appliance to disconnect slave without disconnecting cables.
You can then connect to the slave as if it were a standalone appliance for
troubleshooting purposes.
If the Override option is selected, you can run this command on the
master appliance to assign a higher priority to the slave appliance,
which manually triggers a HA failover.
execute ha manage
You specify the serial number of the slave appliance and the new
priority. For example:
execute ha manage FV-1KC3R11111111 1
Command Purpose
execute ha
synchronize stop
Before you run this command, run the following commands to turn on
debug log output and enable timestamps:
diagnose debug Configures the debug logs for HA heartbeat links to display messages
application hatalk 1 about the heartbeat signal, HA failover, and the uptime of the
members of the HA cluster.
4. If your HA cluster is deployed in a custom environment, following commands provide useful information for
troubleshooting (run on both members of the cluster):
get system status
diagnose debug application hatalk 1
diagnose debug application hasync 1
execute ha sync waf
execute ha md5sum
For detailed information about these commands, see the FortiWeb CLI Reference.
For detailed information about HA topology and configuration, see HA heartbeat & synchronization on page 57
and Configuring a high availability (HA) FortiWeb cluster on page 130.
To upload a file
1. To enable the file uploading and downloading functionality, use the CLI to enter the following commands:
config system settings
set enable-file-upload enable
end
2. In the web UI, go to System > Maintenance > Backup & Restore, and select the Local Backup tab.
At the bottom of the page, under GUI File Download/Upload, click Choose File to navigate to a file and
select it, and then click Upload to copy it to FortiWeb.
When the upload is complete, the file is displayed in the File Name list.
3. To maintain security, use the following CLI commands to disable the file uploading functionality:
config system settings
set enable-file-upload disable
end
To download a file
1. To enable the file uploading and downloading functionality, use the CLI to enter the following commands:
config system settings
set enable-file-upload enable
end
2. In the web UI, go to System > Maintenance > Backup & Restore, and select the Local Backup tab.
3. At the bottom of the page, under GUI File Download/Upload, click the download icon for the file you want to
download.
4. To maintain security, use the following CLI commands to disable the file uploading functionality:
config system settings
set enable-file-upload disable
end
1. Ensure that your firewall rules allow FortiWeb to access the Internet via TCP port 443.
This is the port that FortiWeb uses to poll for and download FortiGuard service updates from the FortiGuard
Distribution Network (FDN).
3. Because the size of the virus signature database exceeds 200MB, an unstable network can interrupt the TCP
session that downloads the database. If the download fails for this reason, obtain the latest version of the
virus signature database from support.fortinet.com and perform the update manually. See
Uploading signature & geography-to-IP updates on page 201.
FortiWeb resumes automatic updates of the database at the next scheduled time.
4. If the previous steps do not solve the problem, use the following commands to obtain additional information:
diagnose debug enable
diagnose debug application fds 7
If you need to contact Fortinet Technical Support for assistance, provide the output of these diagnose debug
commands and a configuration file.
For more information about these commands, see the FortiWeb CLI Reference.
For additional methods for verifying FortiGuard connectivity, see Connecting to FortiGuard services on page 190.
2. Ensure that you have added items to the URL Rewriting Condition Table.
3. If one of your conditions uses a regular expression, ensure that the expression is valid. Click the >> (double
arrow) button beside the Regular Expression field to test the value.
4. If the page is compressed, ensure that you have configured a decompression policy.
For more information, see Configuring temporary decompression for scanning & rewriting on page 651.
5. Go to System > Config > Advanced and adjust the value of Maximum Body Cache.
URL body rewriting does not work when the page is larger than the cache buffer size. The default size is
64KB.
To adjust the buffer using the CLI, use a command like the following example:
config global
config sys advanced
set max-cache-size 1024
end
end
6. Ensure that FortiWeb supports the pages Content-Type, which specifies its MIME type. FortiWeb supports
the following Content-Type values only:
l text/html
l text/plain
l text/javascript
l application/xml
l text/xml
l application/javascript
l application/soap+xml
l application/x-javascript
l application/json
l application/rss+xml
Direction Response
Expression Either a simple string or a regular expression that matches the response to
erase.
If the page is compressed, ensure that you have configured a decompression policy. Otherwise, the erase
action does not work.
For more information, see Configuring temporary decompression for scanning & rewriting on page 651.
l RESPONSE_HEADER
l RESPONSE_STATUS
If the target is RESPONSE_HEADER or RESPONSE_STATUS, the body of the response is still displayed.
3. Add the rule to a custom signature group, and then add the group to a signature policy that you can add to an
inline or offline protection profile.
For detailed custom signature creation instructions, see Defining custom data leak & attack signatures on page
563.
1. If your web protection profile uses a signature policy in which the extended version of a signature set is
enabled (for example, Cross Site Scripting (Extended)), disable it.
The extended signature sets detect a wider range of attacks but are also more likely to generate false
positives.
For detailed information, see Blocking known attacks & data leaks on page 538.
2. Specify the appropriate URL as an exception in the signature configuration. To create this exception, click
either the Exception link in the Message field of the attack log item or Advanced Mode in the Edit
Signature Policy dialog box.
For detailed instructions, see Configuring action overrides or exceptions to data leak & attack detection
signatures on page 556.
3. If the configuration changes do not solve the problem, capture the packet that FortiWeb has incorrectly
identified as an attack and contact Fortinet Technical Support for assistance.
If FortiWeb is identifying attacks as legitimate requests (false negatives), complete the following troubleshooting
steps:
1. Use the Advanced Mode option to ensure that the signature policy that your web protection profile uses has
the following configuration:
Fortinet can resolve the issue by adding an attack signature. In the meantime, you can resolve the problem by
creating a custom signature. For detailed instructions, see Defining custom data leak & attack signatures on
page 563.
For additional information about reducing false positives, see Reducing false positives on page 837.
Why is FortiWeb not forwarding non-HTTP traffic (for example, RDP, FTP) to back-end serv-
ers even though set ip-forward is enabled?
The config router setting command allows you to change how FortiWeb handles non-HTTP/HTTPS traffic when it
is operating in reverse proxy mode.
When the setting ip-forward is enabled, for any non-HTTP/HTTPS traffic with a destination other than a
FortiWeb virtual server (for example, a back-end server), FortiWeb acts as a router and forwards it based in its
destination address.
However, any non-HTTP/HTTPS traffic destined for a virtual server on the appliance is dropped.
Therefore, if you require clients need to reach a back-end server using FTP or another non-HTTP/HTTPS
protocol, ensure the client uses the back-end server's IP address.
For more detailed information about this setting and a configuration that avoids this problem, see the Router
setting topic in the FortiWeb CLI Reference.
How do I prevent cross-site request forgery (CRSF or XSRF) with a custom rule?
A cross-site request forgery attack takes advantage of the trust that a site has in a clients browser to execute
unwanted actions on a web application. For example, to test your web sites vulnerability to one CRSF method,
Cross-Frame Scripting (XFS), go to the following location:
http://sec101.sourceforge.net/cross_site_framing.php
To add an advanced access control rule that detects cross-site request forgery (CRSF)
Header Value A regular expression that matches the address of your web site.
^http://211\.24\.155\.103.*
7. Click OK to save the rule entry, and then click OK to save the rule.
8. Go to WebProtection> AdvancedProtection> CustomPolicy, and select the CustomPolicy tab to
group the custom rule into a policy.
For detailed information on creating policies, see Combination access control & rate limiting on page 460.
9. To apply the policy, select it as the Custom Policy in a protection profile (see Configuring a protection profile
for inline topologies on page 658 or Configuring a protection profile for an out-of-band topology or
asynchronous mode of operation on page 669).
Attack log messages contain Custom Access Violation when this feature detects an unauthorized
access attempt.
Why does my Advanced Protection rule that has both Signature Violation and HTTP
Response Code filters not detect any violations?
When you use Web Protection > Advanced Protection > Custom Policy > the Custom Rule tab to create
a custom rule, FortiWeb links items in the list of filters with an AND operator. It uses the rule to evaluate both
requests and responses. When the rule has both a Signature Violation and a HTTP Response Code filter, a
malicious request violates the signature filter and the corresponding response matches the response code filter.
But neither the request nor the response can violate both filters at the same time to generate a match.
To solve this problem, create a separate custom rule for each type of filter. For more information, see
Combination access control & rate limiting on page 460.
What's the difference between the Packet Interval Timeout and Transaction Timeout filters
in an Advanced Protection rule?
Both Packet Interval Timeout and Transaction Timeout protect against DoS attacks. In most cases, the attacks
are some form of slow HTTP attack.
Packet Interval Timeout evaluates the time period between packets that arrive from either the client or server
(request or response packets). If the time exceeds the maximum the timeout specifies, FortiWeb takes the action
specified in the rule.
However, other types of slow attacks can keep the server occupied and still maintain a minimal data flow. For
example, if an attack sends a byte of data per second, it can continue a GET request indefinitely but stay within
the Packet Interval Timeout.
The Transaction Timeout evaluates the time period for a transaction a GET or POST request and its complete
reply. In most cases, a transaction lasts no longer than a few milliseconds or, for slower applications, a few
seconds.
To detect the widest range of attacks, specify both Packet Interval Timeout and Transaction Timeout filters when
you create an Advanced Protection rule.
For more information, see Combination access control & rate limiting on page 460.
What ID numbers do I use to specify a Signature Violation filter when I use the CLI to cre-
ate a custom access rule?
The waf custom-access rule command allows you to configure custom access rules, which can include
Signature Violation filters. When you configure the signature-class option, use one of the following IDs to
specify the category of signature to match:
For example, the following command creates a custom rule that detects SQL injection attacks, such as blind SQL
injection:
config waf custom-access rule
edit "sql-inject"
set action block-period
set severity High
set trigger "notification-servers1"
config signature-class
edit 03000000
set status enable
next
end
next
end
config waf custom-access policy
edit "sql-inject-policy"
config rule
edit 1
set rule-name "sql-inject"
next
end
next
end
For more information on the waf custom-access rule command, see the FortiWeb CLI Reference.
Why is the Signature Violation filter I added to my Advanced Protection custom rule not
working?
To add a Signature Violation filter to an Advanced Protection custom rule, you select Signature Violation as the
filter type.
However, for the filter to work, the following configuration steps are also required:
l In the Edit Custom Rule dialog box, select at least one signature category. By default, no categories are selected.
When you select a category, FortiWeb prompts you to enable all or some of the signatures in the category.
l Ensure that the signatures that correspond to the categories you selected in the rule are enabled in the signature
policy (Web Protection > Known Attacks > Signatures).
You select the custom policy that contains the rule and corresponding signature set when you create a protection
profile.
For more information, see Combination access control & rate limiting on page 460 and Blocking known attacks &
data leaks on page 538.
Why don't my back-end servers receive the virtual server IP address as the source IP?
When the operation mode is reverse proxy, the server pool members receive the IP address of the FortiWeb
interface the connection uses. If the back-end servers need to know the IP address of the client where the request
originated, configure a X-Forwarded-For rule for the appropriate profile. See Defining your proxies, clients, & X-
headers on page 386.
Server policy Ensure that the server policy associates the Configuring a server
appropriate virtual server with the correct physical policy on page 677
servers (as members of a server pool).
VLANs (if used) Make sure that the VLAN is associated with the Adding VLAN
correct physical port (Interface setting). subinterfaces on page
168
Load balancers If the load balancer is in front of FortiWeb, the External load balancers:
physical IP addresses on it are the FortiWeb virtual before or after? on page
IP addresses. If the Load Balancer is behind the 84
FortiWeb, the FortiWeb physical server is the virtual
IP for the load balancer's virtual IP.
Transparent modes
Server policy Ensure that the server policy associates the Configuring a server
appropriate virtual server with the correct physical policy on page 677
servers (as a member of a server pool).
VLANs (if used) Make sure that the VLAN is associated with the Adding VLAN
correct physical port (Interface setting). subinterfaces on page
168
Web server Ensure that the web server is up and running by Checking routing on
testing it without FortiWeb on the network. page 881
Offline mode
Server policy Ensure that the server policy associates the Configuring a server
appropriate virtual server with the correct physical policy on page 677
servers (as members of a server pool).
VLANs (if used) Make sure that the VLAN is associated with the Adding VLAN
correct physical port (Interface setting). subinterfaces on page
168
Configuring the
network interfaces
on page 162
Use sniffing (packet capture) to ensure that you can How can I sniff
Network interfaces see traffic on both inbound and outbound network FortiWeb packets
interfaces. (packet capture)?
on page 861
(overview) or Packet
capture on page
870
Web server Ensure that the web server is up and running by Checking routing on
testing it without FortiWeb on the network. page 881
Why do I see HTTP traffic in the logs but not HTTPS traffic?
Use the following steps to troubleshoot HTTPS traffic logging:
See How can I sniff FortiWeb packets (packet capture)? on page 861 (overview) or Packet capture on page
870.
In most environments, and especially environments with high traffic volume, enabling this option for long periods
of time can cause the hard disk to fail prematurely. Do not enable it unless it is necessary and disable it as soon
as you no longer need it.
For information on configuring logging to the hard disk using the web UI, see Configuring logging on page 752.
To enable logging to the hard disk via the CLI, log in using an account with either w or rw permission to the
loggrp area and enter the following commands:
config log traffic-log
set disk-log enable
Alternatively, use the following command to display a sampling of traffic log messages:
diagnose log tlog show
where:
l Total time span is the total amount of time of the logd process handle logs (that is, receiving messages from
other process, filtering messages, outputting in standard format, writing the logs to the local database, and so on)
l Time spent on waiting is the amount of time of the logd process waited to receive messages from other
processes
l Time spent on preprocessing is the amount of time the logd process spent filtering and format i ng
messages
l traffic log processed is the total number of logs that the logd process handled in this cycle
For more information about the config log traffic-log and diagnose log tlog show
commands, see the FortiWeb CLI Reference.
Why is the most recent log message not displayed in the Aggregated Attack log?
If recent log messages do not appear in the Aggregated Attack log as expected, complete the following
troubleshooting steps:
When FortiWeb generates an attack log, the appliance writes it to and reads it from the hard disk and then
updates the logging database.
The process that retrieves Aggregated Attack log information from the database (indexd) has a lower priority
than the processes that analyze and direct traffic. Therefore, increased demand for FortiWeb processing
resources (for example, when traffic levels increase) can delay updates to the log.
For example, the following command captures TCP port 80 traffic arriving at or departing from 192.168.1.1, for
all network interfaces. The value 3 specifies the verbosity level (3 captures the most detail):
diagnose network sniffer any 'tcp and port 80 and host 192.168.1.1' 3
For detailed information and instructions on using this command and its output, see Packet capture on page 870.
1. Using a terminal emulator such as SecureCRT or Putty, connect to the appliance via SSH or Telnet, run the
sniffer command, and save the output to a file (for example, detail_output.log).
A terminal emulator is required because the console is too slow for this task and cannot display all of the
output.
2. Install a Perl interpreter and Wireshark (or equivalent application) on your PC.
3. To convert the packet capture command to a format that Wireshark can use, run the following command:
perl ./fgt2eth.pl -in detail_ouput.log -out converted.cap
To download fgt2eth.pl, see the Fortinet Knowledge Base article Using the FortiOS built-in packet sniffer.
The fgt2eth.pl script is provided as-is, without any implied warranty or technical
support.
1. Using the CLI, use the following command to turn on debug log output:
diagnose debug enable
2. Use a command similar to the following to limit the debug logs to those that match a specific client IP
address:
diagnose debug flow filter client-ip 172.22.6.232
3. Use the following command to include details from each module that processes the packet:
diagnose debug flow filter module-detail on
For additional information on these commands (for example, to specify debug logs for a specific flow direction),
see the FortiWeb CLI Reference.
Why is the number of cookies reported in my attack log message different from the num-
ber of cookies that message detail displays?
When FortiWeb generates an attack log message because a request exceeds the maximum number of cookies it
permits, the message value includes the number of cookies found in the request. In addition, the message details
include the actual cookie values.
For performance reasons, FortiWeb limits the size of the attack log message. If the amount of cookie value
information exceeds the limit for cookies in the attack log, the appliance displays only some of the cookies the
message detail.
Why does the attack log message display the virtual server IP address as the destination
IP instead of the IP address of the back-end server that was the target of the attack?
In some cases, FortiWeb blocks attacks before the packet is routed to a server pool member. When this happens,
the destination IP is the virtual server IP.
For more HTTPS troubleshooting information, see Supported cipher suites & protocol versions on page 401 and
Checking the SSL/TLS handshake & encryption on page 891.
Which configuration changes you make depends on your environment. For example, some older clients do not
support SHA256.
The command is available in FortiWeb 5.3.6 and higher only. For additional information on using CLIcommands,
see the FortiWeb CLI Reference.
1. Without connecting via FortiWeb, ensure that you can access the server using HTTPS.
2. Ensure that your browser supports HTTP Strict Transport Security (HSTS). For example, following web page
provides compatibility tables for various web browser versions:
http://caniuse.com/stricttransportsecurity
3. Ensure that the FortiWeb response includes the strict transport security header.
To add this header, select Add HSTS Header in the server policy or server pool configuration. For more
information, see Configuring a server policy on page 677 or Creating a server pool on page 359.
Performance tests
Requests per second (RPS), Rate of requests or connections maintains CPU Usage at 100%
connections per second
(CPS)
Throughput test Throughput maintains the value of CPU Usage at 100%. (A pair of gigabit
ports provide bandwidth of up to 2 Gbps.)
If your CPU and memory values do not reach the specified values, adjust your client and server test configuration
until you can determine maximum performance.
The diagnose hardware mem command allows you to display the usage statistics of ephemeral memory
(RAM), including swap pages and shared memory (Shmem). For example, to display total memory usage:
diagnose hardware mem list
For additional information on these commands, see the FortiWeb CLI Reference.
If the FortiWeb operating system is operating normally, use the regular shutdown procedure to power off the
appliance (see Shutdown on page 82.) The IPMI interface cannot shut down the appliance if FortiWeb is running.
However, if the operating system has failed, you can use the IPMI interface to shut down the appliance remotely.
In addition, the IPMI interface allows you to power on an appliance remotely after it has shut down.
Because the following procedure enables remote access to the IPMIinterface, it includes steps to change the
default password for the default user ( admin) to prevent unauthorized access.
1. Use an Ethernet cable to connect the IPMI port of the FortiWeb to the management computer.
2. Configure the management computer to match the FortiWeb default IPMI subnet. For example:
l IP address 192.168.1.2
l Netmask 255.255.255
3. To access the IPMIweb UI, in your browser, go to 192.168.1.1.
4. To log in, for both the username and password, enter admin.
5. In the menu bar, click Configuration > Users.
6. In the list of users, double-click the admin user.
7. On the Modify User page, select Change Password, enter values for Password and Confirm Password, and
then click Modify.
8. In the menu bar, click Dashboard, and then, beside Network Information, click Edit.
9. Use the network information settings to specify a static IPv4 address and gateway that a remote management
computer can use to reach the appliance.
10. Use your browser to log in to the IPMI web UI using the new IP address.
11. In the menu bar, click Remote Control > Server Power Control, select the option you want (for example, if
FortiWeb is shut down, Power On Server), and then click Perform Action.
How do I reformat the boot device (flash drive) when I restore or upgrade the firmware?
Follow the instructions provided in Restoring firmware (clean install) on page 901.
For step 11, type F to format the boot device (flash drive), and then enter Y to confirm your selection.
After a few minutes, the reformatting process is complete. Continue with the instructions for retrieving the
firmware image from the TFTP server.
During the system boot, Fortinet highly recommends that you verify the disk integrity. To perform this task, when
the prompt Press [enter] key for disk integrity verification is displayed, press Enter.
After the firmware restore is complete, use the get system status CLI command to verify the system
version. For additional information on using the CLI, see the FortiWeb CLI Reference.
FortiWeb reboots and starts the RAID initialization. The process can take a few hours to complete.
If FortiWeb is unable to write log messages to the disk, a message similar to the following is displayed:
level size(M) disk-number
raid1 1877665 0(Not Present),1(Not Present),2(Not Present),3(Not Present)
For additional information on using these CLI commands, see the FortiWeb CLI Reference.
Tools
To locate network errors and other issues that may prevent connections from passing to or through the FortiWeb
appliance, FortiWeb appliances feature several troubleshooting tools.
See also
l Diff
l Packet capture
For example, you might use ping to determine that 172.16.1.10 is reachable:
execute ping 172.16.1.10
PING 172.16.1.10 (172.16.1.10): 56 data bytes
64 bytes from 172.16.1.10: icmp_seq=0 ttl=64 time=2.4 ms
64 bytes from 172.16.1.10: icmp_seq=1 ttl=64 time=1.4 ms
64 bytes from 172.16.1.10: icmp_seq=2 ttl=64 time=1.4 ms
64 bytes from 172.16.1.10: icmp_seq=3 ttl=64 time=0.8 ms
64 bytes from 172.16.1.10: icmp_seq=4 ttl=64 time=1.4 ms
If the host is not reachable, you can use traceroute to determine the router hop or host at which the
connection fails:
execute traceroute 192.168.1.10
traceroute to 192.168.1.10 (192.168.1.10), 32 hops max, 72 byte packets
1192.168.1.2 2 ms 0 ms 1 ms
2* * *
For more information on CLI commands, see the FortiWeb CLI Reference. For more information on
troubleshooting connectivity, see Connectivity issues on page 880.
Both ping and traceroute require that network nodes respond to ICMP. If you
have disabled responses to ICMP on your network, hosts may appear to be
unreachable to ping and traceroute, even if connections using other protocols
can succeed.
Log messages
Log messages often contain clues that can aid you in determining the cause of a problem. FortiWeb appliances
can record log messages when errors occur that cause failures, upon significant changes, and upon processing
events.
Depending on the type, log messages may appear in either the event, attack, or traffic logs. The FortiWeb
appliance must be enabled to record event, attack, and traffic log messages; otherwise, you cannot analyze the
log messages for events of that type. To enable logging of different types of events, select Log&Report>
LogConfig> OtherLogSettings.
During troubleshooting, you may find it useful to reduce the logging severity threshold for more verbose logs, to
include more information on less severe events. To configure the severity threshold, go to Log&Report>
LogConfig> GlobalLogSettings.
Diff
You can compare backups of the core configuration file with your current configuration. This can be useful if, for
example:
l A previously configured feature is no longer functioning, and you are not sure what in the configuration has
changed.
l You want to recreate something configured previously, but do not remember what the settings were.
Difference programs can help you to quickly find all changes.
There are many such difference-finding programs, such as WinMerge and the original diff. They can compare
your configurations, line by line, and highlight parts that are new, modified, or deleted.
See also
l Backups
l Establishing a system baseline
l Determining the source of the problem
Packet capture
Packet capture, also known as sniffing or packet analysis, records some or all of the packets seen by a network
interface (that is, the network interface is used in promiscuous mode). By recording packets, you can trace
connection states to the exact point at which they fail, which may help you to diagnose some types of problems
that are otherwise difficult to detect.
FortiWeb appliances have a built-in sniffer. Packet capture on FortiWeb appliances is similar to that of FortiGate
appliances. You can perform the packet capture through CLI command or Web UI.
l <interface_name> is either the name of a network interface, such as port1, or enter any for all interfaces.
l '<filter_str>' is the sniffer filter that specifies which protocols and port numbers that you do or do not want to
capture, such as 'tcp port 80', or enter none for no filters. Filters use tcpdump syntax.
l {1 | 2 | 3} is an integer indicating whether to display the network interface names, packet headers, and/or
payloads for each packet that the network interface sends, receives, or sees:
l 1 Display the packet capture timestamp, plus basic fields of the IP header: the source IP address, the
destination IP address, protocol name, and destination port number.
l Does not display all fields of the IP header; it omits:
packet ID
IP header checksum
IP flag
fragment offset
options bits
e.g.:
l 2 All of the output from 1, plus the packet payload in both hexadecimal and ASCII. e.g.:
l 3 All of the output from 2, plus the link layer (Ethernet) header. e.g.:
l <packets_int> is the number of packets the sniffer reads before stopping. Packet capture output is printed to
your CLI display until you stop it by pressing Ctrl+C, or until it reaches the number of packets that you have
specified to capture.
Packet capture can be very resource intensive. To minimize the performance impact
on your FortiWeb appliance, use packet capture only during periods of minimal traffic,
with a local console CLI connection rather than a Telnet or SSH CLI connection, and
be sure to stop the command when you are finished.
For example, you might capture all TCP port 443 (typically HTTPS) traffic occurring through port1, regardless of
its source or destination IP address. The capture uses a high level of verbosity (indicated by3).
A specific number of packets to capture is not specified. As a result, the packet capture continues until the
administrator presses Ctrl+C. The sniffer then confirms that five packets were seen by that network interface.
(Verbose output can be very long. As a result, output shown below is truncated after only one packet.)
FortiWeb# diagnose network sniffer packet port1 'tcp port 443' 3
interfaces=[port1]
filters=[tcp port 443]
10.651905 192.168.0.1.50242 -> 192.168.0.2.443: syn 761714898
0x0000 0009 0f09 0001 0009 0f89 2914 0800 4500 ..........)...E.
0x0010 003c 73d1 4000 4006 3bc6 d157 fede ac16 .<s.@.@.;..W....
0x0020 0ed8 c442 01bb 2d66 d8d2 0000 0000 a002 ...B..-f........
0x0030 16d0 4f72 0000 0204 05b4 0402 080a 03ab ..Or............
Instead of reading packet capture output directly in your CLI display, you usually should save the output to a plain
text file using your CLI client. Saving the output provides several advantages. Packets can arrive more rapidly
than you may be able to read them in the buffer of your CLI display, and many protocols transfer data using
encodings other than US-ASCII. It is often, but not always, preferable to analyze the output by loading it into in a
network protocol analyzer application such as Wireshark (http://www.wireshark.org/).
For example, you could use PuTTY or Microsoft HyperTerminal to save the sniffer output to a file. Methods may
vary. See the documentation for your CLI client.
Requirements
4. In the upper left corner of the window, click the PuTTY icon to open its drop-down menu, then select
ChangeSettings.
A dialog appears where you can configure PuTTY to save output to a plain text file.
8. Click Apply.
9. Press Enter to send the CLI command to the FortiWeb appliance, beginning packet capture.
10. If you have not specified a number of packets to capture, when you have captured all packets that you want to
analyze, press Ctrl + C to stop the capture.
13. Delete the first and last lines, which look like this:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 5/4/2017.07.25 11:34:40 =~=~=~=~=~=~=~=~=~=~=~=
FortiWeb-2000 #
These lines are a PuTTY timestamp and a command prompt, which are not part of the packet capture. If you
do not delete them, they could interfere with the script in the next step.
14. Convert the plain text file to a format recognizable by your network protocol analyzer application.
You can convert the plain text file to a format (.pcap) recognizable by Wireshark (formerly called Ethereal)
using the fgt2eth.pl Perl script. To download fgt2eth.pl, see the Fortinet Knowledge Base article Using the
FortiOS built-in packet sniffer.
The fgt2eth.pl script is provided as-is, without any implied warranty or technical
support, and requires that you first install a Perl module compatible with your
operating system.
To use fgt2eth.pl, open a command prompt, then enter a command such as the following:
where:
l fgt2eth.pl is the name of the conversion script; include the path relative to the current directory, which is
indicated by the command prompt
l packet_capture.txt is the name of the packet captures output file; include the directory path relative to your
current directory
l packet_capture.pcap is the name of the conversion scripts output file; include the directory path relative to
your current directory where you want the converted output to be saved
15. Open the converted file in your network protocol analyzer application. For further instructions, see the
documentation for that application.
For additional information on packet capture, see the Fortinet Knowledge Base article Using the FortiOS
built-in packet sniffer.
For more information on CLI commands, see the FortiWeb CLI Reference.
Interface Select the network interface on which you want to capture packets.
Filter Specify which protocols and port numbers that you do or do not want to capture, such
as 'tcp and port 80 and host IP1 and (IP2 or IP3 )', or leave
this field blank for no filters.
Note that please use the same filter expression as tcpdump for this filter, you can
refer to the Linux man page of TCPDUMP.
Maximum Packet Specify the maximum packets you want to capture for the policy. Capture will stop
Count automatically if the total captured packets hits the count.
3. Click OK.
4. Perform a packet capture policy from the policy table:
Interface The network interface on which the packet capture policy is applied.
Filter The protocols and port numbers that the packet capture policy do or do not want to
capture.
Packets Current captured packet count. This value keeps increasing during the capture is
running.
Progress Click the Start button aside No Running to start the capture.
During the capture processing, a progress bar is displayed to show the progress to
the maximum packet count. Count of captured packets is displayed in Packets field.
Capture stops when hitting the maximum packet count, or you can click the Stop
button to stop the capture anytime. Captured packets will be saved as a .pcap file.
For more information, see the FortiWeb CLI Reference and FortiWeb NMI & COMlog Technical Note.
How to troubleshoot
If you are new to troubleshooting network appliances in general, this section outlines some basic skills.
See also
l Diff
l Backups
l Did FortiWebs hardware and software both start properly? If not, see Bootup issues on page 896.
l Are you having Login issues?
l What has recently changed?
Do not assume that nothing has changed in the network. Use Diff and Backups to see if something changed in
the configuration, and Logging to see if an unusual condition occurred. If the configuration did change, see
what the effect is when you roll back the change.
l Is a policy disabled?
l Does the problem originate on the camera, FortiWeb, or your computer? There are two sides to every connection.
See Connectivity issues on page 880.
l Does the problem affect only specific clients or servers? Are they all of the same type?
l Is the problem intermittent or random? Or can you reproduce it reliably, regardless of which camera or
computer you use to connect to FortiWeb?
If the problem is intermittent, you can use the System Resources widget to see whether the problem
corresponds to FortiWeb processor or RAM exhaustion. See Resource issues on page 892.
You can also view the event log. (If there is no event log, someone may have disabled that feature. See
Logging on page 749.)
See also
l Connectivity issues
l Resource issues
l Login issues
l Bootup issues
l Diff
l Backups
If you need to contact Fortinet Technical Support, it helps to provide a list of what data you gathered and what
solutions you tried. This prevents duplicated efforts, and minimizes the time required to resolve your ticket.
If you need access to other networking equipment such as switches, routers, and servers to help you test, contact
your network administrator. Fortinet Technical Support will not have access to this other equipment. However,
they may need to ask you to adjust a setting on the other equipment.
If you are not using the admin account on FortiWeb, verify that your account has the permissions you need to run
all diagnostics.
l Connectivity issues
l Resource issues
l Login issues
l Data storage issues
l Bootup issues
Fortinet also provides these resources:
l Forums
l Online campus (tutorials and training materials)
Check within your organization. You can save time and effort during the troubleshooting process by checking if
other FortiWeb administrators experienced a similar problem before.
Connectivity issues
One of your first tests when configuring a new policy should be to determine whether allowed traffic is flowing to
your web servers.
l Is there a server policy applied to the web server or servers FortiWeb was installed to protect? If it is operating in
reverse proxy mode, FortiWeb will not allow any traffic to reach a protected web server unless there is a matching
server policy that permits it.
l If your network utilizes secure connections (HTTPS) and there is no traffic flow, is there a problem with your
certificate?
l If you run a test attack from a browser aimed at your web site, does it show up in the attack log?
To verify, configure FortiWeb to detect the attack, then craft a proof-of-concept that will trigger the attack sensor.
For example, to see whether directory traversal attacks are being logged and/or blocked, you could use your web
browser to go to:
http://www.example.com/login?user=../../../../
Under normal circumstances, you should see a new attack log entry in the Attack Log widget of the system
dashboard.
See also
l Ensure the network cables are properly plugged in to the interfaces on the FortiWeb appliance.
l Ensure there are connection lights for the network cables on the appliance.
l Change the cable if the cable or its connector are damaged or you are unsure about the cables type or quality.
l Connect the FortiWeb appliance to different hardware to see if that makes a difference.
l In the web UI, select Status > Network > Interface and ensure the link status is up for the interface.
If the status is down (down arrow on red circle), click Bring Up next to it in the Status column.
If the hardware connections are correct and the appliance is powered on but you cannot connect using the CLI or
web UI, you may be experiencing bootup problems. See Bootup issues on page 896.
Checking routing
ping and traceroute are useful tools in network connectivity and route troubleshooting.
Since you typically use these tools to troubleshoot, you can allow ICMP, the protocol used by these tools, in
firewall policies and on interfaces only when you need them. Otherwise, disable ICMP for improved security and
performance.
By default, the FortiWeb appliance will forward only HTTP/HTTPS traffic to your protected web servers. (That is,
routing/IP-based forwarding is disabled.) For information on enabling forwarding of FTP or other protocols, see
the config router setting command in the FortiWeb CLI Reference.
By default, FortiWeb appliances will respond to ping and traceroute. However, if the appliance does not
respond, and there are no firewall policies that block it, ICMP type0 (ECHO_REPSPONSE) might be effectively
disabled.
2. In the row for the network interface which you want to respond to ICMP type 8 (ECHO_REQUEST) for ping
and UDP for traceroute, click Edit.
A dialog appears.
3. Enable PING.
Disabling PING only prevents FortiWeb from receiving ICMP type 8 (ECHO_
REQUEST) and traceroute-related UDP and responding to it.
4. If Trusted Host #1, Trusted Host #2, and Trusted Host #3 have been restricted, verify that they include your
computer or devices IP address. Otherwise FortiWeb will not respond.
5. Click OK.
The appliance should now respond when another device such as your management computer sends a ping
or traceroute to that network interface.
1. Attempt to connect through the FortiWeb appliance, from a client to a protected web server, via HTTP and/or
HTTPS.
2. Use the ping command on both the client and the server to verify that a route exists between the two. Test
traffic movement in both directions: from the client to the server, and the server to the client. Web servers do
not need to be able to initiate a connection, but must be able to send reply traffic along a return path.
3. Use the tracert or traceroute command on both the client and the server (depending on their operating
systems) to locate the point of failure along the route.
If the route is broken when it reaches the FortiWeb appliance, first examine its network interfaces and routes.
To display network interface addresses and subnets, enter the CLI command:
show system interface
To display all recently-used routes with their priorities, enter the CLI command:
diagnose network route list
You may need to verify that the physical cabling is reliable and not loose or broken, that there are no IP
address or MAC address conflicts or blacklisting, misconfigured DNS records, and otherwise rule out problems
at the physical, network, and transport layer.
If these tests succeed, a route exists, but you cannot connect using HTTP or HTTPS, an application-layer
problem is preventing connectivity.
The ping command sends a small data packet to the destination and waits for a response. The response has a
timer that may expire, indicating that the destination is unreachable via ICMP.
Connectivity via ICMP only proves that a route exists. It does not prove that
connectivity also exists via other protocols at other layers such as HTTP.
ICMP is part of Layer 3 on the OSI Networking Model. ping sends Internet Control Message Protocol (ICMP)
ECHO_REQUEST (ping) packets to the destination, and listens for ECHO_RESPONSE (pong) packets in reply.
Some networks block ICMP packets because they can be used in a ping flood or denial of service (DoS) attack if
the network does not have anti-DoS capabilities, or because ping can be used by an attacker to find potential
targets on the network.
Beyond basic existence of a possible route between the source and destination, ping tells you the amount of
packet loss (if any), how long it takes the packet to make the round trip (latency), and the variation in that time
from packet to packet (jitter).
1. Log in to the CLI via either SSH, Telnet, or You can ping from the FortiWeb appliance in the CLI Console
widget of the web UI.
2. If you want to adjust the behavior of execute ping, first use the execute ping options command.
For details, see the FortiWeb CLI Reference.
where <destination_ipv4> is the IP address of the device that you want to verify that the appliance can
connect to, such as 192.168.1.1.
To verify that routing is bidirectionally symmetric, you should also ping the appliance.
See To enable ping and traceroute responses from FortiWeb on page 881 and To ping
a device from a Microsoft Windows computer on page 884 or To ping a device from a
Linux or Mac OS X computer on page 885.
If the appliance can reach the host via ICMP, output similar to the following appears:
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=253 time=6.5 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=253 time=7.4 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=253 time=6.0 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=253 time=5.5 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=253 time=7.3 ms
If the appliance cannot reach the host via ICMP, output similar to the following appears:
PING 10.0.0.1 (10.0.0.1): 56 data bytes
Timeout ...
Timeout ...
Timeout ...
Timeout ...
Timeout ...
100% packet loss and Timeout indicates that the host is not reachable.
where:
l <destination_ipv4> is the IP address of the device that you want to verify that the computer can connect
to, such as 192.168.1.1.
If the computer can reach the destination, output similar to the following appears:
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=7ms TTL=253
Reply from 192.168.1.1: bytes=32 time=6ms TTL=253
Reply from 192.168.1.1: bytes=32 time=11ms TTL=253
Reply from 192.168.1.1: bytes=32 time=5ms TTL=253
If the computer cannot reach the destination, output similar to the following appears:
Pinging 10.0.0.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
l <destination_ipv4> is the IP address of the device that you want to verify that the computer can connect
to, such as 192.168.1.1.
l <options_str> are zero or more options, such as:
l -W y Wait y seconds for ECHO_RESPONSE.
l -c x Where x is the number of packets to send.
If the command is not found, you can either enter the full path to the executable or add its path to your shell
environment variables. The path to the ping executable varies by distribution, but may be /bin/ping.
If you do not supply a packet count, output will continue until you terminate the command with Control-C. For
more information on options, enter man ping.
If the computer can reach the destination via ICMP, output similar to the following appears:
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=253 time=6.85 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=253 time=7.64 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=253 time=8.73 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=253 time=11.0 ms
64 bytes from 192.168.1.1: icmp_seq=5 ttl=253 time=9.72 ms
If the computer cannot reach the destination via ICMP, if you specified a wait and packet count rather than
having the command wait for your Control-C, output similar to the following appears:
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
Otherwise, if you terminate by pressing Control-C (^C), output similar to the following appears:
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
From 172.20.120.2 icmp_seq=31 Destination Host Unreachable
From 172.20.120.2 icmp_seq=30 Destination Host Unreachable
From 172.20.120.2 icmp_seq=29 Destination Host Unreachable
^C
--- 10.0.0.1 ping statistics ---
41 packets transmitted, 0 received, +9 errors, 100% packet loss, time 40108ms
pipe 3
100% packet loss and Destination Host Unreachable indicates that the host is not
reachable.
traceroute sends ICMP packets to test each hop along the route. It sends three packets to the destination,
and then increases the time to live (TTL) setting by one, and sends another three packets to the destination. As
the TTL increases, packets go one hop farther along the route until they reach the destination.
Most traceroute commands display their maximum hop count that is, the maximum number of steps it will
take before declaring the destination unreachable before they start tracing the route. The TTL setting may
result in routers or firewalls along the route timing out due to high latency.
Where ping only tells you if the signal reached its destination and returned successfully, traceroute shows
each step of its journey to its destination and how long each step takes. If you specify the destination using a
domain name, the traceroute output can also indicate DNS problems, such as an inability to connect to a
DNS server.
By default, traceroute uses UDP with destination ports numbered from 33434 to 33534. The traceroute utility
usually has an option to specify use of ICMP ECHO_REQUEST (type8) instead, as used by the Windows
tracert utility. If you have a firewall and you want traceroute to work from both machines (Unix-like
systems and Windows) you will need to allow both protocols inbound through your firewall (UDP ports 33434 -
33534 and ICMP type 8).
1. Log in to the CLI via either SSH, Telnet, or You can ping from the FortiWeb appliance in the CLI Console
widget of the web UI.
If the appliance has a complete route to the destination, output similar to the following appears:
traceroute to www.fortinet.com (66.171.121.34), 32 hops max, 84 byte packets
1 172.16.1.2 0 ms 0 ms 0 ms
2 209.87.254.221 <static-209-87-254-221.storm.ca> 2 ms 2 ms 2 ms
3 209.87.239.129 <core-2-g0-1-1104.storm.ca> 2 ms 1 ms 2 ms
4 67.69.228.161 2 ms 2 ms 3 ms
5 64.230.164.17 <core2-ottawa23_POS13-1-0.net.bell.ca> 3 ms 3 ms 2 ms
6 64.230.132.234 <core2-ottawatc_POS5-0-0.net.bell.ca> 20 ms 20 ms 20 ms
7 64.230.132.58 <core4-toronto21_POS0-12-4-0.net.bell.ca> 24 ms 21 ms 24 ms
8 64.230.138.154 <bx4-toronto63_so-2-0-0-0.net.bell.ca> 8 ms 9 ms 8 ms
9 64.230.185.145 <bx2-ashburn_so2-0-0.net.bell.ca> 23 ms 23 ms 23 ms
10 12.89.71.9 23 ms 22 ms 22 ms
11 12.122.134.238 <cr2.wswdc.ip.att.net> 100 ms 12.123.10.130 <cr2.wswdc.ip.att.net>
101 ms 102 ms
12 12.122.18.21 <cr1.cgcil.ip.att.net> 101 ms 100 ms 99 ms
13 12.122.4.121 <cr1.sffca.ip.att.net> 100 ms 98 ms 100 ms
14 12.122.1.118 <cr81.sj2ca.ip.att.net> 98 ms 98 ms 100 ms
15 12.122.110.105 <gar2.sj2ca.ip.att.net> 96 ms 96 ms 96 ms
16 12.116.52.42 94 ms 94 ms 94 ms
17 203.78.181.10 88 ms 87 ms 87 ms
18 203.78.181.130 90 ms 89 ms 90 ms
19 66.171.121.34 <fortinet.com> 91 ms 89 ms 91 ms
20 66.171.121.34 <fortinet.com> 91 ms 91 ms 89 ms
Each line lists the routing hop number, the IP address and FQDN (if any) of that hop, and the 3 response
times from that hop. Typically a value of <1ms indicates a local router.
If the appliance does not have a complete route to the destination, output similar to the following appears:
traceroute to 10.0.0.1 (10.0.0.1), 32 hops max, 84 byte packets
1 172.16.1.2 0 ms 0 ms 0 ms
2 172.16.1.10 0 ms 0 ms 0 ms
3 * * *
4 * * *
The asterisks (*) indicate no response from that hop in the network routing. For more information, see the
FortiWeb CLI Reference.
If the appliance has a complete route to the destination, output similar to the following appears:
Tracing route to www.fortinet.com [66.171.121.34]
over a maximum of 30 hops:
3 2 ms 2 ms 22 ms core-2-g0-1-1104.storm.ca [209.87.239.129]
4 3 ms 3 ms 2 ms 67.69.228.161
5 3 ms 2 ms 3 ms core2-ottawa23_POS13-1-0.net.bell.ca [64.230.164
.17]
(Output abbreviated.)
15 97 ms 97 ms 97 ms gar2.sj2ca.ip.att.net [12.122.110.105]
16 94 ms 94 ms 94 ms 12.116.52.42
17 87 ms 87 ms 87 ms 203.78.181.10
18 89 ms 89 ms 90 ms 203.78.181.130
19 89 ms 89 ms 90 ms fortinet.com [66.171.121.34]
20 90 ms 90 ms 91 ms fortinet.com [66.171.121.34]
Trace complete.
Each line lists the routing hop number, the 3 response times from that hop, and the IP address and FQDN (if
any) of that hop. Typically a value of <1ms indicates a local router.
If the appliance does not have a complete route to the destination, output similar to the following appears:
Tracing route to 10.0.0.1 over a maximum of 30 hops
The asterisks (*) and Request timed out. indicate no response from that hop in the network routing.
If the appliance has a complete route to the destination, output similar to the following appears:
traceroute to www.fortinet.com (66.171.121.34), 30 hops max, 60 byte packets
1 172.16.1.2 (172.16.1.2) 0.189 ms 0.277 ms 0.226 ms
2 static-209-87-254-221.storm.ca (209.87.254.221) 2.554 ms 2.549 ms 2.503 ms
3 core-2-g0-1-1104.storm.ca (209.87.239.129) 2.461 ms 2.516 ms 2.417 ms
4 67.69.228.161 (67.69.228.161) 3.041 ms 3.007 ms 2.966 ms
5 core2-ottawa23_POS13-1-0.net.bell.ca (64.230.164.17) 3.004 ms 2.998 ms 2.963 ms
(Output abbreviated.)
16 12.116.52.42 (12.116.52.42) 94.379 ms 94.114 ms 94.162 ms
17 203.78.181.10 (203.78.181.10) 122.879 ms 120.690 ms 119.049 ms
18 203.78.181.130 (203.78.181.130) 89.705 ms 89.411 ms 89.591 ms
19 fortinet.com (66.171.121.34) 89.717 ms 89.584 ms 89.568 ms
Each line lists the routing hop number, the IP address and FQDN (if any) of that hop, and the 3 response
times from that hop. Typically a value of <1ms indicates a local router.
If the appliance does not have a complete route to the destination, output similar to the following appears:
traceroute to 10.0.0.1 (10.0.0.1), 30 hops max, 60 byte packets
1 * * *
2 172.16.1.10 (172.16.1.10) 4.160 ms 4.169 ms 4.144 ms
3 * * *
4 * * *^C
The asterisks (*) indicate no response from that hop in the network routing.
Relatedly, if the computers DNS query cannot resolve the host name, output similar to the following appears:
example.lab: Name or service not known
Cannot handle "host" cmdline arg `example.lab' on position 1 (argc 1)
If a route is cached in the routing table, it saves time and resources that would otherwise be required for a route
lookup. If the routing table is full and a new route must be added, the oldest, least-used route is deleted to make
room.
on page 904. For ports used by your own HTTP network services, see Defining your network services on page
395.
If the packet trace shows that packets are arriving at your FortiWeb appliances interfaces but no HTTP/HTTPS
packets egress, check that:
If the packet is accepted by the policy but appears to be dropped during processing, see Debugging the packet
processing flow on page 890.
For example, the following commands enable debug logs and the logs timestamp, and set other parameters for
debug logging:
diagnose debug enable
diagnose debug console timestamp enable
diagnose debug application proxy 7
diagnose debug flow show module-process-detail
For detailed information on the diagnose debug commands, see the FortiWeb CLI Reference.
l ssl_error_no_cypher_overlap
(Mozilla Firefox 9.0.1)
l Error 113 (net::ERROR_SSL_VERSION_OR_CIPHER_MISMATCH): Unknown error.
(Google Chrome 16.0.912.75 m)
Expected SSL/TLS behavior varies by SSL inspection vs. SSL offloading (see Offloading vs. inspection on page
399):
SSL offloading Reverse proxy mode only (see Supported features in each operation mode on page 88).
The handshake is between the client and FortiWeb. If the connection cannot be established, verify that the
browser supports one of the key exchanges, encryption algorithms, and authentication (hashes) offered by
FortiWeb. See Supported cipher suites & protocol versions on page 401.
SSL inspection True transparent proxy, offline protection mode and transparent inspection mode only.
The handshake is between the client and the web server. If the connection cannot be established, verify that the
browser supports one of the key exchanges, encryption algorithms, and authentication (hashes) suggested by the
web server. Server-side, you must also verify that your web server supports enough cipher suites that all required
clients can connect.
Google Chrome will prefer an anonymous Diffie-Hellman key exchange. This has
the property of perfect forward secrecy, which makes SSL inspection theoretically
impossible. To guarantee that this is not used to hide attacks from FortiWeb, you
must disable it on your web server. On Apache, you would add !ADH to the
SSLCipherSuite configuration line. For example:
SSLCipherSuite
ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
If you are not sure which cipher suites are currently supported, you can use SSL tools such as OpenSSL to
discover support. For example, you could use this client-side command to know whether the web server or
FortiWeb supports strong (HIGH) encryption:
openssl s_client -connect example.com:443 -cipher HIGH
If your web servers are required to comply with PCI DSS, you should make sure that
your web servers do not allow weak encryption. For example, if your web servers
accept SSL 2.0 or MD5 hashes, you may fail your PCI DSS audit.
Resource issues
This section includes troubleshooting questions related to sluggish or stalled performance.
l Has there been a sustained spike in HTTP traffic related to a specific policy?
The above command generates a report of processes every 10 seconds. The report provides the process names,
their process ID (pid), status, CPU usage, and memory usage.
The report continues to refresh and display in the CLI until you press q (quit).
To determine if high load is frequently a problem, you can display the average load level by using these CLI
commands:
get system performance
diagnose system load
If the issue recurs, and corresponds with a signature or configuration change, you may need to optimize regular
expressions to prevent the issue from recurring. See Debugging the packet processing flow on page 890 and
Regular expression performance tips on page 826.
In the FortiWeb appliance's web UI, you can view traffic load two ways:
l Monitor current HTTP traffic on the dashboard. Go to System> Status > Status and examine the graphs in the
Policy Summary widget.
l Examine traffic history in the traffic log. Go to Logs&Report> Log Access> Traffic.
In the FortiWeb appliance's web UI, you can watch for attacks in two ways:
l Monitor current HTTP traffic on the dashboard. Go to System> Status > Status and examine the attack event
history graph in the Policy Summary widget.
l Examine attack history in the traffic log. Go to Logs&Report> Log Access> Attack.
Before attacks occur, use the FortiWeb appliance's rich feature set to configure attack defenses.
Login issues
If the person cannot access the login page at all, it is usually actually a connectivity issue (see Ping & traceroute
on page 868 and Configuring the network settings on page 160) unless all accounts are configured to accept
logins only from specific IP addresses (see Trusted Host #1 on page 280).
If an administrator can connect, but cannot log in, even though providing the correct account name and
password, and is receiving this error message:
Too many bad login attemptsor reached max number of logins. Please try again in a few
minutes. Login aborted.
single administrator mode may have been enabled. See Enable Single Admin User login on page 77.
If the person has lost or forgotten his or her password, the admin account can reset other accounts passwords
(see Changing an administrators password on page 285).
1. In the web UI, go to User > User Group > User Group and examine each group to locate the name of the
problem user.
2. Note the user group to which the affected users belong, especially if multiple affected users are part of one
group. If the user is not a group member, there is no access.
3. Go to ApplicationDelivery > Authentication and select the Authentication Rule tab to determine which
rule contains the problem user group. If the user group is not part of a rule, there is no access.
4. Go to ApplicationDelivery > Authentication and select the Authentication Policy tab to locate the
policy that contains the rule governing the problem user group. If the rule is not part of a policy, there is no
access.
5. Go to Policy > Web Protection Profile and select the Inline Protection Profile tab to determine which
profile contains the related authentication policy. If the policy is not part of a profile, there is no access.
6. Make sure that inline protection profile is included in the server policy that applies to the server the user is
trying to access. If the profile is not part of the server policy, there is no access.
Authentication involves user groups, authentication rules and policy, inline protection policy, and finally,
server policy. If a user is not in a user group used in the policy for a specific server, the user will have no
access.
Resetting passwords
If someone has forgotten or lost his or her password, or if you need to change an accounts password, the admin
administrator can reset the password.
If you forget the password of the admin administrator, however, you will not be able to reset its password
through the web UI. You can either:
l reset the FortiWeb appliance to its default state (including the default administrator account and password) by
restoring the firmware. For instructions, see Restoring firmware (clean install) on page 901.
l connect to the local console, reboot the FortiWeb appliance, and set the password (see To reset the admin
accounts password on page 895)
To do this, you must either have direct physical, local access to the appliance, or have
connected it to your terminal server which serves as an aggregator for direct physical
accesses. For security reasons, this cannot be done via the web UI nor via CLI through
the Ethernet network adapters.
4. While the appliance is shut down, connect the local console port of your appliance to your computer.
5. On your management computer, start a terminal emulator such as PuTTY. For details, see To connect to the
CLI using a local console connection on page 104.
then enter:
bcpb<serial-number_str>
where <serial-number_str> is the serial number. (If you have copied it, in PuTTY, you can right-click to
quickly paste it, instead of typing it in. This will prevent the login from timing out.)
If you are successful, the CLI will welcome you, and you can then enter the following commands to reset the
admin accounts password:
config system admin
edit admin
set password <new-password_str>
end
exit
where <new-password_str> is the password for the administrator account named admin.
If you do not enter both the correct user name and the password within the correct time frame, the console
will display an error message:
The hashed password length is invalid
If FortiWeb has been storing data but has suddenly stopped, first verify that FortiWeb has not used all of its local
storage capacity by entering this CLI command:
diagnose system mount list
to display disk usage for all mounted file systems, such as:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/ram0 61973 31207 30766 50% /
none 262144 736 261408 0% /tmp
none 262144 0 262144 0% /dev/shm
/dev/sdb2 38733 25119 11614 68% /data
/dev/sda1 153785572 187068 145783964 0% /var/log
/dev/sdb3 836612 16584 777528 2% /home
You can use alerts to notify you when FortiWeb has almost consumed its hard disk
space. See SNMP traps & queries on page 785. You can also configure FortiWeb to
overwrite old logs rather than stopping logging when the disk is full. See When log disk
is full on page 758. (Keep in mind, however, that this may not prevent full disk
problems for other features. To free disk space, delete files such as auto-learning data
and old reports that you no longer need.)
If a full disk is not the problem, examine the configuration to determine if an administrator has disabled those
features that store data.
If neither of those indicate the cause of the problem, verify that the disks file system has not been mounted in
read-only mode, which can occur if the hard disk is experiencing problems with its write capabilities (see Hard disk
corruption or failure on page 896).
Bootup issues
While FortiWeb is booting up, hardware and firmware components must be present and functional, or startup will
fail. Depending on the degree of failure, FortiWeb may appear to be partially functional. You may notice that you
cannot connect at all. If you can connect, you may notice that features such as reports and anti-defacement do
not work. If you have enabled logging to an external location such as a Syslog server or FortiAnalyzer, or to
memory, you should notice this log message:
log disk not mounted
Depending on the cause of failure, you may be able to fix the problem.
Connect to FortiWebs CLI via local console, then supply power. After the boot loader starts, you should see this
prompt:
Press [enter] key for disk integrity verification.
Pressing the Enter key will cause FortiWeb to check the hard disks file system to attempt to resolve any problems
discovered with that disks file system, and to determine if the disk can be mounted (mounted disks should
appear in the internal list of mounted file systems, /etc/mtab). During the check, FortiWeb will describe any
problems that it finds, and the results of disk recovery attempts, such as:
ext2fs_check_if_mount: Cant detect if filesystem is mounted due to missing mtab file
while determining where /dev/sda1 is mounted.
/dev/sda1: recovering journal
/dev/sda1: clean, 56/61054976 files, 3885759/244190638 blocks
If the problem occurs while FortiWeb is still running (or after an initial reboot and attempt to repair the file
system), in the CLI, enter:
diagnose hardware harddisk list
For example, on a FortiWeb1000C with a single properly functioning internal hard disk plus its internal flash disk,
this command should show two file systems:
name size(M)
sda 1000204.89
sdb 1971.32
where sda, the larger file system, is from the hard disk used to store non-configuration/firmware data.
If that command does not list the data disks file system, FortiWeb did not successfully mount it. Try to reboot
and run the file system check.
If the data disks file system is listed and appears to be the correct size, FortiWeb could mount it. However, there
still could be other problems preventing the file system from functioning, such as being mounted in read-only
mode, which would prevent new logs and other data from being recorded. To determine this, enter:
diagnose hardware logdisk info
to display the count, capacity, RAID status/level, partition numbers, and read-write/read-only mount status.
For example, on a FortiWeb-1000C with a single properly functioning data disk, this command should show:
disk number: 1
disk[0] size: 976.76GB
raid level: raid1
partition number: 1
mount status: read-write
To prevent file system corruption in the future, and to prevent possible physical
damage, always make sure to shut down FortiWebs operating system before
disconnecting the power.
You can also display the status of each individual disk in the RAID array:
FortiWeb # diag hardware raid list
disk-number size(M) level
0(OK),1(OK), 1877274 raid1
If the file system could not be fixed by the file system check, it may be physically damaged or components may
have worn out prematurely. Most commonly, this is caused by either:
l failing to shut down FortiWebs operating system before disconnecting the power (e.g. someone pulled the power
plug while FortiWeb was running)
l logging misconfiguration (e.g. logging very frequent logs like traffic logs or debug logs for an extended period of
time to the local hard drive)
For hardware replacement, contact Fortinet Customer Service:
https://support.fortinet.com
https://support.fortinet.com
After powering on, if the power indicator LEDs are lit but a few minutes have passed and you still cannot connect
to the FortiWeb appliance through the network using CLI or the web UI, you can either:
Always halt the FortiWeb OS before disconnecting the power. Power disruption while
the OS is running can cause damage to the disks and/or software.
Once connected, power cycle the appliance and observe the FortiWebs output to your terminal emulator. You
will be looking for some specific diagnostic indicators.
1. Are there console messages but text is garbled on the screen? If yes, verify your terminal emulators settings
are correct for your hardware. Typically, however, these are baud rate 9600, data bits 8, parity none, stop bits
1.
2. Does the hardware successfully complete the hardware power on self test (POST) and BIOS memory tests?
If not, you may need to replace the hardware. For assistance, contact Fortinet Customer Service:
https://support.fortinet.com
3. Does the boot loader start? You should see a message such as:
FortiBootLoader
FortiWeb-1000C (17:52-09.08.2011)
Ver:00010018
Serial number:FV-1KC3R11700094
If the boot loader does not start, you may need to restore it. For assistance, contact Fortinet Technical
Support:
https://support.fortinet.com
4. When pressing a key during the boot loader, do you see the following boot loader options?
[G]: Get firmware image from TFTP server.
[F]: Format boot device.
[B]: Boot with backup firmware and set as default.
[Q]: Quit menu and continue to boot with default firmware.
[H]: Display this list of options.
Enter G,F,B,Q,or H:
If the boot loader does not start, you may need to restore it. For assistance, contact Fortinet Technical
Support:
https://support.fortinet.com
5. Can the boot loader read the image of the OS software in the selected boot partition (primary or
backup/secondary, depending on your selection in the boot loader)? You should see a message such as the
following:
Reading boot image 2479460 bytes.
Initializing FortiWeb...?
System is started.
If not, the image may be corrupted. Reboot and use the boot loader to switch to the other partition, if any (see
Booting from the alternate partition on page 119).
If this is not possible, you can restore the firmware (see Restoring firmware (clean install) on page 901). If
the firmware cannot be successfully restored, format the boot partition, and try again.
If you still cannot restore the firmware, there could be either a boot loader or disk issue. Contact Fortinet
Technical Support:
https://support.fortinet.com
6. Does the login prompt appear? You should see a prompt like this:
FortiWeb login:
If not, or if the login prompt is interrupted by error messages, restore the OS software (see Restoring firmware
(clean install) on page 901). If you recently upgraded the firmware, try downgrading by restoring the
previously installed, last known good, version.
If restoring the firmware does not solve the problem, there could be a data or boot disk issue. Contact Fortinet
Technical Support:
https://support.fortinet.com
If you can see and use the login prompt on the local console, but cannot successfully establish a session
through the network (web UI, SSH or Telnet), first examine a backup copy of the configuration file to verify
that it is not caused by a misconfiguration. The network interface and administrator accounts must be
configured to allow your connection and login attempt (see Configuring the network settings on page 160 and
Trusted Host #1 on page 280).
If the configuration appears correct, but no network connections are successful, first try restoring the firmware
to rule out corrupted data that could be causing problems (see Restoring firmware (clean install) on page
901). You can also use this command to verify that resource exhaustion is not the problem:
diagnose system top delay 5
The process system usage statistics continues to refresh and display in the CLI until you press q (quit).
However, you can use the following command to enable IP-based forwarding (routing):
config router setting
set ip-forward {enable | disable}
end
If you will be selling your FortiWeb appliance, or if you are not sure what part of your configuration is causing a
problem, you can reset it to its default settings and erase data. (If you have not updated the firmware, this is the
same as resetting to the factory default settings.)
Back up your configuration before beginning this procedure, if possible. Resetting the
configuration could include the IP addresses of network interfaces. For information on
backups, see Backups on page 270. For information on reconnecting to a FortiWeb
appliance whose network interface configuration was reset, see Connecting to the web
UI or CLI on page 100.
To delete your data from the appliance, connect to the CLI and enter this command:
execute formatlogdisk
To reset the appliances configuration, connect to the CLI and enter this command:
execute factoryreset
Alternatively, you can reset the appliances configuration to its default values for a
specific software version by restoring the firmware during a reboot (a clean install).
See Restoring firmware (clean install) on page 901.
l you are unable to connect to the FortiWeb appliance using the web UI or the CLI
l you want to install firmware without preserving any existing configuration (i.e. a cleaninstall)
l a firmware version that you want to install requires a different size of system partition (see the Release Notes
accompanying the firmware)
l a firmware version that you want to install requires that you format the boot device (see the Release Notes
accompanying the firmware)
Unlike updating firmware, restoring firmware re-images the boot device, including the signatures that were
current at the time that the firmware image file was created. Also, restoring firmware can only be done during a
boot interrupt, before network connectivity is available, and therefore requires a local console connection to
the CLI. It cannot be done through an SSH or Telnet connection.
Alternatively, if you cannot physically access the appliances local console connection,
connect the appliances local console port to a terminal server to which you have
network access. Once you have used a client to connect to the terminal server over the
network, you will be able to use the appliances local console through it. However, be
aware that from a remote location, you may not be able to power cycle the appliance if
abnormalities occur.
1. Download the firmware file from the Fortinet Technical Support web site:
https://support.fortinet.com/
2. Connect your management computer to the FortiWeb console port using a RJ-45-to-DB-9 serial cable or a
null-modem cable.
3. Initiate a local console connection from your management computer to the CLI of the FortiWeb appliance,
and log in as the admin administrator, or an administrator account whose access profile contains Read and
Write permissions in the Maintenance category.
For details, see Connecting to the web UI or CLI on page 100.
4. Connect port1 of the FortiWeb appliance directly or to the same subnet as a TFTP server.
5. Copy the new firmware image file to the root directory of the TFTP server.
6. If necessary, start your TFTP server. (If you do not have one, you can temporarily install and run one such as
tftpd (Windows, Mac OS X, or Linux) on your management computer.)
Because TFTP is not secure, and because it does not support authentication and
could allow anyone to have read and write access, you should only run it on trusted
administrator-only networks, never on computers directly connected to the Internet. If
possible, immediately turn off tftpd off when you are done.
7. Verify that the TFTP server is currently running, and that the FortiWeb appliance can reach the TFTP server.
To use the FortiWeb CLI to verify connectivity, enter the following command:
execute ping 192.168.1.168
You have only 3 seconds to press a key. If you do not press a key soon enough, the
FortiWeb appliance reboots and you must log in and repeat the execute reboot
command.
If you successfully interrupt the startup process, the following messages appears:
[G]: Get firmware image from TFTP server.
[F]: Format boot device.
[B]: Boot with backup firmware and set as default.
[Q]: Quit menu and continue to boot with default firmware.
[H]: Display this list of options.
Enter G,F,B,Q,or H:
11. If the firmware version requires that you first format the boot device before installing firmware, type F. Format
the boot disk before continuing.
12. Type G to get the firmware image from the TFTP server.
The following message appears:
Enter TFTP server address [192.168.1.168]:
13. Type the IP address of the TFTP server and press Enter.
The following message appears:
14. Type a temporary IP address that can be used by the FortiWeb appliance to connect to the TFTP server.
The following message appears:
Enter firmware image file name [image.out]:
15. Type the file name of the firmware image and press Enter.
The FortiWeb appliance downloads the firmware image file from the TFTP server and displays a message
similar to the following:
MAC:00219B8F0D94
###########################
If the download fails after the integrity check with the error message:
invalid compressed format (err=1)
but the firmware matches the integrity checksum on the Fortinet Technical
Support web site, try a different TFTP server.
16. Type D.
The FortiWeb appliance downloads the firmware image file from the TFTP server. The FortiWeb appliance
installs the firmware and restarts. The time required varies by the size of the file and the speed of your
network connection.
The FortiWeb appliance reverts the configuration to default values for that version of the firmware.
17. To verify that the firmware was successfully installed, log in to the CLI and type:
get system status
18. Either reconfigure the FortiWeb appliance or restore the configuration file. For details, see How to set up your
FortiWeb on page 83 and Restoring a previous configuration on page 275.
If you are downgrading the firmware to a previous version, and the settings are not
fully backwards compatible, the FortiWeb appliance may either remove incompatible
settings, or use the features default values for that version of the firmware. You may
need to reconfigure some settings.
Installing firmware replaces the current attack definitions with those included with the
firmware release that you are installing. After you install the new firmware, make sure
that your attack definitions are up-to-date. For more information, see Uploading
signature & geography-to-IP updates on page 201.
Communications between the FortiWeb appliance, clients, protected web servers, and FortiGuard Distribution
Network (FDN) require that any routers and firewalls between them permit specific protocols and port numbers.
The following tables list the default port assignments used by FortiWeb.
Protocol Purpose
25 TCP SMTP for alert email. See Configuring email settings on page
780.
123 UDP NTP synchronization. See Setting the system time & date on
page 124.
Protocol Purpose
162 UDP SNMP traps. See SNMP traps & queries on page 785.
Protocol Purpose
Protocol Purpose
These tables provide the maximum number of configuration objects and data analytics capacity for FortiWeb
products. They are not a guarantee of performance. For values such as hardware specifications that do not vary
by software version or configuration, see your models QuickStart Guide.
Due to resource constraints, the maximums for certain objects apply to each appliance globally and you cannot
increase them by adding ADOMs. The maximums for other objects apply at the ADOM level only, so you can add
objects beyond the maximum by adding ADOMs. For example, for a FortiWeb 1000D, you can configure up to
1024 URL Access polices for each of the 32 possible ADOMs because the limit applies to each ADOM, not the
appliance. However, because the limit for server policies is a global one that applies to the appliance, you can
configure only 256 server policies, regardless of how many ADOMs you use.
Depending on the RAMavailable, adding the maximum number of objects to multiple ADOMs can have an
impact on your FortiWeb's performance. Fortinet recommends that you do not add the maximum number of
objects in all ADOMs.
System
CA 255 N/A
Server Objects
System
Server Objects
Health Check
See Per appliance configuration maximums
Persistence
Predefined 2 N/A
Service
Custom 255 N/A
Application Delivery
Rule 255 10
Web Protection
Enabled main
classes: 64
Disabled sub-
classes: 255
Disabled signature
table: 2048
Signatures/Exceptions 64
Filter table: 32
Disabled False
Positive Mitigation
table: 255
Source IPv4/IPv6:
255
URL: 255
Signature main
class: 255
Signature sub-
class: 255
Signature: 10240
Custom Rule 1024
Custom signature:
1
Transaction
Timeout: 1
Response Code:
255
Content Type: 1
Packet Interval
Timeout: 1
Parameter: 255
Occurrence: 1
HTTPConstraints
255 32
Exception
DoS Protection
IP Reputation
Auto Learn
The maximum number of server policies initially varies by the maximum amount of virtual memory (vRAM)
available to FortiWeb-VM in VMware, up to a hard limit. FortiWeb-VM allows up to 20 policies for the first 1GB of
vRAM, then an additional 15 policies per additional 1GB of vRAM, up to a maximum of 150 server policies.
In other words, at first, the server policy limit increases linearly with vRAM. But after 10GB of vRAM, further
increasing the vRAM no longer has an affect. 11GB or more vRAM allows up to 150server policies. Keep in mind
that increasing the vRAM may still benefit performance.
The capability of each models hardware determines the capacity of the data analytics database.
l Max. Number Records per Table The maximum number of data records that each table in the data analytics
database can contain.
l Max. Number Tables The maximum number of database tables that the model can store.
l Max. Tables Searched per Query The maximum number of database tables that FortiWeb searches per
query.
Max. Tables
Max. Number Records per Max. Number
Model Searched per
Table Tables
Query
FortiWeb-VM 1,000,000 20 1
Max. Tables
Max. Number Records per Max. Number
Model Searched per
Table Tables
Query
This release of FortiWeb supports the following IETF RFCs, W3C standards, and IEEEstandards.
RFCs
l RFC 792
ICMP see reference 1, reference 2
l RFC 1213
Management Information Base for Network Management of TCP/IP-based internets: MIB-II see reference 1
l RFC 2548
Microsoft Vendor-specific RADIUS Attributes see reference 1
l RFC 2616
Hypertext Transfer Protocol -- HTTP/1.1 see reference 1, reference 2
l RFC 2617
HTTP Authentication: Basic and Digest Access Authentication see reference 1
l RFC 2665
Definitions of Managed Objects for the Ethernet-like Interface Types see reference 1
l RFC 2965
HTTP State Management Mechanism (HTTP sessions) see reference 1, reference 2
l RFC 4918
HTTP Extensions for Distributed Authoring and Versioning (WebDAV) see reference 1, reference 2
l RFC 5280
Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile see
reference 1, reference 2
l RFC 6176
Prohibiting Secure Sockets Layer (SSL) Version 2.0 By default, for reverse proxy mode, this is supported. To
enable violation of the RFC, see weak_enc and ssl-md5 settings in the config system global command
in the FortiWeb CLI Reference.
W3C standards
IEEE standards
Appendix D: Regularexpressions
Most FortiWeb features support regular expressions. Regular expressions are a powerful way of denoting all
possible forms of a string. They are very useful when trying to match text that comes in many variations but
follows a definite pattern, such as dynamic URLs or web page content.
Regular expressions can involve very computationally intensive evaluations. For best performance,
you should only use regular expressions where necessary, and build them with care. For information
on optimization, see Regular expression performance tips on page 826.
See also
Accurate regular expression syntax is vital for detecting different forms of the same attack, for rewriting all
but only the intended URLs, and for allowing normal traffic to pass (see Reducing false positives on page 837).
When configuring Regular Expression or similar settings, always use the >> (test) button to:
FortiWeb follows most Perl-compatible regular expression (PCRE) syntax. Popular FortiWeb regular expression
syntax on page 919 shows syntax and popular grammar examples. You can find additional examples with each
feature, such as Example: Sanitizing poisoned HTML on page 524.
For example, to match all strings that do not contain hamsters, you cannot
use:
!(hamsters)
You can, however, use inverse matching for specific character classes, such as:
[^A]
to match any string that contains any characters that are not the letter A.
Anything except Literal match, except if the Text: My cat catches things.
*.|^$?+\(){}[] character is part of a:
Regular expression: cat
l capture group
Matches: cat
l back-reference (e.g.$0 or \1)
l other regular expression token (e.g.\w) Depending on whether the feature
looks for all instances, it may also
match cat in the beginning of
catches.
Text: /url?parameterA=value1
\d Matches a decimal digit such as 9. Regular expression: \d
Matches: 1
Text: www.example.com
Regular expression: .*
Matches: www.example.com
Repeatedly matches the previous All of any text, except line endings
character or capture group, 0 or (\r and \n).
more times. Depending on its
combination with other special Text: www.example.com
characters, this token could be
* either: Regular expression: (w)*?
Text: www.example.com
Text: /url/app/app/mapp
Regular expression: (/app)*
Matches: /app/app
Creates a capture group or sub-pattern
for back-reference or to denote order of
Text:
() operations. See also Example: Inserting
/url?paramA=valueA¶mB=valueB
& deleting body text on page 527 and
What are back-references? on page 924. Regular expression: (param)A=
(value)A&\0B\1B
Matches:
paramA=valueA¶mB=valueB
Text: 1234567890
Regular expression: \d{3}
Quantifies the number of times the
Matches: 123
previous character or capture group
may be repeated continuously.
{} Text: www.example.com
To define a varying number
Regular expression: w{1,4}
repetitions, delimit it with a
comma. Matches: www
If the string were a typo such as ww
or wwww, it would also match that.
See also
Back-references are used whenever you want the output/interpretation to resemble the original match: they insert
a substring of the original matching text. Like other regular expression features, back-references help to ensure
that you do not have to maintain a large, cumbersome list of all possible URL or HTML permutations and their
variations or translations when using features such as custom attack signatures, rewriting, or auto-learning.
To invoke a substring, use $ n (0 <= n <= 9), where n is the order of appearance of capture group in the regular
expression, from left to right, from outside to inside, then from top to bottom.
(a)(b)(c(d))(e)
l would result in back-reference variables (e.g. $0) with the following values:
l $0 a
l $1 b
l $2 cd
l $3 d
l $4 e
Should you use $0 or /0 to refer back to a substring? Something else? That depends.
l /0 An earlier part in the current string, such as when you have a URL that repeats: (/(^/)*)/0/0/0/0
l $0 A part of the previous match string, such as when using part of the originally matched domain name to
rewrite the new domain name: $0\.example\.co\.jp where $0 contains www, ftp, or whichever prefix
matched the first capture group in the match test regular expression, (^.)*\.example\.com
l $+ The highest-numbered capture group of the previous match string: if the capture groups were numbered 0-9,
this would be equivalent to /9.
l $& The entire match string.
See also
Some elements occur often in FortiWeb regular expressions, such as expressions to match domain names,
URLs, parameters, and HTML tags. You can use these as building blocks for your own regular expressions.
For more expressions to match items such as SQL queries and URIs, see your
FortiWebs list of predefined data types.
(platform-independent)
(?i)\b.*\.(a(c|d|e(ro)?|f|g|i|m|n|o|q|r|s(ia)?|t|y|w|x|z)|b
(a|b|d|e|f|g|h|i(z)?|j|m|n|o|r|s|t|v|w|y|z)|c(a(t)?|c|d|f|g|h|i|k|l|m|n|o
((m)?(op)?)|r|s|u|v|x|y|z)|d(e|j|k|m|o|z)|e(c|du|e|g|h|r|s|t|u)|f
(i|j|k|m|o|r)|g(a|b|d|e|f|g|h|i|l|m|n|ov|p|q|r|s|t|u|w|y)|h
Any domain name (k|m|n|r|t|u)|i(d|e|l|m|n(fo)?(t)?|o|q|r|s|t)|j(e|m|o(bs)?|p)|k
(valid non-internationalized TLDs only; (e|g|h|i|m|n|p|r|w|y|z)|l(a|b|c|i|k|r|s|t|u|vy)|m
does not match domain names (a|c|d|e|g|h|il|k|l|m|n|o(bi)?|p|q|r|s|t|u(seum)?|v|w|x|y|z)|n(a
surrounded by letters or numbers) (me)?|c|e(t)?|f|g|i|l|o|p|r|u|z)|o(m|rg)|p(a|e|f|g|h|k|l|m|n|r
(o)?|s|t|w|y)|qa|r(e|o|s|u|w)|s
(a|b|c|d|e|g|h|i|j|k|l|m|n|o|r|s|t|u|v|y|z)|t(c|d|el|f|g|h|j|k|l|m|n|o|p|r
(avel)?|t|v|w|z)|u(a|g|k|s|y|z)|v(a|c|e|g|i|n|u)|w(f|s)|xxx|y(e|t|u)|z
(a|m|w))\b
\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|
Any IPv4 address [01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-
5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b
(e.g. #pageView or
?param1=valueA¶m2=value
B...; back-reference to this match does
not include the question/hash mark
itself)
See also
Language support
Features such as Recursive URL Decoding, input rules, and attack signatures can detect attacks and data leaks
even when multiple languages are used as an evasion technique.
When configuring FortiWeb, regardless of the display language (see Global web UI & CLI settings on page 73),
the simplest case is to configure with only US-ASCII characters. All features, including queries to external
servers, support it.
If you want to configure FortiWeb using another language/encoding, or support clients using another language or
multiple languages, sometimes characters such as , , symbols, and ideographs such as are valid input.
Support varies by the nature of the item being configured.
For example, by definition, host names cannot contain special characters. DNS standards predate many
standards for internationalization. Because of this, the web UI and CLI will reject input if it contains non-ASCII
encoded characters when configuring the host name. This means that languages other than English are not
supported unless encoded as an RFC 3490 international domain name (IDN) prefixed with xn--. However,
other configuration items, such as names and comments, often support the language of your choice.
To use your preferred languages in those cases, use an encoding that supports it.
l for regular expressions that must match HTTP requests, use the same encoding as your HTTP clients
l for other features, use UTF-8 encoding, or use only the characters whose encoded values are the same in UTF-8
(for example, US-ASCII characters are usually encoded using the same byte-wise values in ISO8859-1, Windows
code page 1252, Shift-JIS and others; however, ideographs such as may be garbled or interpreted as the wrong
character when viewed as another encoding)
HTTP clients may send requests in encodings that are not UTF-8. Encodings
vary by the clients operating system or input language.
If you input the configuration in English, the clients request may match
regardless of encoding: due to US-ASCII predating most other encodings, byte-
wise, the values for English characters tend to have identical numerical values in
many encoding types. For example, English words may be readable regardless of
interpreting a web page as either ISO 8859-1 or as GB2312.
For other languages (especially non-Latin alphabets such as Cyrillic and Thai),
match the clients encoding exactly.
For example, with Shift-JIS, backslashes (\) could be inadvertently interpreted as yen symbols () and vice
versa. A regular expression intended to match HTTP requests containing money values with a yen symbol
therefore may not work if the symbol is entered using the wrong encoding. Likewise, simplified Chinese
characters might only be understandable if the page is interpreted as GB2312. Test your expressions. If you enter
a regular expression using another encoding, or if an HTTP client sends a request in an encoding other than
UTF-8, remember that matches may not be what you initially expect.
Regular expressions are especially impacted. Matching engines on FortiWeb use the UTF-8 character
values. If you need to match multiple possible languages from clients, especially for attack signatures, make sure
you construct a regular expression that matches all alternative values.
For example, the Latin letter C is not encoded using the same byte-wise value as the similar-looking Cyrillic letter
. A human being can read a Spanish phrase written with that Cyrillic character, because they are visually
similar. But a regular expressions will not match unless written to match both numerical values: one for the Latin
character, and one for the Cyrillic look-alike (sometimes called a confusable).
To configure your FortiWeb appliance using other encodings, you may need to switch language settings on your
management computer, including for your web browser or Telnet/SSH client. For instructions on how to configure
your management computers operating system language, locale, or input method, see its documentation.
Similarly, your web browser or CLI client should usually interpret display output as
encoded using UTF-8. If it does not, your configured items may not display
correctly in the webUI or CLI. Exceptions include items such as regular
expressions that you may have configured using other encodings in order to
match the encoding of HTTP requests that the FortiWeb appliance receives.
See also
FortiGuard services can be purchased individually or in bundles. After you've registered your FortiWeb (see
Registering your FortiWeb), contact your reseller with the model of your FortiWeb and the services or bundled
you would like. Upon purchasing services from your reseller, you will receive the service registration document
by email which also includes the service in title and summary containing your contractor registration code.
Once you receive this document, please login to FortiNet Support at support.fortinet.com, to activate your
services. Here are the steps:
1. After logging to FortiNet Support, click Register/Renew (If you haven't yet registered your FortiWeb you can do
so here by entering the serial number).
2. Registration Code: If you have already registered your FortiWeb, continued by entering your Contract
Registration Code from the Service Entitlement Summary on the second page of your service registration
document. Go Next.
3. Registration Info: Choose the unit you would like to apply the service to. Go Next.
4. Agreement: Read and verify you agree to the terms and conditions of the service. Go Next.
5. Verification: Verify the product entitlement list features all services you wish for the time period you purchased (the
Activation Date and Expiration Date columns on the right). Click Confirm.
6. Complete: The registration is now complete.
You can take up to four hours for FortiWeb to receive the updated services and, from the FortiWeb Web UI, you
can click the Refresh button of License Information which is the check of the status and expiry date has been
updated (see Connecting to FortiGuard services).