rsyslog: Only do local logging for local messages.
authorMatthijs Kooijman <matthijs@stdin.nl>
Wed, 29 Feb 2012 15:36:27 +0000 (16:36 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Wed, 29 Feb 2012 16:03:27 +0000 (17:03 +0100)
etc/rsyslog.conf

index 9d1aac12bb885a82e4aed60f8438c6bd8c0cd537..465dce4477e8c1e3f9035fc370e1fa5166440fdf 100644 (file)
@@ -52,7 +52,11 @@ $MainMsgQueueSaveOnShutdown on
 #### Local logging ####
 #######################
 
-#
+# Discard all log entries not locally generated (note that the ~ here is the
+# "discard" action, preventing the rules below from bein ran on these messages.
+if $fromhost-ip != '127.0.0.1' then ~
+
+
 # Log each facility into its own log
 auth,authpriv.*                        /var/log/rsyslog/auth.log
 cron.*                         -/var/log/rsyslog/user.log