LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   iptables log file (https://www.linuxquestions.org/questions/linux-general-1/iptables-log-file-44456/)

Anjo 02-07-2003 08:59 AM

iptables log file
 
Can someone tell me if its possible and how to specify a different log file for iptables to send its info on filtered packets? Its somewhat difficult to use 'dmesg' or read /var/log/messages for other things when there are a bunch of dropped packet messages. Thanks

Wolven 02-07-2003 10:22 AM

You can always add

[i] | grep -i "dropped"[/]
to the end.

Example:
dmesg |grep -i "dropped"
I'll go see about redirecting the traffic for you, and come back.

peter_robb 02-07-2003 03:21 PM

Sure..

Change the -j LOG rules to add
--log-level 6 --log-prefix "words of your choice "
***notice the space between the end of the 'comment' and the final " ***

Then in /etc/syslog.conf, add the following line
kern.=info /var/log/info
and change the line "*.info;mail.none;etc /var/log/messages" to read
*.info;kern.!=info;mail.none;etc /var/log/messages
then restart syslog

This will stop putting the -j LOG messages into /var/log/messages and put them into /var/log/info


All times are GMT -5. The time now is 11:38 PM.