↑ ↓ select, Enter open, Esc close

Enable ufw logging

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
root@server
ufw logging low

Sets the ufw logging level: off, low, medium, high or full. At low, blocked packets that match no rule are logged, while the higher levels produce many more entries. The messages carry the prefix [UFW BLOCK] and go to the kernel log, and with rsyslog also to /var/log/ufw.log.

Note: medium and higher can make the log grow very quickly on heavily attacked servers.

Also searched as

  • enable ufw logging
  • ufw log blocked packets
  • ufw logging levels

Related one-liners

All in Firewall

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.