6

I happen to find out that syslog.1 takes 27 Gb and the logs in it have been inserted by the firewall ufw. How can I disable or reduce logging that much stuff into syslog by ufw?

Kolayn
  • 63
  • 1
  • 1
  • 4

1 Answers1

7

Ubuntu's Community Help Wiki page on UFW has information on toggling logging if you'd like to disable it completely. The man page on UFW has much better information on it, which provides more advanced options for log levels.

The quick workaround is to use the command ufw logging off to eliminate ufw logging entirely (might or might not fulfill your wishes).

KolonUK
  • 219
  • 1
  • 9
  • I'm guessing that running "ufw logging off" only works until next reboot (don't have a system available to test...) – KolonUK Jan 17 '23 at 09:55
  • @KolonUK, it seems to survive reboots. The option `LOGLEVEL=off` in `/etc/ufw/ufw.conf` seems to not have an effect for some reason, even with a current version at the time of this comment. – Sam Sirry Mar 18 '23 at 11:32
  • I just installed ufw and the conf file has this comment: `# Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'.` This suggests we're not supposed to edit the `LOGLEVEL` setting directly. – thdoan Aug 27 '23 at 11:02