Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-07-2003, 08:59 AM   #1
LQ Newbie
Registered: Nov 2002
Location: Delaware, USA
Distribution: Mandrake 9.0/8.2
Posts: 15

Rep: Reputation: 0
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
Old 02-07-2003, 10:22 AM   #2
Registered: Jan 2003
Posts: 195

Rep: Reputation: 30
You can always add

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

dmesg |grep -i "dropped"
I'll go see about redirecting the traffic for you, and come back.
Old 02-07-2003, 03:21 PM   #3
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48

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

Last edited by peter_robb; 02-07-2003 at 03:24 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to exclude DST=255.X.X.X from iptables log file johnnydangerous Fedora 2 04-01-2005 12:19 AM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
Changing IPtables log file fluff Linux - Networking 0 09-03-2003 04:37 AM
IPTables logging going to console not the log file arobinson74 Linux - Networking 2 04-01-2003 01:20 AM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration