Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Howto filter Firewall log using regular expression

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 837 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rsaanon
      last edited by

      I have a few intefaces (eg: lan, wan, op1, opt2, ...). I can do simple filtering from the System Logs->Firewall and specify, for example, wan or lan to get filtered results. I can also do !lan (which will give me all but lan). However, here's what I would like to do: filter all, but opt1 and opt2. I tried a few combinations like: !(wan & lan), (!wan !lan), !(wan | lan), but none of them worked. How do I filter all interfaces except for the chosen ones?

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by stephenw10

        Just remove the spaces, so: !(wan|lan)

        Or (opt1|opt2) if those are the interfaces you want to see hits on.

        Steve

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.