Fortinet FortiWeb
UTMStack v12 collects Fortinet FortiWeb web application firewall logs through the UTMStack Forwarder, which the web interface calls the Collector. You enable the FortiWeb integration on a Collector, then create a syslog policy on the FortiWeb that points at that Collector. Nothing is installed on the FortiWeb.
Connection details
| Setting | Value |
|---|---|
| Card on the Integrations page | Fortiweb (category Firewall) |
| Data type | firewall-fortiweb |
| Default ports on the Collector | 7018/UDP; 7018/TCP (also used for TLS) |
| Log format UTMStack reads | FortiWeb's default key=value syslog format (attack, event and traffic logs) |
| Parsing pipeline | fortinet/fortiweb.yaml, version 2.4.0. Filters in the card's drawer opens it. |
| Detection rules | 10. Rules in the card's drawer opens them. |
Before you begin
A Collector must be installed and online. If you do not have one, see UTMStack Forwarder. One Collector can serve all your integrations.
The FortiWeb must reach the Collector host on the port you use. Open it on the Collector host and on any firewall in between.
You need the
integrations.writepermission to enable the integration from the web interface.
Step 1: Enable the integration on a Collector
- 1
- 2
Choose the Collector and protocol
Under Enable this integration remotely, select the Collector and the Protocol (UDP, TCP or TLS). Leave Port at the default it fills in.
- 3
Enable it
Click Enable integration. The panel then shows, for example,
Currently: enabled · udp · port 7018.
To do the same on the Collector host instead, run:
sudo /opt/utmstack-forwarder/utmstack_forwarder enable-integration firewall-fortiweb udpThe command prints the port the Collector really listens on, for example Integration "firewall-fortiweb" enabled on udp port 7018.
To use TLS, load a certificate on the Collector first. See UTMStack Forwarder.
Use a different port
For built-in integrations, the Collector always listens on the port saved on the Collector host. That is the default port unless you change it there. A different number typed in Port, or on the enable-integration command line, is not used. To use another port:
On the Collector host, change the saved port, for example:
sudo /opt/utmstack-forwarder/utmstack_forwarder change-port firewall-fortiweb udp 7118Use
tcpinstead ofudpfor TCP and TLS.In the Fortiweb card, type the same port in Port when you enable the integration. If it is already enabled, click Disable integration first, then enable it again with the new port. The panel shows the port you type there, not a value read from the Collector, so typing the same port keeps the two in step.
Use the new port in
set portin step 2.
Step 2: Configure FortiWeb to forward logs
On the FortiWeb, create a syslog policy pointing at the Collector host and turn on syslog logging. Run the following from the FortiWeb CLI, or use Log & Report > Log Policy > Syslog Policy in the web interface. Replace <collector-ip> with the address of the Collector host.
config log syslog-policy
edit "utmstack"
config syslog-server-list
edit 1
set server <collector-ip>
set port 7018
next
end
next
end
config log syslogd
set status enable
set policy "utmstack"
endThe setup guide in UTMStack fills in your UTMStack server's address in this step. Keep it only if the Collector runs on the UTMStack server; otherwise use the address of the Collector host.
Make sure the log types you need (Attack, Event, Traffic) are enabled to be sent to syslog under the Log & Report settings.
Newer FortiWeb versions also let you choose the protocol (
set proto udp,tcportls) and the format (set format) for each server in the list. Keep the format atdefault: the UTMStack pipeline reads FortiWeb's key=value format. Match the protocol to the one you enabled in step 1. See Fortinet's CLI reference for your FortiWeb version.
Step 3: Check that logs arrive
- 1
Open the logs
In the Fortiweb drawer, click View logs. Log Explorer opens with the
firewall-fortiwebdata type for the last 24 hours. You can also open Log Explorer, keep the data setlogsand choosefirewall-fortiwebas the data type. - 2
Check the parsed fields
Expand an event. Parsed events have standard fields such as
origin.ip,target.ip,actionandactionResult, and FortiWeb fields underlog.. The event should have noerrors. - 3
Check the data source
Within about 20 minutes, the FortiWeb appears on the Data Sources page under Direct, named after the address its logs come from.
To list the latest events and any processing errors, switch Log Explorer to SQL mode and run:
SELECT `@timestamp`, dataSource, errors, raw
FROM logs
WHERE dataType = 'firewall-fortiweb'
AND `@timestamp` > now() - INTERVAL 1 HOUR
ORDER BY `@timestamp` DESC
LIMIT 20Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| Nothing arrives | The Collector is offline, syslog is not turned on (config log syslogd), or the FortiWeb sends to the wrong address, port or protocol, or a firewall blocks the port. | Check that the Collector shows as online in the Collector list, that set status enable and the policy name are set, and that the Collector host allows the port in. See Forwarder Troubleshooting. |
| Nothing arrives, and the Forwarder guide filled in the UTMStack server's address | The FortiWeb sends to the UTMStack server, but the Collector runs on another host. | Set set server to the Collector host. |
| Only some log types arrive | Attack, event or traffic logs are not enabled for syslog. | Enable the log types under the Log & Report settings. |
| Events arrive but have almost no fields | The syslog server entry uses the CSV, JSON or CEF format. | Set the format to default. |
| Long attack messages are cut off | Over UDP, the Collector reads at most 2,048 bytes of each message. | Send over TCP or TLS if your FortiWeb version offers it. |
Stop collecting
In the Fortiweb card, select the same Collector and click Disable integration, or run on the Collector host, with the protocol you enabled (udp, tcp or tls):
sudo /opt/utmstack-forwarder/utmstack_forwarder disable-integration firewall-fortiweb udpThen turn off syslog on the FortiWeb (set status disable under config log syslogd).