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

    Logging IP packets to a PostgreSQL/MySQL database, compatable to ulog+iptables

    Scheduled Pinned Locked Moved Firewalling
    5 Posts 2 Posters 3.4k 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.
    • G
      Grub3
      last edited by

      Dear all,

      I am migrating my Iptables GNU/Linux firewall to pfSense.  ;D

      In GNU/Linux, I am using ulog to log IP packets to a PostgreSQL database.
      This is very interesting to keep trace of traffic for analysis of attacks.

      Does pfSense offer some kind of ulog for database logging?

      Kind regards,
      Grub3

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        I'm not familiar with that particular method, but it sounds like you want netflow (pfflowd, softflowd, etc).

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • G
          Grub3
          last edited by

          Interesting, I did not know netflow.
          This seems very traffic oriented.

          I am using ulogd for security and traceability.

          Ulogd allows logging of packets on request.
          This is done when programming firewalling rules.
          Some tools like fwbuilder supports ulogd by default.

          You can query the IP traffic using SQL queries, which is very convenient.

          ulogd:
          http://www.netfilter.org/projects/ulogd/index.html

          Kind regards,

          1 Reply Last reply Reply Quote 0
          • G
            Grub3
            last edited by

            Being said differently, how can log rejected packets without syslog.
            syslog is powerfull but too difficult to query.
            I would like to be able to query rejected packets very easily.

            Kind regards,

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              Syslog is the only way to do it out of the box. I'm not sure if anyone has a package out there that does what you're after.

              You could write your own daemon that attached to the pflog device and reads the data (or pipe it through tcpdump, check out how the current log is taken with tcpdump.) and then work that into your database however you like.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

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