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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-08-2005, 11:06 PM
|
#1
|
LQ Newbie
Registered: Mar 2005
Posts: 16
Rep:
|
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.
|
|
|
03-08-2005, 11:51 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
03-09-2005, 05:28 PM
|
#3
|
LQ Newbie
Registered: Mar 2005
Posts: 16
Original Poster
Rep:
|
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
|
|
|
03-09-2005, 05:33 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
03-09-2005, 07:33 PM
|
#5
|
LQ Newbie
Registered: Mar 2005
Posts: 16
Original Poster
Rep:
|
Thanks Tink!
|
|
|
All times are GMT -5. The time now is 02:16 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|