Log nftables: Difference between revisions

From Coolscript
Jump to navigation Jump to search
(Created page with "Log kernel message like nftables or iptables to a different log. Sample: <br> /etc/rsyslog.conf ############### #### RULES #### ############### # # First some standard...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
  ''':msg,regex,"IN=.*OUT=.*SRC=.*DST="      -/var/log/firewall.log'''
  ''':msg,regex,"IN=.*OUT=.*SRC=.*DST="      -/var/log/firewall.log'''
  '''& stop'''
  '''& 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

Latest revision as of 19:56, 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


  • 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