Difference between revisions of "iptables logging on kubuntu with rsyslogd"

From thelinuxwiki
Jump to: navigation, search
(Created page with " == versions == kubuntu version 14 == problem == iptables is logging to /var/log/syslog, but we want it logging to a separate file. == solution == # create /etc/rsyslog.d/...")
 

Latest revision as of 15:30, 15 October 2014

versions

kubuntu version 14

problem

iptables is logging to /var/log/syslog, but we want it logging to a separate file.


solution

  1. create /etc/rsyslog.d/iptables.conf file with the following contents
:msg, contains, "iptables" -/var/log/iptables.log
& ~
  1. restart rsyslogd
/etc/init.d/rsyslogd restart
  1. verify functionality (you might need to generate some traffic to the host)
# tail -f /var/log/iptables.log