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

    Can pfSense/Package monitor a single LAN port?

    Scheduled Pinned Locked Moved General pfSense Questions
    9 Posts 3 Posters 822 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.
    • P
      pf.Beginner
      last edited by

      I have a Arduino board plugged into one of my router’s LAN ports as part of an ongoing project. I would like to get the source IP of each packet sent to this device.

      Is there a way to do this using the capabilities of pfSense or an add-on package?

      I can do this purely in the Arduino, but I would prefer to do it on the network-monitoring level if possible, so as to save programming overhead in the Arduino.

      Does anyone know of a simple way to do this? I briefly looked into Suricata, but it seems somewhat intimidating and I’m not sure if it would be a good fit for this simple task.

      JKnottJ 1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott @pf.Beginner
        last edited by

        @pf-beginner

        Not for packets that originate on the LAN. Only packets that pass through pfsense can be captured with Packet Capture. What you need is a managed switch with port mirroring, or you could set up a data tap.

        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...

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

          Doesn't seem like he wants to packet capture.. Just log the source IP, but @jknot is correct you wouldn't be able to capture or log traffic that doesn't flow through pfsense.

          Is all source to this IP going to have to be routed through pfsense? If so then be simple enough to log it via the firewall rules that you allow traffic to the device with.

          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

          P 1 Reply Last reply Reply Quote 0
          • P
            pf.Beginner
            last edited by

            @jknott For several months now, I've been planning on swapping my isp router for a pfSense box. The pfSense will sit behind a modem that will handle the actual internet connection. The modem has no routing capacity, so I would be relying on the pfSense to do the routing.

            The Arduino will be getting packets from the LAN, but eventually I will also be setting it up so that it is accessible from the WAN as well.

            Thanks for mentioning Packet Capture. I will look into this in more detail. Are there any other packages that provide similar functionality that would be worth looking into?

            JKnottJ 1 Reply Last reply Reply Quote 0
            • P
              pf.Beginner @johnpoz
              last edited by

              @johnpoz said in Can pfSense/Package monitor a single LAN port?:

              Is all source to this IP going to have to be routed through pfsense? If so then be simple enough to log it via the firewall rules that you allow traffic to the device with.

              Yes, once I upgrade my router to the pfSense box all traffic will be processed by pfSense.

              The firewall log seems like the solution I was looking for-- thanks @johnpoz

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

                @pf-beginner only concern with the logging - is you can not keep logs going back forever on pfsense..

                While there has been some improvements in rotation and keeping of logs, etc. If you want to keep logs going back X days, or weeks or even months/years your going to want to offload these logs to something for long term storage.

                here is example - I don't care to keep logs going back x number days.. As long as have current for the last 24 hours or so I am fine.. So for example here is IP that have recently accessed my plex server, either being my users IPs, or the status checks I do from outside that test if my plex is up. Or the check plex does now and then to validate remote access is available when you enable that..

                example.jpg

                Here are example of like the uptime robot check, and the other one is plex checking that its remote available when you enable that - it checks now and then..

                these.jpg

                If your interest is long term storage and easy access to these logs - your going to want to look into sending them to a syslog.

                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

                P 1 Reply Last reply Reply Quote 0
                • JKnottJ
                  JKnott @pf.Beginner
                  last edited by

                  @pf-beginner said in Can pfSense/Package monitor a single LAN port?:

                  Are there any other packages that provide similar functionality that would be worth looking into?

                  I like to use Wireshark. Even with Packet Capture, I prefer to download the captures to analyze them in Wireshark.

                  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...

                  1 Reply Last reply Reply Quote 0
                  • P
                    pf.Beginner @johnpoz
                    last edited by

                    @johnpoz said in Can pfSense/Package monitor a single LAN port?:

                    If your interest is long term storage and easy access to these logs - your going to want to look into sending them to a syslog.

                    As a starting point, I was considering a daily download of information. I will look into writing a script that could automate the process.

                    @JKnott I will compare the info provided by the firewall logs and the packet capture and see if there is anything in the packet capture that is of particular interest.

                    Thanks, @johnpoz and @JKnott for your help!

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

                      What are you looking for exactly? If all you want to know is the source IP, log is fine - if you actually want to look at the payload of what is sent and received you would want a packet capture... Long term storage of packet captures is not all that simple..

                      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
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.