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

    Find Lan device IP in WAN Interface Logs

    Scheduled Pinned Locked Moved General pfSense Questions
    16 Posts 4 Posters 1.3k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator @TomDD33
      last edited by johnpoz

      @tomdd33 look in your state table under diagnostics to what lan IP has open connections to specific IPs.

      For example if I wanted to see who has connections open to 8.8.8.8

      example.jpg

      But for ips, you prob want to run that on a lan side interface if your wanting to catch the lan side IPs info..

      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

      T 1 Reply Last reply Reply Quote 0
      • T
        TomDD33 @johnpoz
        last edited by

        @johnpoz

        I saw this setting before but this will list the current OPEN sessions between local devices and internet
        But my issue is regarding the ips that suricata blocked on wan interface as here only wan ip shown as "From" while i want to know the real lan device initiated this traffic ...

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

          @tomdd33 run your ips on your lan, if what your after is where clients might be going. Make little sense to run on wan, unless what your worried about is inbound traffic to your services you provide to the internet.

          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

          T 1 Reply Last reply Reply Quote 0
          • T
            TomDD33 @johnpoz
            last edited by

            @johnpoz

            I was trying to find solution other than activating suricata on many Lan interfaces as it will consume much ram and i have limited ram .. so activated it on wan to save ram ... But it will be weird to not able to find any kind of logs to show this detailed WAN LAN traffic !!

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

              @tomdd33 ips has no insight into what initiated the traffic when on wan. It only sees the packets leaving the wan.

              You could also log allowed traffic on the lan side, now the firewall will have a log of all outbound traffic from the lan - and you can see who went where, even after the state has gone away.

              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

              T 1 Reply Last reply Reply Quote 0
              • T
                TomDD33 @johnpoz
                last edited by

                @johnpoz

                I will try that .. thanks for the tip

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

                  @tomdd33 think of it this way.

                  If "someone" writes a letter in a house, and put its in an envelope for the mail man to pick up in their mailbox. While the mailman knows hey this letter is from this house 123 on Bourbon Street. And hey it says its from billy (the source port for example).. Does he really know who wrote the letter inside the house, maybe it was billys wife susan, or their son kevin..

                  The mailman only knows whats on the outside of the envelope..

                  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

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    TomDD33 @johnpoz
                    last edited by

                    @johnpoz

                    Yes i get what you clarify but my thoughts was that all these small transitions are under one big box which is pfsense core so i thought there might be some sort of logs for these transitions ... But of course suricata itself won't be able to determine that on its own from wan side

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

                      @tomdd33 what your asking might be possible looking at the big picture sure.. But then again the IPS is just a package running on pfsense. Its not actually "part" of pfsense.

                      Not like the info is not there - but the IPS would have to grab that info, say maybe from the state table - and then log that on its own so you could look in the ips and see it all correlated for you.

                      Maybe @bmeeks could chime in on such a feature.. He is the man when it comes to the ips packages on pfsense.

                      I know this subject has come up before - and the solution if you want to see who created traffic that ips alerts/blocks/etc you need to run the ips instance on the lan side.

                      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

                      T 1 Reply Last reply Reply Quote 1
                      • T
                        TomDD33 @johnpoz
                        last edited by

                        @johnpoz

                        Regarding logging traffic, what is the best way to do so ?

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

                          @tomdd33 if you want to see everything allowed, prob just easy to enable pass logging

                          log.jpg

                          Or you can just go into your interface rules and set whatever rule you have allowing traffic to actually log. By default when you create new rules they are not set to log.

                          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

                            Using ntop-ng will get you all the data you might want but if you're already RAM limited I wouldn't recommend that.

                            You can always export everything using netflow to external netflow server if you really want to log everything.

                            Steve

                            1 Reply Last reply Reply Quote 1
                            • bmeeksB
                              bmeeks
                              last edited by bmeeks

                              Since I was tagged in this thread, I'll take a second and repeat the description of how the IDS/IPS packages (Snort and Suricata) are plumbed up.

                              The packages receive inbound traffic directly from the NIC on an interface BEFORE that traffic hits the firewall. For outbound traffic on an interface, it's exactly the opposite. The IDS/IPS sees it after the firewall has processed it.

                              This really only matters when you run the IDS/IPS on the WAN. In that scenario the IDS/IPS will see inbound traffic BEFORE the firewall has processed it. So all the inbound destination IP addresses will be the WAN's public IP (assuming you are using NAT). For outbound traffic heading towards the Internet, the IDS/IPS will see all the source IP addresses as being the WAN's public IP (again, assuming NAT is in use) because by the time the IDS/IPS sees the traffic NAT has already been applied.

                              Thus, to see local network hosts show up in alerts with their native local IP, it is better to run the IDS/IPS on an internal firewall interface (LAN, DMZ, etc.). You really never need an instance on your WAN. The IDS/IPS is not to protect your firewall after all. If your firewall needs an IDS/IPS to protect it, perhaps you need to consider a different firewall ... 😊. When you run an instance on an internal interface, all traffic still must traverse the IDS/IPS in order to reach hosts hanging off that interface, so security is not reduced.

                              I have frequently shared these two diagrams that illustrate the traffic flow for both Legacy Blocking Mode and Inline IPS Mode.

                              ids-ips-network-flow-legacy-mode.png
                              ids-ips-network-flow-ips-mode.png

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

                                @bmeeks said in Find Lan device IP in WAN Interface Logs:

                                perhaps you need to consider a different firewall

                                This applies in another way to this thread. He states that his box doesn't have the resources to run on multiple interfaces.

                                So a bigger box that could do what he wants to do would solve the problem ;)

                                Another option would be to route downstream between his multiple networks, and just use a transit from this downstream router to pfsense where the IPS runs. Now it would see all traffic going to the internet, and only be on 1 interface.

                                Problem with that solution is you loose pfsense firewall ability between local networks unless you were running another instance of pfsense as the downstream router, and ips would not see any inter vlan traffic either. Just stuff going outbound..

                                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

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  TomDD33 @johnpoz
                                  last edited by

                                  @johnpoz

                                  I think bigger box would be fine .. keep in mind i virtualized pfsense vm on a server with 5GB of ram just for it anly 2 instances of suricata activated one on wan and other on one of my lan interfaces and that consumes about 3GB on normal and adding one more instance increase it to 4.5 and go to swap part :D

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