FortiAnalyzer
FortiAnalyzer can receive logs and Windows host events directly from endpoints connected to EMS, and you can use FortiAnalyzer to analyze the logs and run reports.
HernandezA
Staff
Staff
Article Id 419569
Description This article describes the configuration steps to configure a log forwarding filter with a generic text filter and only forward logs of specific rules.
Scope FortiAnalyzer, FortiGate.
Solution

General information:

In this example, a FortiAnalyzer will be used to forward logs with a specific filter to another FortiAnalyzer; the procedure is similar when it is needed to forward to a different platform like SIEM (syslog, CEF, etc).

 

Topology -> FortiGate VM (Recording and sending logs) -> FortiAnalyzer (forwards logs with filter to a second FortiAnalyzer) -> FortiAnalyzer (Target).

 

Pre-requisites:

  • Logging FortiGate to FortiAnalyzer_1.
  • FortiAnalyzer_1 (White background) must reach FortiAnalyzer_2 (Dark background), and port 514 must be allowed in the network path.

 

FGTconnection.jpg

 

Test Rules:

 

TEST_rules.jpg

 

Configuration steps:

1st scenario:

The expected logs received in FortiAnalyzer_2 should be policies ID 0 (implicit), 2, 6, 7, and 8.

 

  1. In 'FortiAnalyzer_1', go to System Settings -> Advanced -> Log Forwarding -> Create new -> configure settings.
    In the configuration, the actions will show: Allow log forwarding to server Type: FortiAnalyzer (FortiAnalyzer_2), send logs only about device FortiGate-80E, and logs not equal to policyids 3, 4, and 5 means logs that remain to policies 0,2,6, 7, and 8 are going to be forwarded.

    FAZ_02LFWD_Rule.jpg

     

  2. Then select 'OK' and in FortiAnalyzer_2 will receive a notification to 'Authorize' the device in Device Manager and accept it.
                                                                     
    AcceptFAZlogging FAZ2.jpg

     

    after authorization.jpg

     

  3. Go to log View -> logs -> Fortinet Logs -> FortiGate and confirm the logs are being received in 'FortiAnalyzer_1' and confirm log rules received in 'FortiAnalyzer_2'.
                                                        
    FAZ01rules4_3_5Confirmed_reception.jpg

     FAZ02_Receivedlogs.jpg

     

  4. In case a double check is needed, it is possible to configure a filter in 'FortiAnalyzer_2', setting Policies were discarded in the log forward filter.
                                                          
    FAZ-2_logconfirmation_filter.jpg

     

2nd Scenario:

The expected logs received in 'FortiAnalyzer_2' should be policy IDs 4 and 5.

 

  1. In 'FortiAnalyzer_1', go to System Settings -> Advanced -> Log Forwarding -> Create new -> configure settings.
    In the configuration, the actions will show: Allow log forwarding to server Type: FortiAnalyzer (FortiAnalyzer_2), send logs only about device FortiGate-80E, and logs equal than policy IDs 4 and 5 means logs related to policies 0, 2, 3, 6, 7, and 8 are not going to be forwarded. 
                                                                                
    filter config.jpg

     

  2. Then select 'OK' and in 'FortiAnalyzer_2' will receive a notification to 'Authorize' the device in Device Manager and accept it.

  3. Go to log View -> logs -> Fortinet Logs -> FortiGate and confirm the logs are being received in FortiAnalyzer_1, and confirm log rules received in FortiAnalyzer_2.
                                                                                                            
    FAZ1Confirmationlogspolicy4and5.jpg

     

    FAZ2Confirmationpoliciesreceived.jpg

     

  4. In case a double check is needed, it is possible to configure a filter in 'FortiAnalyzer_2' setting Policies were discarded in the log forward filter.
                                                                                          
    FAZ02_doublecheck.png

     

Note: The generic text filter field can be validated by viewing in raw log option for the logs received and using the desired field. It is important to have the exact logical operator to be matched when more than 1 rule is configured (OR/AND).

 

change to raw.jpg

 

Related documents:

Configuring log forwarding
Technical Tip: Use of Operators in Event Handler General Filter (syntax)