Skip to main content
live89
Explorer III
Aug 20, 2019 7:20 AM UTC
Question

Policy Counter not working

Hi

 

Fortigate 800D

v5.6.4

 

Configuration:

 

External Public IP addresses range in configured as a secondary range on one of the fortigate interfaces.

We took one IP from that range and configured it as a Virtual Server LB to 4 internal servers exists behind another interface.

See topology attached.

 

Then we configured 2 policies:

1- from interface 1 to interface 2 to IP 2.2.2.1. (2.2.2.1 as IP address object , NOT virtual server)

2- from interface 2 to interface 3 to the virtual server 2.2.2.1

 

we see counter/policy hits on policy number 2

but we don't see counter/policy hits on policy number 1

 

we thought at first that we don't need policy 1 , but after deleting it , no one was able to connect to the virtual server.

 

So policy 1 is necessary but it is not showing counter and no logs showing in fortianalyzer/diag debug regading policy 1

 

should the counter work and maybe this is a bug ?

or it should not work ...

 

Can anyone explain this to me ?

 

Thanks

 

 

    6 replies

    OneOfUs
    New Member
    Aug 21, 2019 12:51 PM UTC

    Verify you have "All Sessions" logged on the policy

     

    From the CLI:

    diagnose sys session filter policy <policy id>

    diagnose sys session list

     

    If sessions open indefinitely they will not show up in the logs, you can force the sessions to close by using:

    diagnose sys session clear

     

    However, make sure you have a filter set otherwise you will clear all sessions.

     

     

    live89
    live89Author
    Explorer III
    Aug 21, 2019 1:01 PM UTC

    Hi,

     

    The log is set to log all session.

    And regarding the diagnose command it shows total session 0

     

    FGT1 # diagnose sys session list
    total session 0
    OneOfUs
    New Member
    Aug 21, 2019 1:17 PM UTC

    Run this using the source IP address you are testing connections from and it should help you identify which policies the traffic is hitting:

     

    diagnose debug reset diagnose debug enable diagnose debug flow show console enable diagnose debug flow filter addr <source ip> diagnose debug flow trace start 100 To stop the debug: diagnose debug disable diagnose debug reset

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT