<?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>Nix Bits &#187; Security</title>
	<atom:link href="http://www.scottharney.com/category/computers/internet/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottharney.com</link>
	<description>Notes about life, *nix, and other stuff.</description>
	<lastBuildDate>Thu, 08 Apr 2010 12:27:26 +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>Linux with encrypted root and swap with working hibernate to disk</title>
		<link>http://www.scottharney.com/2009/09/17/linux-with-encrypted-root-and-swap-with-working-hibernate-to-disk/</link>
		<comments>http://www.scottharney.com/2009/09/17/linux-with-encrypted-root-and-swap-with-working-hibernate-to-disk/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 19:52:29 +0000</pubDate>
		<dc:creator>scotth</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.scottharney.com/?p=179</guid>
		<description><![CDATA[
I recently installed Linux Mint (ubuntu with some goodies) on a laptop and wanted an encrypted whole disk. In order for this to be truly secure, you need encrypted swap. Well most of the HOWTOs for encrypting swap use a randomized key. This breaks hibernate to disk for laptops because the linux kernel has no [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>I recently installed Linux Mint (ubuntu with some goodies) on a laptop and wanted an encrypted whole disk. In order for this to be truly secure, you need encrypted swap. Well most of the HOWTOs for encrypting swap use a randomized key. This breaks hibernate to disk for laptops because the linux kernel has no way to decrypt a randomized cipher (of course). So I referenced a separate howto and combined the two approaches. I can now hibernate to disk using an encrypted swap partition that is protected with a passphrase in the same as way as root and home partitions.</p>
<p>It should be apparent this howto is non-trivial.  The config file changes I supply in it are in <tt>diff -u</tt> format so this is deliberately written for a technical audience. My research indicates that there is some interest in getting this into distributions in a more elegant fashion, but that kind of deep integration takes time. I needed something that works for me now.</p>
<p>Anyway, here’s the <a href="http://forums.linuxmint.com/viewtopic.php?f=42&amp;t=18743&amp;p=190446#p190446">link</a> in the Linux Mint user forums:</div>
]]></content:encoded>
			<wfw:commentRss>http://www.scottharney.com/2009/09/17/linux-with-encrypted-root-and-swap-with-working-hibernate-to-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using OpenBSD CARP and pfsync for inexpensive firewall/router redundancy</title>
		<link>http://www.scottharney.com/2004/03/30/using-openbsd-carp-and-pfsync-for-inexpensive-firewallrouter-redundancy/</link>
		<comments>http://www.scottharney.com/2004/03/30/using-openbsd-carp-and-pfsync-for-inexpensive-firewallrouter-redundancy/#comments</comments>
		<pubDate>Tue, 30 Mar 2004 23:28:00 +0000</pubDate>
		<dc:creator>scotth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.scottharney.com/htdocs/wordpress/?p=71</guid>
		<description><![CDATA[
Enterprise network admins are probably familiar with Cisco&#8217;s HSRP which allows for router redundancy and VRRP for firewall redundancy.  This article describes a way to achieve the same thing using features in the upcoming OpenBSD 3.5 release .  Other commercial firewalls certainly have similar capability.  However, OpenBSD&#8217;s feature set is becoming rather [...]]]></description>
			<content:encoded><![CDATA[<p>
Enterprise network admins are probably familiar with Cisco&#8217;s <a href="http://www.cisco.com/en/US/tech/tk648/tk362/tk321/tech_protocol_home.html">HSRP</a> which allows for router redundancy and <a href="http://www.cisco.com/en/US/products/hw/vpndevc/ps2284/products_tech_note09186a0080094490.shtml">VRRP</a> for firewall redundancy.  This <a href="http://www.countersiege.com/doc/pfsync-carp/">article</a> describes a way to achieve the same thing using features in the upcoming OpenBSD 3.5 release .  Other commercial firewalls certainly have similar capability.  However, OpenBSD&#8217;s feature set is becoming rather compelling.
<p>
Smaller businesses can certainly find value in such an approach, keeping their network available and secure at a fraction of the cost.  Evening paying an outside consultant for installation and ongoing support would be cost effective.  Deploy something like <a href="http://www.nmedia.net/~chris/nsh/">this</a> and things remain comfortable for your cisco-trained network admins.</p>
<p>
All of this of course reminds me that I really need to schedule some time to upgrade my own <a href="http://www.openbsd.org">OpenBSD<a> firewall.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottharney.com/2004/03/30/using-openbsd-carp-and-pfsync-for-inexpensive-firewallrouter-redundancy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GPG key</title>
		<link>http://www.scottharney.com/2003/03/13/gpg-key/</link>
		<comments>http://www.scottharney.com/2003/03/13/gpg-key/#comments</comments>
		<pubDate>Thu, 13 Mar 2003 06:14:00 +0000</pubDate>
		<dc:creator>scotth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.scottharney.com/htdocs/wordpress/?p=79</guid>
		<description><![CDATA[I have decided to start using my GPG key again to sign emails and such.  It&#8217;s a good thing to use encryption and digital signature technology.  Consequently, I&#8217;ve gone ahead and posted my key here
]]></description>
			<content:encoded><![CDATA[<p>I have decided to start using my GPG key again to sign emails and such.  It&#8217;s a good thing to use encryption and digital signature technology.  Consequently, I&#8217;ve gone ahead and posted my key <a href="http://www.scottharney.com/gpg.html">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottharney.com/2003/03/13/gpg-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using multiple physical machines behind a single NAT IP address</title>
		<link>http://www.scottharney.com/2003/02/21/using-multiple-physical-machines-behind-a-single-nat-ip-address/</link>
		<comments>http://www.scottharney.com/2003/02/21/using-multiple-physical-machines-behind-a-single-nat-ip-address/#comments</comments>
		<pubDate>Sat, 22 Feb 2003 00:52:00 +0000</pubDate>
		<dc:creator>scotth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.scottharney.com/htdocs/wordpress/?p=92</guid>
		<description><![CDATA[
So you have just one IP address and a bunch of machines behind NAT.
You&#8217;ve got port redirection working so your interal webserver behind
the firewall is serving pages.  But now you&#8217;ve got a second box that
you need to host content on. Perhaps you have need to have a separate
webserver running mod_perl and one running php. [...]]]></description>
			<content:encoded><![CDATA[<p>
So you have just one IP address and a bunch of machines behind NAT.<br />
You&#8217;ve got port redirection working so your interal webserver behind<br />
the firewall is serving pages.  But now you&#8217;ve got a second box that<br />
you need to host content on. Perhaps you have need to have a separate<br />
webserver running mod_perl and one running php.  Or perhaps you&#8217;ve got<br />
(God forbid) an IIS box.  And you don&#8217;t want to redirect alternate<br />
ports.  Here&#8217;s away to have multiple webservers behind a single<br />
external IP address all running on Port 80.</p>
<p>
What you need is a reverse inbound proxy established on your firewall.<br />
<a href="http://www.apache.org">Apache</a> with mod_proxy built and<br />
enabled does the trick.</p>
<p>
First and foremost you need to have your DNS sorted out.  I have both<br />
external and internal DNS servers.  <a href="http://www.isc.org/products/BIND/bind9.html">Bind 9</a> can do<br />
this with &#8220;views&#8221; though I personally have a preference for setting up<br />
<a href="http://cr.yp.to/djbdns.html">djbdns</a>.  If you do not have<br />
an internal DNS for your domains then you&#8217;ll need to reference your<br />
internal boxes by IP address in your apache configuration (see below).</p>
<p>
The next thing to do is fix your firewall.  You need to install apache.<br />
mod_proxy should come with it.  You need to stop redirected port 80<br />
inbound in your NAT (aka IP Masq) configuration since the firewall<br />
will now answer on Port 80.  Since I have internal DNS servers, I<br />
also made sure my firewall&#8217;s /etc/resolv.conf pointed to the<br />
internal DNS server.</p>
<p>
Now you set up Apache on your firewall.  Just do a basic configuration.<br />
Here&#8217;s the magical lines snipped from httpd.conf</p>
<pre>
LoadModule proxy_module       libexec/apache/libproxy.so
AddModule mod_proxy.c

NameVirtualHost your.external.ip.address

&lt;VirtualHost your.external.ip.address&gt;
   ServerAdmin &#119;&#101;&#98;&#109;&#97;&#115;&#116;&#101;&#114;&#64;&#121;&#111;&#117;&#114;&#119;&#101;&#98;&#115;&#105;&#116;&#101;&#46;&#110;&#101;&#116;
   ServerName www.yourwebsite.net
   ProxyPass / http://www.yourwebsite.net/
   ProxyPassReverse / http://www.yourwebsite.net/
   ErrorLog /var/log/apache/yourwebsite.net/error_log
   TransferLog /var/log/apache/yourwebsite.net/access_log
&lt;VirtualHost&gt;
</pre>
<p>
Since the internal DNS server has a local (ie 192.168.x.x) address<br />
for &#8220;www.yourwebsite.net&#8221;, requests to that NameVirtualHost go<br />
to the appropriate internal box.  And it need not be running<br />
apache.  Anything that speaks http will be transparently proxied.</p>
<p>
If you don&#8217;t do internal DNS you&#8217;d replace<br />
&#8220;http://www.yourwebsite.net&#8221; with something like &#8220;http://192.168.5.80&#8243;<br />
where that is the IP of the internal server that you want to answer<br />
for www.yourwebsite.net.</p>
<p>
Note that you can also do SSL https connections this way. The key is<br />
that you need to have your SSL certs and keyfiles on the firewall. The<br />
firewall would then speak standard http on port 80 to the internal box<br />
The config looks like this:</p>
<pre>
&lt;VirtualHost your.external.ip.address:443&gt;
   ServerAdmin &#119;&#101;&#98;&#109;&#97;&#115;&#116;&#101;&#114;&#64;&#121;&#111;&#117;&#114;&#119;&#101;&#98;&#115;&#105;&#116;&#101;&#46;&#110;&#101;&#116;
   ServerName secure.yourwebsite.net
   ProxyPass / http://secure.yourwebsite.net/
   ProxyPassReverse / http://secure.yourwebsite.net/
   SSLEngine on
   SSLCertificateFile /path/to/certfile
   SSLCertificateKeyfile /ditto/for/keyfile.key
   ErrorLog /var/log/apache/secure.yourwebsite.net/error_log
   TransferLog /var/log/apache/secure.yourwebsite.net/access_log
&lt;/VirtualHost&gt;
</pre>
<p>
As you can see, it really helps to have internal DNS set up.<br />
That makes things easier and allows you to have NameVirtualHosts<br />
on your internal boxes. You could just to IP based VirtualHosts<br />
internally configuring multiple 192.168.x.x IPs on your internal<br />
servers.</p>
<p>
I&#8217;m sure you can imagine some very useful ways of doing this.<br />
It makes a test and development environment easy.  You can stand up<br />
a replacement website without going through the hastle of waiting for<br />
public DNS to &#8220;catch up&#8221;.  </p>
<p>
Obviously there are security considerations. I won&#8217;t go into a major<br />
discussion about that here except to say that you need to think about<br />
it.  For my needs, this increased my security posture because I could<br />
move Win2000 machines with many potential vulnerabilities behind the<br />
firewall and reduce exposure to just IIS and cross-site scripting<br />
issues. That&#8217;s still plenty to worry about, but better than having,<br />
say, MSSQL outside your firewall)</p>
<p>
Another implication of this is that your logging of website<br />
connections changes.  All that your internal boxes will ever log now<br />
are connections from the firewall. So those logs are useless for<br />
tracking site traffic, etc.  But all your hits are logged &#8211;<br />
separately the way I configured it &#8212; on the firewall itself. Just make<br />
sure you make those log subdirectories manually before restarting<br />
apache because apache won&#8217;t create them.  The master apache error log<br />
will report this, of course.</p>
<p>
References:<br />
<a href="http://honor.trusecure.com/pipermail/firewall-wizards/2000-January/007529.html">1</a></p>
<p><a href="http://apache.arock.dk/revproxy.php">2</a><br />
<a href="http://archives.neohapsis.com/archives/nfr-wizards/2000-q1/0066.html">3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottharney.com/2003/02/21/using-multiple-physical-machines-behind-a-single-nat-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
