<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ryoku.org &#187; Computing</title>
	<atom:link href="http://www.ryoku.org/tag/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryoku.org</link>
	<description>Nerd stuff</description>
	<lastBuildDate>Sat, 04 Sep 2010 21:55:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using syslog-ng as a central loghost</title>
		<link>http://www.ryoku.org/2009/11/using-syslog-ng-as-a-central-loghost/</link>
		<comments>http://www.ryoku.org/2009/11/using-syslog-ng-as-a-central-loghost/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 22:44:29 +0000</pubDate>
		<dc:creator>Arijan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Splunk]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.ryoku.org/?p=171</guid>
		<description><![CDATA[Today I woke up and found out that syslog-ng 3.0 supports native tls for securing your log transport. In the past I have used syslog-ng in combination with stunnel. I configured my loghost to log all messages to /var/log/hosts/$hostname/$year/$month/, I reconfigured the servers on my lan to use the unencrypted transport (s_remote) and my servers [...]]]></description>
			<content:encoded><![CDATA[<p>Today I woke up and found out that syslog-ng 3.0 supports native tls for securing your log transport. In the past I have used syslog-ng in combination with stunnel.</p>
<p>I configured my loghost to log all messages to /var/log/hosts/$hostname/$year/$month/, I reconfigured the servers on my lan to use the unencrypted transport (s_remote) and my servers somewhere on the internet to use the secure transport (s_tls)</p>
<pre class="brush: plain;">
@version: 3.0

options {
	chain_hostnames(no);
	stats_freq(43200);
	create_dirs (yes);
};

source s_local {
    unix-stream(&quot;/dev/log&quot; max-connections(256));
    internal();
    file(&quot;/proc/kmsg&quot;);
};

source s_remote {
	tcp();
	udp();
};

source s_tls {
	syslog(ip(0.0.0.0) port(2009)
		transport(&quot;tls&quot;)
		tls( key_file(&quot;/etc/syslog-ng/key.d/syslog-ng-server.key&quot;) cert_file(&quot;/etc/syslog-ng/cert.d/syslog-ng-server.cert&quot;)
	peer_verify(optional-untrusted)) );
};

destination d_console_all { file(&quot;/dev/tty12&quot;); };
destination d_messages { file(&quot;/var/log/hosts/$HOST/$YEAR/$MONTH/messages&quot;); };
destination d_auth { file(&quot;/var/log/hosts/$HOST/$YEAR/$MONTH/auth.log&quot;); };

filter f_auth { facility(auth, authpriv); };

log { source(s_local); destination(d_console_all); };

log { source(s_local); filter(f_auth); destination(d_auth); };
log { source(s_remote); filter(f_auth); destination(d_auth); };
log { source(s_tls); filter(f_auth); destination(d_auth); };

log { source(s_remote); destination(d_messages); };
log { source(s_local); destination(d_messages); };
log { source(s_tls); destination(d_messages); };
</pre>
<p>There is also a copy of splunk running on my loghost, to query and log-mine my logging, I am quite happy with this setup and will be adding notification to my logging using the &#8220;program&#8221; directive of syslog-ng soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryoku.org/2009/11/using-syslog-ng-as-a-central-loghost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
