<?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>zarzax the blog &#187; Nagios</title>
	<atom:link href="http://www.zarzax.com/category/sysadmin/nagios/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zarzax.com</link>
	<description>the rantings of mark young :: random thoughts and interesting snippets</description>
	<lastBuildDate>Thu, 09 Jul 2009 14:33:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enhanced Nagios; CGI Security and Authentication</title>
		<link>http://www.zarzax.com/enhanced-nagios-cgi-security-and-authentication/</link>
		<comments>http://www.zarzax.com/enhanced-nagios-cgi-security-and-authentication/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 04:30:03 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[guides]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">3 at http://zarzax.com</guid>
		<description><![CDATA[Over the past few days we have been tackling a nasty Cross Site Request Forgery (CSRF) bug in Nagios 3.0.4.  With our bug fix I updated the Nagios documentation to include some information on Enhanced CGI Security and Authentication.  This is a much needed addition that answers some of the communities questions regarding [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few days we have been tackling a nasty Cross Site Request Forgery (CSRF) bug in Nagios 3.0.4.  With our bug fix I updated the Nagios documentation to include some information on <a href="http://nagios.sourceforge.net/docs/3_0/cgisecurity.html">Enhanced CGI Security and Authentication</a>.  This is a much needed addition that answers some of the communities questions regarding different ways to secure <a href="http://www.nagios.org">Nagios</a>.  This post will rehash much of what I wrote about in the documentation.  There are many ways to enhance the security of your monitoring server and Nagios environment. This should not be taken as the end all approach to security. Instead, think of it as an introduction to some of the techniques you can use to tighten the security of your system. As always, you should do your research and use the best techniques available. Treat your monitoring server as it were the most important server in your network and you shall be rewarded.</p>
<p><span id="more-8"></span></p>
<p>My greatest recommendation for a secure Nagios installation would be a mixture of the techniques I am describing but also to not open the Nagios server outside your internal network.  <a name="additionaltechniques"></a> <strong>Additional Techniques</strong></p>
<ul>
<li><strong>Stronger Authentication using Digest Authentication</strong>.  If you have followed the <a href="quickstart.html">quickstart guides</a>, chances are that you are using Apache&#8217;s <a href="http://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html">Basic Authentication</a>.  Basic Authentication will send your username and password in &#8220;clear text&#8221; with every http request.  Consider using a more secure method of authentication such as <a href="http://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html">Digest Authentication</a> which creates a MD5 Hash of your username and password to send with each request.</li>
<li><strong>Forcing TLS/SSL for all Web Communication</strong>.  Apache provides <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security">TLS/SSL</a> through the <a href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html">mod_ssl</a> module.  TLS/SSL provides a secure tunnel between the client and server that prevents eavesdropping and tampering using strong publickey/privatekey cryptography.</li>
<li><strong>Locking Down Apache Using Access Controls</strong>.  Consider locking down access to the Nagios box to your IP address, IP address range, or IP subnet.  If you require access outside your network you could use VPN or SSH Tunnels.  This is a easy and strong to limit access to HTTP/HTTPS on your system.</li>
</ul>
<p><a name="implementation-digest"></a> <strong>Implementing Digest Authentication</strong><br />
The implementation of Digest Authentication is simple.  You will have to create the new type of password file using the <a href="http://httpd.apache.org/docs/2.2/programs/htdigest.html">&#8216;htdigest&#8217;</a> tool, then modify the Apache configuration for nagios (typically /etc/httpd/conf.d/nagios.conf).<br />
Create a new passwords file using the <a href="http://httpd.apache.org/docs/2.2/programs/htdigest.html">&#8216;htdigest&#8217;</a> tool.  The difference that you will notice if you are familiar with <a href="http://httpd.apache.org/docs/2.2/programs/htpasswd.html">&#8216;htpasswd&#8217;</a> tools is the requirement to supply a &#8216;realm&#8217; argument.  Where &#8216;realm&#8217; in this case refers to the value of the &#8216;AuthName&#8217; directive in the Apache configuration.</p>
<pre>
htdigest -c /usr/local/nagios/etc/.digest_pw "Nagios Access" nagiosadmin
</pre>
<p>Next, edit the Apache configuration file for Nagios (typically /etc/httpd/conf.d/nagios.conf) using the following example.</p>
<pre LANG="Apache">
## BEGIN APACHE CONFIG SNIPPET - NAGIOS.CONF
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
     Options ExecCGI
     AllowOverride None
     Order allow,deny
     Allow from all
     AuthType Digest
     AuthName "Nagios Access"
     AuthUserFile /usr/local/nagios/etc/.digest_pw
     Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
     Options None
     AllowOverride None
     Order allow,deny
     Allow from all
     AuthType Digest
     AuthName "Nagios Access"
     AuthUserFile /usr/local/nagios/etc/.digest_pw
     Require valid-user
</Directory>
## END APACHE CONFIG SNIPPETS
</pre>
<p>Then, restart the Apache service so the new settings can take effect.</p>
<pre>
/etc/init.d/httpd restart
</pre>
<p><a name="implementation-ssl"></a> <strong>Implementing Forced TLS/SSL</strong><br />
Make sure you&#8217;ve installed Apache and OpenSSL.  By default you should have <a href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html">mod_ssl</a> support if you are still having trouble you may find help reading Apache&#8217;s <a href="http://httpd.apache.org/docs/2.0/ssl">TLS/SSL Encryption Documentation</a>.</p>
<p>Next, verify that TLS/SSL support is working by visiting your Nagios Web Interface using HTTPS (<a title="https://your.domain/nagios" href="https://your.domain/nagios">https://your.domain/nagios</a>).  If it is working you can continue on to the next steps that will force using HTTPS and block all HTTP requests for the Nagios Web Interface.  If you are having trouble visit Apache&#8217;s <a href="http://httpd.apache.org/docs/2.0/ssl">TLS/SSL Encryption Documentation</a> and <a href="http://www.google.com">Google</a> for troubleshooting your specific Apache installation.</p>
<p>Next, edit the Apache configuration file for Nagios (typically /etc/httpd/conf.d/nagios.conf) by adding the &#8216;SSLRequireSSL&#8217; directive to both the &#8217;sbin&#8217; and &#8217;share&#8217; directories.</p>
<pre LANG="Apache">
## BEGIN APACHE CONFIG SNIPPET - NAGIOS.CONF
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
     ...
     SSLRequireSSL
     ...
</Directory>

Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
     ...
     SSLRequireSSL
     ...
</Directory>
## END APACHE CONFIG SNIPPETS
</pre>
<p>Restart the Apache service so the new settings can take effect.</p>
<pre>
/etc/init.d/httpd restart
</pre>
<p><a name="implementation-lockdown"></a> <strong>Implementing IP subnet lockdown</strong><br />
The following example will show how to lock down Nagios CGIs to a specific IP address, IP address range, or IP subnet using Apache&#8217;s <a href="http://httpd.apache.org/docs/2.2/howto/access.html">access controls</a>.<br />
Edit the Apache configuration file for Nagios (typically /etc/httpd/conf.d/nagios.conf) by using the &#8216;Allow&#8217;, &#8216;Deny&#8217;, and &#8216;Order&#8217; directives using the following as an example.</p>
<pre LANG="Apache">
## BEGIN APACHE CONFIG SNIPPET - NAGIOS.CONF
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
     ...
     AllowOverride None
     Order deny,allow
     Deny from all
     Allow from 127.0.0.1 10.0.0.25		# Allow single IP addresses
     Allow from 10.0.0.0/255.255.255.0		# Allow network/netmask pair
     Allow from 10.0.0.0/24			# Allow network/nnn CIDR spec
     ...
</Directory>

Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
     ...
     AllowOverride None
     Order deny,allow
     Deny from all
     Allow from 127.0.0.1 10.0.0.25		# Allow single IP addresses
     Allow from 10.0.0.0/255.255.255.0		# Allow network/netmask pair
     Allow from 10.0.0.0/24			# Allow network/nnn CIDR spec
     ...
</Directory>
## END APACHE CONFIG SNIPPET
</pre>
<p><a name="importantnotes"></a> <strong>Important Notes</strong></p>
<ul>
<li><strong>Digest Authentication sends data in the clear but not your username and password</strong>.</li>
<li><strong>Digest Authentication is not as universally supported as Basic Authentication</strong>.</li>
<li><strong>TLS/SSL has potential for &#8220;<a href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle attacks</a>&#8220;</strong>.  MITM attacks are vulnerable if an attacker is able to insert itself between the server and client such as in a Phishing attack, ISP monitoring, or corporate LAN firewall certificate resigning.  So read up on certificate verification!</li>
<li><strong>Apache access controls only protect the HTTP/HTTPS protocols</strong>.  Look into <a href="http://www.netfilter.org/projects/iptables/index.html">IPtables</a> for strong system wide firewall control.</li>
<li><strong>Most importantly, Security is a moving target so stay informed and do research</strong>!  Perhaps by listening to a Podcast such as &#8220;<a href="http://www.grc.com/securitynow.htm">Security Now!</a>&#8220;.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.zarzax.com/enhanced-nagios-cgi-security-and-authentication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>NETWAYS Nagios Conference 2008</title>
		<link>http://www.zarzax.com/netways-nagios-conference-2008/</link>
		<comments>http://www.zarzax.com/netways-nagios-conference-2008/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 17:13:10 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[conferences]]></category>

		<guid isPermaLink="false">9 at http://zarzax.com</guid>
		<description><![CDATA[I just got back from this years NETWAYS Nagios Conference.  It was a huge success.  It was held again at the City Center Holiday Inn, Nuernberg.  Nuernberg is such a great city.  It really makes me sad that I did not have much time to see more of the city.
The Conference itself was really busy.  They had [...]]]></description>
			<content:encoded><![CDATA[<p><small><a title="Docklandsboy" href="http://www.flickr.com/photos/40246732@N00/3022261893/" target="_blank"></a></small>I just got back from this years <a href="http://www.netways.de/nagios_konferenz/">NETWAYS Nagios Conference</a>.  It was a huge success.  It was held again at the City Center Holiday Inn, Nuernberg.  Nuernberg is such a great city.  It really makes me sad that I did not have much time to see more of the city.</p>
<p>The Conference itself was really busy.  They had 3 to 4 tracks every session, with at least 1 track being in English.  This really means that I wake up at 8am, conference starts at 9am, ends at 5pm, with 15min breaks between sessions.  After 5pm there is dinner or bars that we then go to and stay till 2am or 3am.  I have to say that I was completely exhausted when I finally got home.</p>
<p>The best part was I finally got to meet many people that I have only communicated with by email.  I was able to hang out with some of the German community members Hendrik, Joerg, Matthias, and Michael one evening.  We had some great talks about Germany, working in Germany, the future of Nagios, with American Politics splattered in there for good measure. <img src='http://www.zarzax.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a title="Monitoring wall in the NOC" href="http://www.flickr.com/photos/40246732@N00/3022261893/" target="_blank"><img src="http://farm4.static.flickr.com/3010/3022261893_aff442bd9a_m.jpg" border="0" alt="Monitoring wall in the NOC" /></a><br />
<small><a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://blog.zarzax.com/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="Docklandsboy" href="http://www.flickr.com/photos/40246732@N00/3022261893/" target="_blank">Docklandsboy</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zarzax.com/netways-nagios-conference-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
