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

    How limit pflog size

    Firewalling
    3
    3
    1.3k
    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.
    • R
      reza.mnp
      last edited by

      how i can limit pflog size in /var/log path or rotate this file (clean this file)

      1 Reply Last reply Reply Quote 0
      • V
        vmz
        last edited by

        for clean and rotate, try to create a script like this and add it in cron

        #!/bin/sh
        DATE=date '+%d-%m-%Y'
        cp /var/log/pflog /var/log/pflog-$DATE
        :> /var/log/pflog

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

          That file isn't normally there, some change must have been made or package installed that changed the default behavior.

          Normally the pf log is written to /var/log/filter.log which is a binary circular log that can never grow in size.

          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.