Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I log all dropped packets using following iptables rule:

-A INPUT -j LOG --log-prefix "FW_DROP: " --log-level 7

and then in rsyslog.conf, I redirect this output to a separate file, so that my syslog is not flooded

:msg, contains, "FW_DROP" -/var/log/firewall.log
& ~

This works for syslog, but my dmesg still gets flooded with the fw messages, which drives me crazy. Would anybody know how to prevent this?

share|improve this question
    
You can try ULOG. linuxtopia.org/Linux_Firewall_iptables/x4883.html –  Guntis Mar 24 '13 at 15:58

1 Answer 1

Sorry, no. All logged messages are viewable with dmesg in the order in which they were received, subject to the size of its ring buffer. If you need to view recent log entries, without seeing firewall logs, use the actual logs where the entries are being stored.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.