I'm trying to get a message logged to /var/log/ufw.log
when blocking packets. It's all working very well, until I change the default behaviour for incoming connections.
I use ufw default allow incoming
to allow all incoming connections by default.
Then, I add ufw reject from <my-ip>
. However, nothing is logged.
I also tried using ufw deny from <my-ip>
. Same issue.
The file /etc/rsyslog.d/20-ufw.conf
is correctly configured. I've also tried changing the log level with ufw logging <level>
with low
, medium
and full
only to find that BLOCK messages are not logged. Every other message is correctly logged though (ALLOW and AUDIT).
Please help.