Log nftables: Difference between revisions

From Coolscript
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:


Attention: don't forget to configure logrotate
Attention: don't forget to configure logrotate
Keys: firewall log iptables nft nftables

Revision as of 19:47, 12 November 2022

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


Attention: don't forget to configure logrotate

Keys: firewall log iptables nft nftables