(Ubuntu 14.04 x86)

I have enabled ufw and enabled logging (level low - the default). Even on low there is an entry about every second (it is accessible from the Internet - I guess just port scans trying their luck).

My concern is: the log file could grow over time taking up disk space I would rather have for other things. I could find no mention of what it is limited to in ufw's man pages - is it limited? How can I limit it? More generally what strategy does Linux use for limiting logs such as syslog?

share|improve this question

There is separate daemon called logrotated that take care about rotating and deleting old logs. You should have config file for ufw in /etc/logrotate.d/ufw

$ cat /etc/logrotate.d/ufw
/var/log/ufw.log
{
    rotate 4
    weekly
    missingok
    notifempty
    compress
    delaycompress
    sharedscripts
    postrotate
        invoke-rc.d rsyslog reload >/dev/null 2>&1 || true
    endscript
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.