How can I log the iptables messages to a different log file?
Updated -
In this example, we will create a new logfile within the /var/log
directory called iptables.
Make a backup of /etc/syslog.conf
before making any changes to it.
# cp /etc/syslog.conf /etc/syslog.conf.bak
Edit /etc/syslog.conf
with an editor such as vi and add lines:
# comment iptables log
kern.warning ...
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.