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

    Record source/destination ip/port

    Scheduled Pinned Locked Moved Firewalling
    5 Posts 2 Posters 1.5k 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.
    • M
      m.roshani
      last edited by

      Hi,
      First of all, thank you for this great full-featured and powerful software.

      I have a bunch of LAN users behind a pfsense firewall which are SNATed to several public IPs.
      Now, I want to record  which source IP/port has been connected to which remote IP/port in what times.
      I want to do this in the most efficient way. What options can I have?

      Thank you for any comments.

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

        source natted?

        You mean your clients lan IP 192.168.a.b looks like 1 of your public IPs when talks to say pfsense.org – ok really wouldn't call that a source nat, that would normally be referred to as outbound nat.

        As to logging all the connections.. I would send your pfsense firewall logs to a syslog server and setup your firewall rules to log the traffic you want to see.

        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 0
        • M
          m.roshani
          last edited by

          johnpoz,
          thanks for quick reply.

          Yes I mean outbound NAT.
          OK I will check and set it up and report the serious problems here.

          Thanks.

          1 Reply Last reply Reply Quote 0
          • M
            m.roshani
            last edited by

            Hi,

            The syslog server is installed and now it is receiving logs of some pfsense firewall rules.
            Is it possible to log outbound NAT matchings?

            Thank you.

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

              you want to log ever single nat session?  Why would you not just log the firewall rules.. That shows you what private IP:port is going to what publicIP:port - why would you need to log the napt port that pfsense uses on its public side for the conversation that it allows?

              So for example you have this

              client 192.168.1.100:4567 –-> 1.2.3.4:80 pfsense publicIP:7890 ---> 1.2.3.4:80

              I would think you want want to know that
              client 192.168.1.100 went to 1.2.3.4:80, and from the log you would see the source port your client used.. But why would you need to log that pfsense changed that port when it natted it to :7890??

              Am I not understanding something here?

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