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

    Notification when a connection is established

    Scheduled Pinned Locked Moved General pfSense Questions
    25 Posts 7 Posters 2.8k 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.
    • JKnottJ
      JKnott @Gertjan
      last edited by

      @Gertjan said in Notification when a connection is established:

      I know, really public web cams exist. But imagine : these can be hit by really a lot of IP's (hit by a robot ?)

      Security cameras are not just put on a network by themselves. There is a recorder, which the cameras connect to. Those cameras should be on their own network, with only the recorder reachable from elsewhere. Many recorders will have 2 network connections for that reason.

      PfSense running on Qotom mini PC
      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
      UniFi AC-Lite access point

      I haven't lost my mind. It's around here...somewhere...

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @JKnott
        last edited by

        @JKnott said in Notification when a connection is established:

        There is a recorder, which the cameras connect to

        That's what I use : a stack of big boxes ( [these](https://www.dahuasecurity.com/products/productDetail/28297 - sorry for the publicity) ) with all the cameras and screens connected to it.
        But a typical SOHO camera these days has a Wifi interface, and are used as a local LAN autonomous device.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • NollipfSenseN
          NollipfSense
          last edited by

          I have four Hikvision cameras on my network; so, I was looking at them to see whether the camera could notify...the events doesn't cover network access...only what the camera sees. Also, any robust firewall setup would not include access to LAN without the LAN device initiates the contact.

          pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
          pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

          M 1 Reply Last reply Reply Quote 0
          • M
            mikeisfly @NollipfSense
            last edited by

            @NollipfSense what about a port forward. If you set that up then the camera will accept connection from the outside provided you have a strong username and password at the end device. Again I'm just looking for a particular functionality pfSense.

            NollipfSenseN bmeeksB 2 Replies Last reply Reply Quote 0
            • NollipfSenseN
              NollipfSense @mikeisfly
              last edited by

              @mikeisfly Port forward would work if your intent is to give a few accesses to the camera...you might able to may be use Radius and script to email you when that happens. If the intent is to see whether anyone access the camera from the outside well a robust firewall would not allow that.

              pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
              pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

              1 Reply Last reply Reply Quote 0
              • bmeeksB
                bmeeks @mikeisfly
                last edited by bmeeks

                @mikeisfly said in Notification when a connection is established:

                Again I'm just looking for a particular functionality pfSense.

                There is no such built-in functionality within pfSense (nor any other firewall that I am aware of). The way to do this is to send all logs to an external server or SIEM and then parse the logs there and fire alerts on specific traffic from tools on that external server.

                There are many options in the external logging and SIEM world from free to $100,000 USD and more.

                M Raffi_R 2 Replies Last reply Reply Quote 1
                • M
                  mikeisfly @bmeeks
                  last edited by

                  @bmeeks said in Notification when a connection is established:

                  @mikeisfly said in Notification when a connection is established:

                  Again I'm just looking for a particular functionality pfSense.

                  There is no such built-in functionality within pfSense (nor any other firewall that I am aware of). The way to do this is to send all logs to an external server or SIEM and then parse the logs there and fire alerts on specific traffic from tools on that external server.

                  There are many options in the external logging and SIEM world from free to $100,000 USD and more.

                  Thank you. Maybe this is something the development team may want to look at to make the product stand out even more. Not sure who is looking for the feature but it occurred to me a few weeks ago, that it would be nice to have.

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

                    So like an alert-on-match option maybe?

                    This is the first time I've seen it requested so there may not be much drive but I could see that being useful.

                    Steve

                    M 1 Reply Last reply Reply Quote 1
                    • M
                      mikeisfly @stephenw10
                      last edited by

                      @stephenw10 said in Notification when a connection is established:

                      So like an alert-on-match option maybe?

                      This is the first time I've seen it requested so there may not be much drive but I could see that being useful.

                      Steve

                      Yes, that would be awesome.

                      1 Reply Last reply Reply Quote 0
                      • Raffi_R
                        Raffi_ @bmeeks
                        last edited by

                        @bmeeks said in Notification when a connection is established:

                        @mikeisfly said in Notification when a connection is established:

                        Again I'm just looking for a particular functionality pfSense.

                        There is no such built-in functionality within pfSense (nor any other firewall that I am aware of). The way to do this is to send all logs to an external server or SIEM and then parse the logs there and fire alerts on specific traffic from tools on that external server.

                        There are many options in the external logging and SIEM world from free to $100,000 USD and more.

                        +1 on what Bill said. I can personally recommend an ELK setup which you can send the pfSense logs to. I believe you can then setup alerts on a particular event. ELK is free and can be easily setup on Linux since it's very well documented (even I was able to do it). I've never used ELK for alerting, but I might eventually. Right now it's only for super fast log searches and nice visuals to quickly see things.

                        M 1 Reply Last reply Reply Quote 0
                        • NollipfSenseN
                          NollipfSense @mikeisfly
                          last edited by

                          @mikeisfly said in Notification when a connection is established:

                          Maybe this is something the development team may want to look at to make the product stand out even more.

                          I can see this been useful on the camera as part of the camera's event monitoring...just not on a firewall. The day I get that notification is the day the firewall goes in the trash bin. I even block my cameras from going out to check for firmware update.

                          pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                          pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            mikeisfly @NollipfSense
                            last edited by

                            @NollipfSense said in Notification when a connection is established:

                            @mikeisfly said in Notification when a connection is established:

                            Maybe this is something the development team may want to look at to make the product stand out even more.

                            I can see this been useful on the camera as part of the camera's event monitoring...just not on a firewall. The day I get that notification is the day the firewall goes in the trash bin. I even block my cameras from going out to check for firmware update.

                            Not sure why getting a notification about a event that happened from a connection you explicitly allowed would be a bad thing? I'm looking for this functionality as more of a tracking tool. Like with any service the development team might implement you don't have to use it.

                            NollipfSenseN bmeeksB 2 Replies Last reply Reply Quote 0
                            • M
                              mikeisfly @Raffi_
                              last edited by

                              @Raffi_ said in Notification when a connection is established:

                              @bmeeks said in Notification when a connection is established:

                              @mikeisfly said in Notification when a connection is established:

                              Again I'm just looking for a particular functionality pfSense.

                              There is no such built-in functionality within pfSense (nor any other firewall that I am aware of). The way to do this is to send all logs to an external server or SIEM and then parse the logs there and fire alerts on specific traffic from tools on that external server.

                              There are many options in the external logging and SIEM world from free to $100,000 USD and more.

                              +1 on what Bill said. I can personally recommend an ELK setup which you can send the pfSense logs to. I believe you can then setup alerts on a particular event. ELK is free and can be easily setup on Linux since it's very well documented (even I was able to do it). I've never used ELK for alerting, but I might eventually. Right now it's only for super fast log searches and nice visuals to quickly see things.

                              Thanks for the suggestion.

                              1 Reply Last reply Reply Quote 0
                              • NollipfSenseN
                                NollipfSense @mikeisfly
                                last edited by NollipfSense

                                @mikeisfly said in Notification when a connection is established:

                                @NollipfSense said in Notification when a connection is established:

                                @mikeisfly said in Notification when a connection is established:

                                Maybe this is something the development team may want to look at to make the product stand out even more.

                                I can see this been useful on the camera as part of the camera's event monitoring...just not on a firewall. The day I get that notification is the day the firewall goes in the trash bin. I even block my cameras from going out to check for firmware update.

                                Not sure why getting a notification about a event that happened from a connection you explicitly allowed would be a bad thing? I'm looking for this functionality as more of a tracking tool. Like with any service the development team might implement you don't have to use it.

                                Okay, got you!

                                pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                                pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

                                1 Reply Last reply Reply Quote 0
                                • bmeeksB
                                  bmeeks @mikeisfly
                                  last edited by bmeeks

                                  @mikeisfly said in Notification when a connection is established:

                                  Not sure why getting a notification about a event that happened from a connection you explicitly allowed would be a bad thing? I'm looking for this functionality as more of a tracking tool. Like with any service the development team might implement you don't have to use it.

                                  I think some of the responders in this thread initially misunderstood what you wanted. You just want to know when the camera accepts an allowed connection.

                                  I think this type of notification should be something the endpoint device (the camera in this case) does rather than the firewall. You really want the firewall concentrated on watching traffic and processing packets as fast and efficiently as possible so as to maximize security and throughput. If you give the firewall a lot ancilary tasks that instead really should be something a SIEM or the endpoint device handles, then you start to load the firewall up with a lot of baggage. That is bad for two reasons. First, the extra code and associated libraries just provide a larger attack surface; and second, a firewall busy analyzing logs and sending email notifications runs out of time slices to handle packets efficiently and so throughput suffers.

                                  There is a reason that the big commerical vendors do this type of stuff either with their own separate external tool (Checkpoint's SmartCenter, for example) or refer their users to the various SIEM tools out there (ArcSight being a biggie in the commercial market).

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    mikeisfly @bmeeks
                                    last edited by

                                    @bmeeks said in Notification when a connection is established:

                                    @mikeisfly said in Notification when a connection is established:

                                    Not sure why getting a notification about a event that happened from a connection you explicitly allowed would be a bad thing? I'm looking for this functionality as more of a tracking tool. Like with any service the development team might implement you don't have to use it.

                                    I think some of the responders in this thread initially misunderstood what you wanted. You just want to know when the camera accepts an allowed connection.

                                    I think this type of notification should be something the endpoint device (the camera in this case) does rather than the firewall. You really want the firewall concentrated on watching traffic and processing packets as fast and efficiently as possible so as to maximize security and throughput. If you give the firewall a lot ancilary tasks that instead really should be something a SIEM or the endpoint device handles, then you start to load the firewall up with a lot of baggage. That is bad for two reasons. First, the extra code and associated libraries just provide a larger attack surface; and second, a firewall busy analyzing logs and sending email notifications runs out of time slices to handle packets efficiently and so throughput suffers.

                                    There is a reason that the big commerical vendors do this type of stuff either with their own separate external tool (Checkpoint's SmartCenter, for example) or refer their users to the various SIEM tools out there (ArcSight being a biggie in the commercial market).

                                    I get your point, and your point is well made. I can see if you are tracking thousands of connections 24/7. I more or less wanted to prove that this software company I was dealing with never attempted to access the camera I gave them access too, on the flip side if they did access the camera I would monitor the connection and when they were done I would shut down the port forward that I created. In general I thought it might be a good idea for trouble shooting kind of like a debug or a packet capture. While you wouldn't run it 24/7 because of the resource drain it could provide a good trouble shooting tool. Like a SNMP trap on a TCP connection.

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

                                      Mmm, it would have to be limited in some way because you could easily end up sending thousands of emails.

                                      I could imagine situations where it might be useful.

                                      1 Reply Last reply Reply Quote 0
                                      • GertjanG
                                        Gertjan @mikeisfly
                                        last edited by

                                        @mikeisfly said in Notification when a connection is established:

                                        or a packet capture.

                                        Check a build-up of of such a packet.
                                        You will have your router's MAC (= pfSense), the cameras MAC, the cameras's LAN IP and the IP (WAN IP) of the visitor.
                                        Not the payload, as it is all TLS these days (well, the camera should send over TLS, other scrap it).
                                        At most, you could see who - from the outside world - visited your device. If it isn't recording, as you can check using the same access time, then you will not know what they saw.

                                        Btw : One of world's most famous and most used free programs, fail2ban, can do what you want right out of the box.Comparable programs exists.

                                        Btw : my DVR's - see above - logs user access by login code ... everything is already there.

                                        No "help me" PM's please. Use the forum, the community will thank you.
                                        Edit : and where are the logs ??

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