LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-10-2015, 01:56 PM   #1
ne1scott
LQ Newbie
 
Registered: Jul 2003
Distribution: Red Hat
Posts: 11

Rep: Reputation: 0
Question Rsyslog writing to both my file and messages file


Also posted on stackoverflow.com

Centos6.3 running rsyslog-5.8.10-6.el6.x86_64 writes to both my custom log file and /var/log/messages.

After making changes to my iptables files to log dropped packets :

-N LOGGING -A INPUT -j LOGGING -A OUTPUT -j LOGGING -A LOGGING -m limit --limit 2/sec -j LOG --log-prefix "IPTables-Dropped: " --log-level 4 -A LOGGING -j DROP

I added "kern.warning /var/log/iptablesDROPPED.log" to the bottom of my /etc/rsyslog.conf file, restarted rsyslog and iptables.

It works great but logs to both files.

PROBLEM: I don't want it logging the same entries to /var/log/messages.

It also happens to ignore my 2 logs/sec rule so I get 3 messages every time it blocks an ssh connection. The same if I set it to 2/min as well.
 
Old 09-11-2015, 11:09 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by ne1scott View Post
I don't want it logging the same entries to /var/log/messages. (..) It also happens to ignore my 2 logs/sec rule
Not "the same"? Then what should be filtered out? Did you try adding filter rules? Else post complete config instead?
 
  


Reply



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
Rsyslog file missing Ktarak Linux - Kernel 3 06-13-2015 09:02 PM
forwarding a new log file to rsyslog server george_john Linux - Newbie 3 11-12-2014 07:10 AM
rsyslog not logging to a correct file packets Linux - Newbie 2 03-10-2012 08:11 AM
reading and writing to pipes, file descriptors, and file streams cmartin0 Programming 1 02-13-2012 03:03 AM
Writing an ISO file for cd audio from a cue and wave file? spaz-atk Linux - Software 5 12-01-2008 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:39 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
Open Source Consulting | Domain Registration