<?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>Ball Dawg! &#187; proxy</title>
	<atom:link href="http://www.balldawg.net/index.php/tag/proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.balldawg.net</link>
	<description>Just some ninja monkeys, nothing to see here.  Move along.</description>
	<lastBuildDate>Fri, 13 Jan 2012 02:02:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Breaking out of a HTTP proxy enviroment</title>
		<link>http://www.balldawg.net/index.php/2010/02/breaking-out-of-a-http-proxy-enviroment/</link>
		<comments>http://www.balldawg.net/index.php/2010/02/breaking-out-of-a-http-proxy-enviroment/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 18:24:47 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Server Monitoring]]></category>
		<category><![CDATA[corkscrew]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=302</guid>
		<description><![CDATA[Being in a large corporate environment has positives and negatives, one of those negatives is that many companies use HTTP proxies to control and track internet usage from your work machines.  While in most cases this is very important from the HR and workplace productivity side, it can become a headache if you actually need [...]]]></description>
			<content:encoded><![CDATA[<p>Being in a large corporate environment has positives and negatives, one of those negatives is that many companies use HTTP proxies to control and track internet usage from your work machines.  While in most cases this is very important from the HR and workplace productivity side, it can become a headache if you actually need something outside your companies firewalls that is blocked.  In my case I wanted to backup some configurations and code to my home machine.  To do this I&#8217;d generally just rsync over ssh or scp the files over to an off site machine.   Sadly with a full firewall up and all traffic required to go through HTTP proxies, I had to find a different solution.  In my case, I decided to use &#8216;corkscrew&#8217;.<br />
<span id="more-302"></span><br />
Corkscrew tunnels SSH connections through HTTP proxies, you can find it at <a title="agroman.net/corkscrew/" href="http://www.agroman.net/corkscrew/">agroman.net/corkscrew/</a>.  It was quite easy to setup, and with some tweaks to your ssh config you can seamlessly use it.</p>
<p>My next trick is useful for getting around having your HTTP usage tracked and filtered, this is just taking advantage of the &#8220;-D&#8221; option within the &#8216;ssh&#8217; program.  When you invoke the -D option, followed with a port number you not only connect to the remote machine via SSH, but you also create a SOCKS proxy server on the port specified.  Setting up your browser&#8217;s proxy settings to point at that port on your local machine will securely forward any requests over to the remote machine, where they will then go out to their final destination.</p>
<p>When you combine corkscrew with ssh -D, you end up with a single, secure connection through the HTTP proxy to your remote machine with a SOCKS proxy through it.  This effectively gives you an easy unfiltered hole through to the outside.</p>
<p>You can also use this trick for getting rsync through a http firewall that might otherwise block it.  To accomplish this you just have setup your RSYNC_CONNECT_PROG environment variable to &#8220;/path/to/corkscrew &lt;proxy&gt; &lt;proxy_port&gt; %H 873 &lt;auth_file&gt;&#8221;.</p>
<p>Disclaimer: Check with your IT policies before attempting any of the above to make sure its allowed!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2010/02/breaking-out-of-a-http-proxy-enviroment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting to lighttpd and dealing with .htaccess</title>
		<link>http://www.balldawg.net/index.php/2009/05/converting-to-lighttpd-and-dealing-with-htaccess/</link>
		<comments>http://www.balldawg.net/index.php/2009/05/converting-to-lighttpd-and-dealing-with-htaccess/#comments</comments>
		<pubDate>Fri, 08 May 2009 18:26:23 +0000</pubDate>
		<dc:creator>Andrew Rankin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Lighty]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.balldawg.net/?p=28</guid>
		<description><![CDATA[I recently switched this server to Lighttpd (using PHP through FastCGI) from Apache. It was easy enough and I ended up with much faster serving websites, unfortunately I hit a snag on one of my sites that extensively uses .htaccess file for rewrites &#8211; which Lighttpd does not support. I didn&#8217;t want to bail on [...]]]></description>
			<content:encoded><![CDATA[<p>I recently switched this server to Lighttpd (using PHP through FastCGI) from Apache.  It was easy enough and I ended up with much faster serving websites, unfortunately I hit a snag on one of my sites that extensively uses .htaccess file for rewrites &#8211; which Lighttpd does not support.   I didn&#8217;t want to bail on the whole switch because of a single site, so looked and came up with a simple solution &#8211; proxy to Apache through Lighttpd for items on that site (www.350z.ws).  In lighttpds config, this was very easy to accomplish:</p>
<pre class="brush: php">
# Proxy 350z.ws back to apache
$HTTP[&quot;host&quot;] =~ &quot;www.3(5|7)0z.ws&quot; {
        $HTTP[&quot;url&quot;] !~ &quot;(wp-content|wp-includes|css|js|php$|^/blog/$)&quot; {
                proxy.server = ( &quot;/&quot; =&gt;
                        ( &quot;localhost&quot; =&gt;
                                ( &quot;host&quot; =&gt; &quot;127.0.0.1&quot;, &quot;port&quot; =&gt; 81 )
                        )
                )
        }
}
</pre>
<p>Note one (obvious) draw back is that you have to run Apache as well, but since I&#8217;m stopping most hits at Lighttpd by serving everything in wp-content, wp-includes, anything with css, js or php in the name, I can greatly reduce the number of Apaches I start and maintain.  In my case my Apache prefork config looks like this:</p>
<pre class="brush: php">
&lt;IfModule mpm_prefork_module&gt;
    StartServers          3
    MinSpareServers       2
    MaxSpareServers       5
    MaxClients          15
    MaxRequestsPerChild   10
&lt;/IfModule&gt;
</pre>
<p>You&#8217;ll also notice I&#8217;m not proxying the folder where WordPress lives back either, this is because it contains no rewrites for it specifically and will get the majority of the hits.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balldawg.net/index.php/2009/05/converting-to-lighttpd-and-dealing-with-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

