Log nftables

From Coolscript
Jump to navigation Jump to search

Log kernel message like nftables or iptables to a different log.

Sample:
/etc/rsyslog.conf

###############
#### RULES ####
###############
#
# First some standard log files.  Log by facility.
#

:msg,regex,"IN=.*OUT=.*SRC=.*DST="      -/var/log/firewall.log
& stop


  • Easiest way to logrotate is to add into /etc/logrotete.d/rsyslog
/var/log/firewall.log

Attention: don't forget to configure logrotate

Keys: firewall log iptables nft nftables