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

    How do I configure SPAN for the WAN port?

    Scheduled Pinned Locked Moved General pfSense Questions
    15 Posts 3 Posters 592 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.
    • S
      stealthmode
      last edited by

      Hi,

      I have a SG2100, how would I configure SPAN for the WAN port? The WAN traffic needs to be mirrored out of from one of the switchports. I can't seem to find any definitive guide despite searching quite a bit. Please let me know, thank you

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

        You would need to add it to bridge and set the mirror port there. It would need to mirror to a VLAN so it can be set to a specific switch port on the LAN side.

        https://docs.netgate.com/pfsense/en/latest/bridges/create.html#span-port

        Steve

        S 1 Reply Last reply Reply Quote 0
        • S
          stealthmode @stephenw10
          last edited by stealthmode

          @stephenw10 Thank you, please correct my steps here:

          I am planning to send the spanned traffic to the LAN3 port.

          1. Interfaces > Assignment > VLANs > Create a new VLAN (group) on mvneta1. In my case, I added VLAN 3. Added the members as "3" as this belongs to LAN3.
          2. Interfaces > Switch > Remove "3" from the VLAN group 0
          3. Same place as above > add a new VLAN tag "3" and members as "3". Enabled "tagged" checkbox
          4. Interfaces > Assignment > Added a new interface with this VLAN. Calling "IF3". Should I enable promiscuous mode here?
          5. Go to Interfaces > Assignments > Bridges > Create a new bridge > Member interfaces "WAN". And under Span port, should this be "IF3"?

          please correct me, thank you

          Screenshot 2025-01-19 at 11 .14.22.jpg

          Screenshot 2025-01-19 at 11 .14.59.jpg

          Screenshot 2025-01-19 at 11 .15.29.jpg

          Screenshot 2025-01-19 at 11 .16.09.jpg

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

            In the switch config VLAN 3 should have members port 5 tagged and port 3 untagged. So: 5t, 3
            Unless you want the traffic to leave port 3 still tagged?

            S 1 Reply Last reply Reply Quote 0
            • S
              stealthmode @stephenw10
              last edited by

              @stephenw10 Yes, I would like the spanned traffic to be tagged with VLAN 3, so I'll set it as 3t,5t

              Screenshot 2025-01-19 at 11 .37.29.jpg

              Are there any issues with my bridge configuration or anything else?

              The bridge member interfaces is "WAN", and the SPAN port is set as "WANSPAN"

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

                Yes that looks correct.

                If you are tagging port 3 there is no need to set the PVID there but it also doesn't hurt having it set like that.

                S 1 Reply Last reply Reply Quote 0
                • S
                  stealthmode @stephenw10
                  last edited by

                  @stephenw10 Thank you, there appears to be some problem. To isolate the issue, I removed the tagging on the Interface > switch > vlan and reverted to just 3,5t

                  I started a packet capture on the interface mvneta1.3 and I do the WAN traffic as you can see:

                  Screenshot 2025-01-20 at 12 .18.54.jpg

                  I've connected LAN3 to a raspberry pi which I know is configured for sniffing traffic, and I have been able to see the actual traffic in the past. However, all I see are some STP packets, and BUM traffic, like in the screenshot here:

                  Screenshot 2025-01-20 at 12 .20.23.jpg

                  Screenshot 2025-01-20 at 12 .23.17.jpg

                  Do you have any ideas why might this be happening? (I know that the rpi is not an issue because just moments earlier I was capturing spanned traffic from another network and for testing purposes I've connected it to LAN3 on this netgate appliance)

                  BTW, I also tried to enable/disable promiscuous mode on mvneta1.3 but that had no effect unfortunately.

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

                    Hmm, if it makes it to the VLAN on mvneta1 I'd expect that switch config to work. Bridging and VLANs can be painful though.

                    If you run a pcap on mvneta1 directly and include vlans tagged packets do you see that mirrored traffic all tagged 3 correctly?

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      stealthmode @stephenw10
                      last edited by

                      @stephenw10 thank you for your reply. This is what I see:

                      Here's the VLAN config

                      Screenshot 2025-01-20 at 1 .26.49.jpg

                      Packet capture:

                      Screenshot 2025-01-20 at 1 .29.59.jpg

                      Screenshot 2025-01-20 at 1 .31.35.jpg

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

                        @stealthmode if you want to span your wan traffic - I would put a real switch that can do span between pfsense and where you connect it for your wan.

                        I run my wan through my switch just for this purpose. If I ever need to span this this traffic its as simple as turning it on in my switch.

                        You can pick up a smart switch that can do this for like 20-40 bucks. But I just run it through my main switch as a vlan.

                        cable modem - switch - wan pfsense.

                        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.8, 24.11

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

                          Yet you see nothing at port 3 still?

                          I wonder if the switch simply drops all that traffic because the MAC address of the connected device doesn't match any of it. That could be hard to workaround.... There is no setting in the switch we have access to that might allow it.
                          The only thing I could imagine working there would be some encapsulation between pfSense and end client . A gif tunnel perhaps. 🤔

                          S 1 Reply Last reply Reply Quote 0
                          • S
                            stealthmode @stephenw10
                            last edited by stealthmode

                            @stephenw10 I thought the same, which is why I removed the switch and connected it directly to the pi....

                            This pi is already configured correctly to sniff traffic, I was doing this in the past.

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

                              I mean the built-in switch in the 2100. It may ave some setting to allow it but we don't expose it. It may not even be accessible in the switch driver.

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                stealthmode @stephenw10
                                last edited by

                                @stephenw10 What does enabling promiscuous mode on that interface do in this case?

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

                                  Promiscuous mode would allow all traffic to pass on the local interface. But that doesn't help traffic pass through the switch. I would still expect to see broadcast traffic there though.

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