Solved

syslog config in linux

Posted on 2014-09-20
5
202 Views
Last Modified: 2014-10-07
How to define syslog configuration in Redhat Linux to achieve

All messages except Mail/News/IPtables  redirect to another server
0
Comment
Question by:bt74
  • 2
  • 2
5 Comments
 
LVL 23

Expert Comment

by:savone
ID: 40334306
You can add the following to rsyslog.conf.  This will forward evrything except mail and news.  IPtables is not logged by default. Of course edit the IP address to make it the IP address of your remote server.

*.*;mail.none; news.none         @10.0.0.10:514
0
 
LVL 62

Expert Comment

by:gheist
ID: 40335035
iptables logs at kern.debug
so add kern.info to same line:
*.*;mail.nonelnews.none;kern.info @10.0.0.10
0
 

Author Comment

by:bt74
ID: 40335970
I believe kernel.info will be 99% of iptable messages. is that correct. so in the below suggestion, all iptables messages are redirecting to the remote host.

so instead of
*.*;mail.nonelnews.none;kern.info @10.0.0.10

can i use this way.

*.*;mail.nonelnews.none;kern.!info @10.0.0.10

to get the result.  our target is all messages except mail/news/iptables.


Please correct me.
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 40336010
More like !=kern.info
I see iptables in kern.debug (always kern., sol maybe kern.warn can pass or so)
Rest looks fine.
0
 

Author Comment

by:bt74
ID: 40366048
hh
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wifi not working on Raspberry Pi 3? 2 56
awk sed 8 42
000webhost.com default error log 1 28
How to retrieve remote exit code when using rsh from Linux to Windows ? 13 41
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question