LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2005, 11:06 PM   #1
boozer_2
LQ Newbie
 
Registered: Mar 2005
Posts: 16

Rep: Reputation: 0
Question iptables and dmesg


Hello. This is my first time installing Linux. I got iptables set up with logging level 6. I also added kern.info to syslog.conf. Now, I get the iptables logs in my file that I want of /var/log/iptables, but the same logs also appear when I type dmesg. If I look at the dmesg in /var/log, it does not containg any of the iptable information. Is there a way to keep the iptables info from showing up when I type dmesg?

Thanks!
Ryan

kern.info -/var/log/iptables

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;kern.none /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* -/var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Everybody gets emergency messages
*.emerg *

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log

Last edited by boozer_2; 03-08-2005 at 11:14 PM.
 
Old 03-08-2005, 11:51 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi Ryan,

And welcome to LQ! :)


Not really, the output of the command dmesg is the content
of the kernels ring-buffer... if you log iptables messages, they
will show in the buffer ...


Cheers,
Tink
 
Old 03-09-2005, 05:28 PM   #3
boozer_2
LQ Newbie
 
Registered: Mar 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Is there a way to filter dmesg at all? I guess I need to know what the dmesg log in /var/log/dmesg is, and how does it compare to the dmesg command? I read that dmesg reads message from the kernel... so I assume that kernel messages are the only messages in dmesg? Is there any function or code to filter these? Is the dmesg logged somewhere by default? I guess if I'm worried about missing kernel messages because of iptables logs, i could just log all kernel info to a file and grep in or out ip tables log when appropriate. Just trying to determine if this is the standard way or not.

Thanks again!
Ryan
 
Old 03-09-2005, 05:33 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You wouldn't miss anything ... dmesg reads a BUFFER.
Anything that is in there is being written to the relevant
logs, e.g. /var/log/messages, /var/log/debug, /var/log/syslog,

/var/log/dmesg is just the status of dmesg when the box
reaches it's selected initial runlevel, 3 in my case.


Cheers,
Tink
 
Old 03-09-2005, 07:33 PM   #5
boozer_2
LQ Newbie
 
Registered: Mar 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks Tink!
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables logs still shows up in dmesg BlueKnight Linux - Networking 10 09-09-2004 05:23 AM
dmesg HELP oldi Slackware 7 07-17-2004 10:14 AM
/bin/dmesg > /dmesg-boot not Working in Knoppix 3.4 suguru Debian 2 07-04-2004 06:21 PM
iptables firewall seems to work but strange output in dmesg. ldp Linux - Networking 3 04-17-2004 03:00 PM
dmesg XPediTioN Slackware 22 07-17-2003 09:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:28 PM.

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