This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Weekly Firewall Report with Rules hit counter (like ACL Counter on Cisco ASA)

Hello Sophos-Community,

 

is there any possibility to get an Report of "which Firewall Rules match how many times" like the hit counter on a Cisco ASA.

I'm using a Sophos SG105 (UTM 9.703-3)

 

Thank you very much :)

Best Regards,
Jonas



This thread was automatically locked due to age.
Parents
  • Hallo Jonas and welcome to the UTM Community!

    What you can do is have each rule log packets and then gather the info at the command line.  For example, the number of times each Allow rule has been hit this month would be:

    zgrep accept /var/log/packetfilter/2020/07/*|grep -oP 'fwrule=".*?"'|sort -n|uniq -c

    By the same token, you could see the drops with:

    zgrep drop /var/log/packetfilter/2020/07/*|grep -oP 'fwrule=".*?"'|sort -n|uniq -c

    You can also choose to log the automatic firewall rules.

    Note that this approach will balloon the size of the firewall log files, so I wouldn't leave logging activated for longer than to test your configuration.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hey Bob,

     

    thanks for that great and working answer!

    That works fine for me!

     

    Best greetings from Germany :)
    Jonas

Reply Children
No Data