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

    DNSBL to Syslog?

    Scheduled Pinned Locked Moved pfBlockerNG
    3 Posts 2 Posters 530 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
      mlines
      last edited by

      Is there a way I can get my DNSBL events into a syslog server? I know that they are not part of the pfSense syslog but is there an option in pfBlockerNG itself, or has someone developed a work around to ship them periodically with a cron job or something similar?

      1 Reply Last reply Reply Quote 0
      • M
        mlines
        last edited by mlines

        So I worked out the following kludge using Email Reports to get the job. Hopefully in a future release there will be a real time syslog facility for pfBlockerNG - as it is this only reports on yesterday's DNSBL.log entries. Also, it appears that the new python option does not log the source of the DNSBL log entry - you have to revert to the old Unbound to get that in your reports.

        Using email reports, create a daily report to run at 1am with the following command:

        date -v-1d '+%b %-d' | grep -f /dev/stdin /var/log/pfblockerng/dnsbl.log | awk -F'[,]' '{ print $2,"DNSBL:",$7,"List:",$9,"URL:",$3, "Source:",$4}' | while read -r line; do echo "$line" | nc -w0 -u syslog_server 514 ; done

        1 Reply Last reply Reply Quote 0
        • NogBadTheBadN
          NogBadTheBad
          last edited by

          Use the cron package.

          Andy

          1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

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