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

    Application filtering

    Off-Topic & Non-Support Discussion
    6
    10
    3.6k
    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.
    • T
      techbee
      last edited by

      is there an application filtering with pfsense?

      1 Reply Last reply Reply Quote 0
      • H
        heper
        last edited by

        Not as far as I know. L7 filtering has been Broken for a long long time.

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          Define what you consider application filtering..

          While L7 or DPI (deep packet inspection) to determine the type of traffic and then block that then helper is right.

          But if you want to block say outbound smtp, which is application that uses tcp 25, you can filter that.  Or if you wanted to block dns which is on 53 you could block that, etc.

          What exactly are you looking to accomplish?

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • A
            AR15USR
            last edited by

            Johnpoz, is there any plans in the future to have L7 or DPI filtering fixed/implemented?


            2.6.0-RELEASE

            1 Reply Last reply Reply Quote 0
            • T
              techbee
              last edited by

              I am trying to block any vpn traffic going in and out.  I searched google and it gave me sophos. but since im using pfsense, i just want to do it with pfsense.

              1 Reply Last reply Reply Quote 0
              • K
                kpa
                last edited by

                As a starter you could block outgoing connections to port 1194 but that won't block VPNs that use some other port than the officially allocated OpenVPN port 1194.  If that is not enough for you I'm afraid pfSense won't be able to do much more. The PF packet filter is a strict layer 3 filter and inspects only the IP header information in packets, the data payload where the interesting information about for example the VPN protocol used might be found is not available for the filter rules.

                There was an L7 filtering option in pfSense (what the other guys are referring to) that used an external helper to analyse the application level data in packets but the implementation was deemed unsatisfactory and it was axed.

                1 Reply Last reply Reply Quote 0
                • H
                  heper
                  last edited by

                  I've read that their might be a possibility to use ntopng's nDPI to mark packets. But i'm unsure if pf has the option to mark/match packets in such a way

                  1 Reply Last reply Reply Quote 0
                  • K
                    kpa
                    last edited by

                    PF doesn't have an API for external filters/helpers so it's not possible to get the analyzed traffic "fed" back to PF and continue the normal filtering process as if the traffic just arrived. There are of course some serious performance considerations for such an API, the helpers if allowed would have to run in kernel space because the filtering happens in interrupt context where every CPU cycle is precious so you can't allow the helpers to do whatever they want. This is probably why IPtables for example only allows simple pattern matching on the data payload and not much else.

                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      If what your looking to do is block vpn.. Why can you not just do that with snort or suricata?  I would think those could detect the different vpn signatures of the traffic..

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                      1 Reply Last reply Reply Quote 0
                      • ?
                        Guest
                        last edited by

                        @johnpoz:

                        If what your looking to do is block vpn.. Why can you not just do that with snort or suricata?  I would think those could detect the different vpn signatures of the traffic..

                        You are right this could be perhaps done with snort and app-detect.rules (OpenAppID Application Rules)

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