<?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>Fedora &#187; Squid</title>
	<atom:link href="http://gofedora.com/archives/category/squid/feed/" rel="self" type="application/rss+xml" />
	<link>http://gofedora.com</link>
	<description>How Tos, Tutorials, Tips and Tricks</description>
	<lastBuildDate>Thu, 25 Feb 2010 07:55:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Crack: Google Authentication Services are Vulnerable</title>
		<link>http://gofedora.com/crack-google-authentication-services-vulnerable/</link>
		<comments>http://gofedora.com/crack-google-authentication-services-vulnerable/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 18:41:58 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=306</guid>
		<description><![CDATA[
There is a vulnerability in the way Google authentication service works. Whenever you login to any of the Google&#8217;s online services like GMail, Orkut, Groups, Docs, Youtube, Calendar etc., you are redirected to an authentication server which authenticates against the entered username and password and redirect back to the required service (GMail, Youtube etc.) setting [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://gofedora.com/crack-google-authentication-services-vulnerable/" class="post_image_link"  title="Permanent link to Crack: Google Authentication Services are Vulnerable"><img class="post_image alignnone" src="http://gofedora.com/wp-content/uploads/2008/12/Google-Services-Authentication.jpg" width="384" height="192" alt="Google Services Authentication" title="Crack: Google Authentication Services are Vulnerable" /></a>
</p><p>There is a vulnerability in the way Google authentication service works. Whenever you login to any of the Google&#8217;s online services like GMail, Orkut, Groups, Docs, Youtube, Calendar etc., you are redirected to an authentication server which authenticates against the entered username and password and redirect back to the required service (GMail, Youtube etc.) setting the session variables.</p>
<p>Now, if you are able to grab the url used to set the session variables, you can login as the user to whom that url belongs from any machine on the Internet (need not be the machine belonging to the same subnet) without entering the username and password of the user.</p>
<p>The proxy servers in the organizations can be used to exploit this vulnerability. Squid is the most popular proxy server used. In the default configuration, squid strips the query terms of a url before logging. So, this vulnerability can&#8217;t be exploited. But if you turn off the stripping mechanism by adding the line shown below, then squid will log the complete url.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">strip_query_terms off</pre></div></div>

<p>So, after turning stripping mechanism off, the log will contain urls which will look like this</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">http:<span style="color: #000000; font-weight: bold;">//</span>www.google.co.in<span style="color: #000000; font-weight: bold;">/</span>accounts<span style="color: #000000; font-weight: bold;">/</span>SetSID?<span style="color: #007800;">ssdc</span>=<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #007800;">sidt</span>=Q5UrfB0BAAA<span style="color: #000000; font-weight: bold;">%</span>3D.oHVGErODzffQ<span style="color: #000000; font-weight: bold;">%</span>2Bms<span style="color: #000000; font-weight: bold;">%</span>2FOKfk53g5naReDKehRNHOBsmJlBu3VTNXjF03SbgX<span style="color: #000000; font-weight: bold;">%</span>2FVEEhmImhR4mlu5IAAjM<span style="color: #000000; font-weight: bold;">%</span>2BdbuXvMMSIb0oU8IGCYpnLcSNkbCIrG<span style="color: #000000; font-weight: bold;">%</span>2BQnm81YmX5<span style="color: #000000; font-weight: bold;">%</span>2Brcrq7U6Qx65<span style="color: #000000; font-weight: bold;">%</span>2F1yaQ2NzgmKD94jg0Iw13iXDen3qD5qn6L<span style="color: #000000; font-weight: bold;">%</span>2FhmmYWwTrcOeuTzGbO<span style="color: #000000; font-weight: bold;">%</span>2BAehpjEU3mrWapRafaq3b4kxyigJ68s8QrGQqZTINNE<span style="color: #000000; font-weight: bold;">%</span>2Bs<span style="color: #000000; font-weight: bold;">%</span>2BoIkZWmGt5kNzoT8fkVAsWJeu3CKFkxj4oVMngeDvpwb1nyFpsJCltOzmAr46fTxVJSpvQdx0<span style="color: #000000; font-weight: bold;">%</span>3D.BMLtjUdIDCcuszktZSvYzA<span style="color: #000000; font-weight: bold;">%</span>3D<span style="color: #000000; font-weight: bold;">%</span>3D<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">continue</span></span>=http<span style="color: #000000; font-weight: bold;">%</span>3A<span style="color: #000000; font-weight: bold;">%</span>2F<span style="color: #000000; font-weight: bold;">%</span>2Fwww.orkut.com<span style="color: #000000; font-weight: bold;">%</span>2FRedirLogin.aspx<span style="color: #000000; font-weight: bold;">%</span>3Fmsg<span style="color: #000000; font-weight: bold;">%</span>3D0<span style="color: #000000; font-weight: bold;">%</span>26ts<span style="color: #000000; font-weight: bold;">%</span>3D1226148773097<span style="color: #000000; font-weight: bold;">%</span>3A1226148773386<span style="color: #000000; font-weight: bold;">%</span>3A1226148774868<span style="color: #000000; font-weight: bold;">%</span>26auth<span style="color: #000000; font-weight: bold;">%</span>3DDQAAAIcAAAC1pPE1QT4chKgrU4B3oyKZrQRkEVPtYlclpESQoXV_d9x9gdoe75Z0hfJ_22Pn5tVMR7j-uV5YCps3NB48L0bFlDeX-4PGHVT6Loztp_ru3tAy_gxDa9_YAEbz4d9CO4wD2VTKtzax9zvpGgrnJVZQfoWPkkIomUmxDtVGoH7g3fA3UjS0vdBJ2PJtgFMElso</pre></div></div>

<p>Replace <em>.co.in</em> with your tld specific to your country. If you paste this url in any browser, it&#8217;ll directly log you in and you can do whatever you want to that account. Remember that all such urls remains valid only for two minutes. So, if you use that url after two minutes, it&#8217;ll lead nowhere.</p>
<p>At the time of writing this post Orkut, Google Docs, Google Calendar, Google Books and Youtube are vulnerable.</p>
<p>So, make sure your squid has stripping mechanism turned on and your squid server is properly firewalled.</p>
<p>You can watch the Video proof for Orkut on <a rel="nofollow" href="http://gofedora.com/goto/http://blip.tv/file/1541246/" >Blip.tv</a>, <a rel="nofollow" href="http://gofedora.com/goto/http://in.youtube.com/watch?v=5u81XNqSHJ4" >Youtube</a>.<br />
<h3>Recommended Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/how-to-install-ati-catalyst-fglrx-98-drivers-fedora-11/"  title="How To: Install ATI Catalyst (fglrx) Drivers">How To: Install ATI Catalyst (fglrx) Drivers</a></li>
<li><a href="http://gofedora.com/fedora-12-ati-catalyst-drivers/"  title="Fedora 12 ATI Catalyst Drivers">Fedora 12 ATI Catalyst Drivers</a></li>
<li><a href="http://gofedora.com/how-to-configure-squid-proxy-server/"  title="How To: Configure Squid Proxy Server">How To: Configure Squid Proxy Server</a></li>
<li><a href="http://gofedora.com/news-ati-catalyst-drivers-10-2-released-no-fedora-12-support/"  title="News: ATI Catalyst Drivers 10.2 Released. No Fedora 12 Support.">News: ATI Catalyst Drivers 10.2 Released. No Fedora 12 Support.</a></li>
<li><a href="http://gofedora.com/news-will-ati-catalyst-drivers-9-12-work-with-fedora-12/"  title="News: Will ATI Catalyst Drivers 9.12 work with Fedora 12?">News: Will ATI Catalyst Drivers 9.12 work with Fedora 12?</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/crack-google-authentication-services-vulnerable/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IntelligentMirror: RPM and DEB Caching Improved (0.5)</title>
		<link>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/</link>
		<comments>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 04:15:28 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[GSOC]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[IntelligentMirror]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[DEB]]></category>
		<category><![CDATA[Parallel Download]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Update Script]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=462</guid>
		<description><![CDATA[After spending a lot of time with youtube cache, now I am trying to devote some time to update intelligentmirror with required features and enhancements that youtube cache already enjoys. In the same direction here is version 0.5 of intelligentmirror.
Improvements

Added max_parallel_downloads options to controll the maximum threading fetching from upstream to cache the packages.
Fine grained [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p>After spending a lot of time with youtube cache, now I am trying to devote some time to update intelligentmirror with required features and enhancements that youtube cache already enjoys. In the same direction here is version 0.5 of intelligentmirror.</p>
<h3><span style="text-decoration: underline;"><strong>Improvements</strong></span></h3>
<ul>
<li>Added max_parallel_downloads options to controll the maximum threading fetching from upstream to cache the packages.</li>
<li>Fine grained control on logging via max_logfile_size and max_logfile_backups option.</li>
<li>Added setup script to help you install intelligentmirror. No need to execute commands one by one for installation. Just run</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># python setup.py install [ENTER]</span></pre></div></div>

<ul>
<li>Added update script (<em>update-im</em>). So in case you decide to change the locations for caching rpm/deb packages, just run</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># update-im [ENTER]</span></pre></div></div>

<p class="rtecenter"><strong>OR</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /usr/sbin/update-im [ENTER]</span></pre></div></div>

<ul>
<li>Download scheduler similar to youtube cache is added to facilitate the download queing in case of large number of requests.</li>
<li>More informative logging.</li>
<li>cache.log is not flooding anymore with XMLRPC logs and python tracebacks.</li>
<li>Added extensive exception handling thoughout the program.</li>
</ul>
<h3><span style="text-decoration: underline;"><strong>Availability</strong></span></h3>
<ol>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/"  target="_blank">RPMs for Fedora/Red Hat/Cent OS</a></li>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/"  target="_blank">Source RPMs for Fedora/Red Hat/Cent OS</a></li>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/"  target="_blank">Source Tar balls</a></li>
</ol>
<h3><span style="text-decoration: underline;"><strong>Installation and Configuration</strong></span></h3>
<p><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/INSTALL"  target="_blank">INSTALL</a> and <a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/Readme"  target="_blank">README</a> files should help you throughout the installation and configuration process.</p>
<p>In case you have questions, ask them here in comments. Suggestions for improvement are welcome <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="IntelligentMirror: RPM and DEB Caching Improved (0.5)" /><br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/intelligentmirror-intelligent-1-0-1/"  title="IntelligentMirror Gets Even More Intelligent (1.0.1)">IntelligentMirror Gets Even More Intelligent (1.0.1)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.4)">IntelligentMirror: RPM and DEB Caching Improved (0.4)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-testing/"  title="IntelligentMirror: Available for Testing">IntelligentMirror: Available for Testing</a></li>
<li><a href="http://gofedora.com/intelligentmirror-gsoc-project-update/"  title="IntelligentMirror: GSOC Project Update">IntelligentMirror: GSOC Project Update</a></li>
<li><a href="http://gofedora.com/javascript-remove-facebook-apps-account/"  title="Javascript To Remove All Facebook Apps From Your Account">Javascript To Remove All Facebook Apps From Your Account</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IntelligentMirror Gets Even More Intelligent (1.0.1)</title>
		<link>http://gofedora.com/intelligentmirror-intelligent-1-0-1/</link>
		<comments>http://gofedora.com/intelligentmirror-intelligent-1-0-1/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 04:09:14 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[GSOC]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[IntelligentMirror]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[DEB]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=456</guid>
		<description><![CDATA[Warning : This version of IntelligentMirror is compatible with only squid-2.7 as of now. It is NOT compatible even with squid-3.0.
IntelligentMirror Version 1.0.1
I have been following squid development regularly (at least the part in which I am interested) and they have introduced a new directive in squid-2.7 known as StoreUrlRewrite (storeurl_rewrite_program). Using this directive you [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p><strong><span style="color: red;">Warning : This version of IntelligentMirror is compatible with only squid-2.7 as of now. It is NOT compatible even with squid-3.0.</span></strong></p>
<h3><span style="text-decoration: underline;"><strong>IntelligentMirror Version 1.0.1</strong></span></h3>
<p>I have been following squid development regularly (at least the part in which I am interested) and they have introduced a new directive in squid-2.7 known as StoreUrlRewrite (storeurl_rewrite_program). Using this directive you can instruct squid to cache url A (http://abc.com/foo/bar/version/crap.rpm) as url B (http://proxy.fedora.co.in/intelligentmirror/crap.rpm). In simple words you can direct squid to cache any url as any other url without any extra efforts.</p>
<p>So keeping the above directive in mind, I have worked out a different version of intelligentmirror especially for squid-2.7.</p>
<h3><span style="text-decoration: underline;"><strong>IntelligentMirror : Old method of operation</strong></span></h3>
<ol>
<li>IntelligentMirror gets a client request for a URL.</li>
<li>Check: if URL is not in (RPM, metadata file)
<ul>
<li>Then its none of our business.</li>
<li>Let proxy handle it the normal way.</li>
<li>Done and exit.</li>
</ul>
</li>
<li>Check: if RPM/metadata is available in cache
<ul>
<li>Stream the RPM/metadata from cache.</li>
<li>Done and exit.</li>
</ul>
</li>
<li>Check: if RPM/metadata is not available in cache
<ul>
<li>Download in parallel for caching in some dir and stream.</li>
<li>Done and exit.</li>
</ul>
</li>
</ol>
<h3><span style="text-decoration: underline;"><strong>IntelligentMirror : New method of operation</strong></span></h3>
<ol>
<li>IntelligentMirror gets a client request for a URL.</li>
<li>Check: if request for rpm
<ol>
<li>Direct squid to cache the request as http://&lt;same_host_all_the_time&gt;/intelligentmirror/&lt;rpmname&gt;.rpm</li>
</ol>
</li>
<li>Check: if request for deb
<ol>
<li>Direct squid to cache the request as http://&lt;same_host_all_the_time&gt;/intelligentmirror/&lt;debname&gt;.deb</li>
</ol>
</li>
<li>Done and exit.</li>
</ol>
<p>So your squid will see every request for an rpm package as a request http://&lt;same_host_all_the_time&gt;/intelligentmirror/&lt;rpmname&gt;.rpm. So, if you happen to request the same rpm from a different mirror, it&#8217;ll still be served from cache <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="IntelligentMirror Gets Even More Intelligent (1.0.1)" /> </p>
<h3><span style="text-decoration: underline;"><strong>Improvements</strong></span></h3>
<ol>
<li>No need to check if the url supplied by squid is for rpm or not because storeurl_rewrite_program has an acl controller attached which will invoke intelligentmirror for urls ending in .rpm .</li>
<li>No need to check if the <strong>url is already cached or not</strong>. No need to worry about the directory where you are going to store the packages. <strong>No human intervention</strong> is needed in maintaining the cache. Almighty squid is doing everything for us.</li>
<li>No need to worry <strong>if the target package has changed</strong> because of the resigning or whatever because squid will do that for you.</li>
<li>No need to actually download the package in parallel for caching because squid is already doing that.</li>
<li>No need to worry about the <strong>hashing algorithms and storage optimizations</strong> for the cached content.</li>
</ol>
<h3><span style="text-decoration: underline;"><strong>Availability</strong></span></h3>
<ol>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/"  target="_blank">RPM for Fedora/Red Hat</a></li>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/"  target="_blank">Source RPM for Fedora/Red Hat</a></li>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/"  target="_blank">Source Tarball</a></li>
</ol>
<h3><span style="text-decoration: underline;"><strong>Install and Configure</strong></span></h3>
<p>The <a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/INSTALL"  target="_blank">install</a> and <a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/intelligentmirror-1.0.1-1/Readme"  target="_blank">configure</a> files should be enough to guide you through the installation if you choose the tar ball way. Otherwise you can always install from rpm from the above link.</p>
<p><strong>Note1: You have to configure your squid to use intelligentmirror as a plugin even if you install via rpm. Check the configure file at the above link.</strong></p>
<p><strong>Note2: StoreUrlRewrite will probably be available in squid-3.1.</strong><br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.5)">IntelligentMirror: RPM and DEB Caching Improved (0.5)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.4)">IntelligentMirror: RPM and DEB Caching Improved (0.4)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-testing/"  title="IntelligentMirror: Available for Testing">IntelligentMirror: Available for Testing</a></li>
<li><a href="http://gofedora.com/intelligentmirror-gsoc-project-update/"  title="IntelligentMirror: GSOC Project Update">IntelligentMirror: GSOC Project Update</a></li>
<li><a href="http://gofedora.com/news-memepress-yahoo-meme-wordpress-plugin-version-0-3/"  title="News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available">News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/intelligentmirror-intelligent-1-0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IntelligentMirror: RPM and DEB Caching Improved (0.4)</title>
		<link>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/</link>
		<comments>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 04:06:47 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[GSOC]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[IntelligentMirror]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[DEB]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=454</guid>
		<description><![CDATA[IntelligentMirror version 0.4 is available now. There have been significant improvements in intelligent mirror since last release.
Improvements

Fixed defunct process problem. You will not see defunct python processes hanging around anymore. Previously every forked daemon used to got defucnt because parent never waited for the forked child to finish.
IntelligentMirror now supports caching of Debian packages just [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p>IntelligentMirror version 0.4 is available now. There have been significant improvements in intelligent mirror since last release.</p>
<h3><span style="text-decoration: underline;"><strong>Improvements</strong></span></h3>
<ol>
<li><strong>Fixed defunct process problem</strong>. You will not see defunct python processes hanging around anymore. Previously every forked daemon used to got defucnt because parent never waited for the forked child to finish.</li>
<li>IntelligentMirror now <strong>supports caching of Debian packages</strong> just like rpms. So now IntelligentMirror is best suited shared environments where people have different tastes.</li>
<li>Intelligent Mirror now uses url_rewrite_program instead of redirect_program. This <strong>boosts the efficiency of IntelligentMirror by a significant factor</strong> as url_rewrite_program has an acl controller url_rewrite_access. And using url_rewrite_access only requests for rpm/deb packages will be passed to Intelligent Mirror. So, IM now need not process each and every incoming request. Also, it has redirector_bypass directive which will bypass IM in case all the instances of IM are busy serving requests. So, <strong>squid will not die with a fatal error</strong> in case of huge requests.</li>
<li><strong>Options to enable/disable caching</strong> for rpm and Debian packages have been added.</li>
<li><strong>Options to control the total size of caching directories and the size of individual package</strong> to be cached have also been introduced.</li>
<li><strong>Proxy authentication is also supported</strong> now just the way it is supported in yum.</li>
<li>Packages are not checked for last-modified time anymore. Because in principle two rpms A and B can only have same name iff they have the same contents. So, the <strong>delay in response time in case of hits has reduced</strong>.</li>
</ol>
<h3><span style="text-decoration: underline;"><strong>Availability</strong></span></h3>
<ol>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/"  target="_blank">RPMs for Fedora/Red Hat</a></li>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/"  target="_blank">Source RPMs for Fedora/Red Hat</a></li>
<li><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/"  target="_blank">Source Tar balls</a></li>
</ol>
<p>Installation and configuration is easy and the <a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/INSTALL"  target="_blank">INSTALL</a> and <a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/Readme"  target="_blank">README</a> files should serve the purpose.</p>
<p>In case you have any suggestions or problems, leave a comment here or file a ticket on <a rel="nofollow" href="http://gofedora.com/goto/https://fedorahosted.org/intelligentmirror"  target="_blank">project page</a>.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.5)">IntelligentMirror: RPM and DEB Caching Improved (0.5)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-intelligent-1-0-1/"  title="IntelligentMirror Gets Even More Intelligent (1.0.1)">IntelligentMirror Gets Even More Intelligent (1.0.1)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-testing/"  title="IntelligentMirror: Available for Testing">IntelligentMirror: Available for Testing</a></li>
<li><a href="http://gofedora.com/intelligentmirror-gsoc-project-update/"  title="IntelligentMirror: GSOC Project Update">IntelligentMirror: GSOC Project Update</a></li>
<li><a href="http://gofedora.com/news-memepress-yahoo-meme-wordpress-plugin-version-0-3/"  title="News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available">News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IntelligentMirror: Available for Testing</title>
		<link>http://gofedora.com/intelligentmirror-testing/</link>
		<comments>http://gofedora.com/intelligentmirror-testing/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 04:12:52 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[GSOC]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[IntelligentMirror]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Test]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=460</guid>
		<description><![CDATA[Note : A newer version of intelligentmirror is available now. Please check this.
Intelligent Mirror is basically a tool or squid plugin (redirector) to cache rpm packages so that the subsequent requests for the same package can be served from the local cache which will eventually save a lot of bandwidth and downloading time.
Who needs Intelligent [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p><span style="color: red;"><strong>Note : A newer version of intelligentmirror is available now. Please </strong><a href="http://gofedora.com/archives/category/intelligentmirror/"  target="_self"><strong>check this</strong></a><strong>.</strong></span></p>
<p>Intelligent Mirror is basically a tool or squid plugin (redirector) to cache rpm packages so that the subsequent requests for the same package can be served from the local cache which will eventually save a lot of bandwidth and downloading time.</p>
<h3><strong>Who needs Intelligent Mirror?</strong></h3>
<ol>
<li>If you are on a shared network where a lot of people use linux distros with RPM as their package manager, then you need this. Universities should come under this category.</li>
<li>If you have a set of systems having red hat derivatives and almost identical OS versions, you need this. LAN setups at home should come under this category.</li>
<li>If you can&#8217;t afford to or don&#8217;t want to mirror entire fedora repo for local access due to bandwidth limitations, you need this.</li>
</ol>
<h3><strong>What it does?</strong></h3>
<p>As described above, Intelligent Mirror, just caches rpms which are requested by the clients in a shared network. And subsequent requests for those rpms are served from the cache. For a detailed description, check the <a rel="nofollow" href="http://gofedora.com/goto/https://fedorahosted.org/intelligentmirror"  target="_blank">project page</a>.</p>
<h3><strong>Why not use Squid in caching mode?</strong></h3>
<p>Squid caching is based on url hashing. Let me explain with an example how Intelligent Mirror is actually intelligent as compared to squid while caching rpms.</p>
<p>Let us say there is an rpm yum-3.2.0-1.fc7.i386.rpm . You executed &#8220;<em>yum update yum</em>&#8220;. And let us say the newer version of yum is yum-3.2.18-1.fc9.i386.rpm which was fetched from one of the fedora mirrors http://abc.com/ (say). Now someone on the same network launched &#8220;<em>yum update yum</em>&#8221; and he got the same rpm yum-3.2.18-1.fc9.i386.rpm. But this time rpm was fetched from another mirror http://xyz.com/ (say).</p>
<p><strong><span style="text-decoration: underline;">Case I : Squid caching</span></strong></p>
<p>Squid will cache http://abc.com/linux/fc9/updates/i386/yum-3.2.18-1.fc9.i386.rpm . And when http://xyz.com/linux/fc9/updates/i386/yum-3.2.18-1.fc9.i386.rpm will be requested, it&#8217;ll result in a cache miss and squid will again download the same package and will cache this one as well. Now there are two problems</p>
<ol>
<li>Squid is not able to serve from the cache, though the package was the same.</li>
<li>Additional storage space is being wasted in caching the same package. And this can really harm if unluckily a different mirror is picked in all the subsequent queries.</li>
</ol>
<p><span style="text-decoration: underline;"><strong>Case II : IntelligentMirror caching</strong></span></p>
<p>Intelligent Mirror will cache the package yum-3.2.18-1.fc9.i386.rpm without bothering about its origin. And even if yum picks up a different mirror for the subsequent request, the package will be served from the cache and will not be fetched from upstream. So, the obvious advantage of saving the bandwidth and downloading time.</p>
<h3><strong>Download</strong></h3>
<p>Intelligent Mirror source tarball, rpm, source rpm are available for download from <a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/"  target="_blank">here</a>.</p>
<h3><strong>Installing and Configuring Intelligent Mirror</strong></h3>
<p><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/INSTALL"  target="_blank">Install Guide</a></p>
<p><a rel="nofollow" href="http://gofedora.com/goto/http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/Readme"  target="_blank">Configuration Guide</a></p>
<h3><strong>Issues and Suggestions</strong></h3>
<p>If you see any issue or you have any suggestions for improving the functionality, either mail me at kulbirsaini25 AT GMAIL DoT COM or file a ticket on the <a rel="nofollow" href="http://gofedora.com/goto/https://fedorahosted.org/intelligentmirror/newticket"  target="_blank">project page</a>.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.5)">IntelligentMirror: RPM and DEB Caching Improved (0.5)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-intelligent-1-0-1/"  title="IntelligentMirror Gets Even More Intelligent (1.0.1)">IntelligentMirror Gets Even More Intelligent (1.0.1)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.4)">IntelligentMirror: RPM and DEB Caching Improved (0.4)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-gsoc-project-update/"  title="IntelligentMirror: GSOC Project Update">IntelligentMirror: GSOC Project Update</a></li>
<li><a href="http://gofedora.com/news-memepress-yahoo-meme-wordpress-plugin-version-0-3/"  title="News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available">News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/intelligentmirror-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IntelligentMirror: GSOC Project Update</title>
		<link>http://gofedora.com/intelligentmirror-gsoc-project-update/</link>
		<comments>http://gofedora.com/intelligentmirror-gsoc-project-update/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 04:03:24 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[GSOC]]></category>
		<category><![CDATA[IntelligentMirror]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=452</guid>
		<description><![CDATA[Brief Introduction
IntelligentMirror can be used to create a mirror of static HTTP content on your local network. When you download something (say a software package) from Internet, it is stored/cached on a local machine on your network and subsequent downloads of that particular software package are supplied from the storage/cache of the local machine. This [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><h3><strong>Brief Introduction</strong></h3>
<blockquote><p><a rel="nofollow" href="http://gofedora.com/goto/https://fedorahosted.org/intelligentmirror/wiki/IntelligentMirror" class="wiki" ><em>IntelligentMirror</em></a><em> can be used to create a mirror of static HTTP content on your local network. When you download something (say a software package) from Internet, it is stored/cached on a local machine on your network and subsequent downloads of that particular software package are supplied from the storage/cache of the local machine. This facilitate the efficient usage of bandwidth and also reduces the average download time. IntelligentMirror can also do pre-fetching of RPM packages from fedora repositories spread all over the world and can also pre-populate the local repo with popular packages like mplayer, vlc, gstreamer which are normally accessed immediately after a fresh install.</em></p></blockquote>
<h3><strong>Definition for a lay man</strong></h3>
<blockquote><p><em>Think of Internet as a hard disk, your proxy server as a cache and your Intranet as a CPU. Now, whenever your CPU needs to process something, it needs data from cache. If data is not there in cache, it&#8217;ll be fetched from RAM and/or hard disk. IntelligentMirror sits on your proxy server and keep caching packages in a browsable manner which can be served via http for subsequent requests.</em></p></blockquote>
<p>For further details about IntelligentMirror, go <a rel="nofollow" href="http://gofedora.com/goto/https://fedorahosted.org/intelligentmirror/wiki/IntelligentMirror"  target="_blank">here</a>.</p>
<h3><strong>Update</strong></h3>
<p>After getting the hosting space on <a rel="nofollow" href="http://gofedora.com/goto/http://fedorahosted.org"  target="_blank">fedorahosted.org</a>, I pushed the code I have written. You can check the source tree <a rel="nofollow" href="http://gofedora.com/goto/http://git.fedorahosted.org/git/intelligentmirror.git"  target="_blank">here</a>.</p>
<p>We are buidling IntelligentMirror as a plugin to squid which taps requests from clients and checks them against a cache. Checkout <a href="http://gofedora.com/archives/2008/04/30/howto-write-custom-redirector-rewritor-plugin-squid-python/"  target="_self">how to write a custom redirector or how to tap requests to squid</a>. And acts accordingly. We are working on live streaming the partially downloaded package to the end user while caching it.</p>
<p>If you have any suggestion, feel free to leave them as a comment here or edit the wiki page <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="IntelligentMirror: GSOC Project Update" /><br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.5)">IntelligentMirror: RPM and DEB Caching Improved (0.5)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-intelligent-1-0-1/"  title="IntelligentMirror Gets Even More Intelligent (1.0.1)">IntelligentMirror Gets Even More Intelligent (1.0.1)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.4)">IntelligentMirror: RPM and DEB Caching Improved (0.4)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-testing/"  title="IntelligentMirror: Available for Testing">IntelligentMirror: Available for Testing</a></li>
<li><a href="http://gofedora.com/news-memepress-yahoo-meme-wordpress-plugin-version-0-3/"  title="News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available">News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/intelligentmirror-gsoc-project-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: Configure Squid Proxy Server</title>
		<link>http://gofedora.com/how-to-configure-squid-proxy-server/</link>
		<comments>http://gofedora.com/how-to-configure-squid-proxy-server/#comments</comments>
		<pubDate>Fri, 02 May 2008 08:31:31 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Traffic Monitoring]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=3</guid>
		<description><![CDATA[
Mission
To configure squid for simple proxying without caching anything.
Use Cases

When you want to have control on what people browse on your lan.
When number of machine is more than the number of IP addresses you can afford to buy.
When you want to help this holy world in saving some IPV4 addresses  

Assumptions

You have a machine [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://gofedora.com/how-to-configure-squid-proxy-server/" class="post_image_link"  title="Permanent link to How To: Configure Squid Proxy Server"><img class="post_image alignnone" src="http://gofedora.com/wp-content/uploads/2008/05/Squid-Caching-Proxy-Server.jpg" width="384" height="204" alt="Squid Caching Proxy Server" title="How To: Configure Squid Proxy Server" /></a>
</p><h4><strong>Mission</strong></h4>
<p>To configure squid for simple proxying without caching anything.</p>
<h4><strong>Use Cases</strong></h4>
<ol>
<li>When you want to have control on what people browse on your lan.</li>
<li>When number of machine is more than the number of IP addresses you can afford to buy.</li>
<li>When you want to help this holy world in saving some IPV4 addresses <img src='http://gofedora.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' title="How To: Configure Squid Proxy Server" /> </li>
</ol>
<h4><strong>Assumptions</strong></h4>
<ol>
<li>You have a machine connected directly to internet that you are going to use as a proxy server for other machines on your network.</li>
<li>The machines on your network are using 192.168.0.0/16 as private address space. You can use anyone/multiple address spaces of the available but for this howto we assume 192.168.0.0/16 as the local network.</li>
<li>The local IP address of the machine which will run squid proxy server is 192.168.36.204. You can have any IP, but for this howto we assume this.</li>
</ol>
<h4><strong>How to proceed</strong></h4>
<p>First of all ensure that you have squid installed. After installing squid, you need to set access control in squid configuration file which resides in <em>/etc/squid</em> by default. Open <em>/etc/squid/squid.conf</em> and add/edit following lines according to your preferences. Few lines already exist in the configuration file, you can add the rest.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># The port on which squid will listen for requests</span>
http_port <span style="color: #000000;">8080</span>
<span style="color: #666666; font-style: italic;"># If 'cgi-bin' or '?' is in query, squid should not check with neighbours'/parents' cache</span>
<span style="color: #666666; font-style: italic;"># and should go to target web-server.</span>
hierarchy_stoplist cgi-bin ?
<span style="color: #666666; font-style: italic;"># If url contains 'cgi-bin' or '?', then it must not be cached</span>
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
<span style="color: #666666; font-style: italic;"># Absolute path to squid access log.</span>
access_log <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>squid<span style="color: #000000; font-weight: bold;">/</span>access.log squid
refresh_pattern ^<span style="color: #c20cb9; font-weight: bold;">ftp</span>:           <span style="color: #000000;">1440</span>    <span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span>     <span style="color: #000000;">10080</span>
refresh_pattern ^gopher:        <span style="color: #000000;">1440</span>    <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">%</span>      <span style="color: #000000;">1440</span>
refresh_pattern .               <span style="color: #000000;">0</span>       <span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span>     <span style="color: #000000;">4320</span>
<span style="color: #666666; font-style: italic;"># Access control list to control every IP address</span>
acl all src 0.0.0.0<span style="color: #000000; font-weight: bold;">/</span>0.0.0.0
<span style="color: #666666; font-style: italic;"># Access control list for source machine in LAN</span>
acl lan_src src 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span>
<span style="color: #666666; font-style: italic;"># Access control list for destination machine in LAN</span>
acl lan_dst dst 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span>
<span style="color: #666666; font-style: italic;"># Access control list to manage squid cache</span>
acl manager proto cache_object
<span style="color: #666666; font-style: italic;"># Access control list to define IP address allowed for source localhost</span>
acl localhost src 127.0.0.1<span style="color: #000000; font-weight: bold;">/</span>255.255.255.255
<span style="color: #666666; font-style: italic;"># Access control list to define IP addresses allowed for localhost as destination</span>
acl to_localhost dst 127.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span>
<span style="color: #666666; font-style: italic;"># Access control list to define Safe ports that should be allowed by default</span>
acl SSL_ports port <span style="color: #000000;">443</span> <span style="color: #000000;">563</span> <span style="color: #000000;">1863</span> <span style="color: #000000;">5190</span> <span style="color: #000000;">5222</span> <span style="color: #000000;">5050</span> <span style="color: #000000;">6667</span>
acl Safe_ports port <span style="color: #000000;">80</span>          <span style="color: #666666; font-style: italic;"># http</span>
acl Safe_ports port <span style="color: #000000;">21</span>          <span style="color: #666666; font-style: italic;"># ftp</span>
acl Safe_ports port <span style="color: #000000;">443</span>         <span style="color: #666666; font-style: italic;"># https</span>
acl Safe_ports port <span style="color: #000000;">70</span>          <span style="color: #666666; font-style: italic;"># gopher</span>
acl Safe_ports port <span style="color: #000000;">210</span>         <span style="color: #666666; font-style: italic;"># wais</span>
acl Safe_ports port <span style="color: #000000;">1025</span>-<span style="color: #000000;">65535</span>  <span style="color: #666666; font-style: italic;"># unregistered ports</span>
acl Safe_ports port <span style="color: #000000;">280</span>         <span style="color: #666666; font-style: italic;"># http-mgmt</span>
acl Safe_ports port <span style="color: #000000;">488</span>         <span style="color: #666666; font-style: italic;"># gss-http</span>
acl Safe_ports port <span style="color: #000000;">591</span>         <span style="color: #666666; font-style: italic;"># filemaker</span>
acl Safe_ports port <span style="color: #000000;">777</span>         <span style="color: #666666; font-style: italic;"># multiling http</span>
acl CONNECT method CONNECT
<span style="color: #666666; font-style: italic;"># Allow cache management only from localhost</span>
http_access allow manager localhost
<span style="color: #666666; font-style: italic;"># Deny cache management from remote hosts</span>
http_access deny manager
<span style="color: #666666; font-style: italic;"># Deny http access via all the ports which are not listed as safe</span>
http_access deny <span style="color: #000000; font-weight: bold;">!</span>Safe_ports
<span style="color: #666666; font-style: italic;"># Deny all connections via all ports which are not listed as safe</span>
http_access deny CONNECT <span style="color: #000000; font-weight: bold;">!</span>SSL_ports
<span style="color: #666666; font-style: italic;"># Allow http access from localhost</span>
http_access allow localhost
<span style="color: #666666; font-style: italic;"># Allow http access from machines on LAN</span>
http_access allow lan_src
http_access deny all
http_reply_access allow all
icp_access allow all
<span style="color: #666666; font-style: italic;"># Deny caching for everyone so that there is not caching at all</span>
cache deny all
coredump_dir <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>spool<span style="color: #000000; font-weight: bold;">/</span>squid
<span style="color: #666666; font-style: italic;"># Never allow direct connection to machines on the internet</span>
prefer_direct off
never_direct allow all
<span style="color: #666666; font-style: italic;"># Allow direct connetion if the destination machine is on LAN</span>
always_direct allow lan_dst
<span style="color: #666666; font-style: italic;"># Delete this line if you don't have /etc/hosts file</span>
hosts_file <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts
<span style="color: #666666; font-style: italic;"># Allow AIM connections</span>
<span style="color: #666666; font-style: italic;"># Delete the following 9 lines if you don't want people to connect to AIM</span>
acl AIM_ports port <span style="color: #000000;">5190</span> <span style="color: #000000;">9898</span> <span style="color: #000000;">6667</span>
acl AIM_domains dstdomain .oscar.aol.com .blue.aol.com .freenode.net
acl AIM_domains dstdomain .messaging.aol.com .aim.com
acl AIM_hosts dstdomain login.oscar.aol.com login.glogin.messaging.aol.com toc.oscar.aol.com irc.freenode.net
acl AIM_nets dst 64.12.0.0<span style="color: #000000; font-weight: bold;">/</span>255.255.0.0
acl AIM_methods method CONNECT
http_access allow AIM_methods AIM_ports AIM_nets
http_access allow AIM_methods AIM_ports AIM_hosts
http_access allow AIM_methods AIM_ports AIM_domains
<span style="color: #666666; font-style: italic;"># Allow connections to Yahoo Messenger</span>
<span style="color: #666666; font-style: italic;"># Delete the following 6 lines if you don't want people to connect to Yahoo Messenger</span>
acl YIM_ports port <span style="color: #000000;">5050</span>
acl YIM_domains dstdomain .yahoo.com .yahoo.co.jp
acl YIM_hosts dstdomain scs.msg.yahoo.com cs.yahoo.co.jp
acl YIM_methods method CONNECT
http_access allow YIM_methods YIM_ports YIM_hosts
http_access allow YIM_methods YIM_ports YIM_domains
<span style="color: #666666; font-style: italic;"># Allow connections to Google Talk</span>
<span style="color: #666666; font-style: italic;"># Delete the following 6 lines if you don't want people to connect to Google Talk</span>
acl GTALK_ports port <span style="color: #000000;">5222</span> <span style="color: #000000;">5050</span>
acl GTALK_domains dstdomain .google.com
acl GTALK_hosts dstdomain talk.google.com
acl GTALK_methods method CONNECT
http_access allow GTALK_methods GTALK_ports GTALK_hosts
http_access allow GTALK_methods GTALK_ports GTALK_domains
<span style="color: #666666; font-style: italic;"># Allow connections to MSN</span>
<span style="color: #666666; font-style: italic;"># Delete the following 6 lines if you don't want people to connect to Google Talk</span>
acl MSN_ports port <span style="color: #000000;">1863</span> <span style="color: #000000;">443</span> <span style="color: #000000;">1503</span>
acl MSN_domains dstdomain .microsoft.com .hotmail.com .live.com .msft.net .msn.com .passport.com
acl MSN_hosts dstdomain messenger.hotmail.com
acl MSN_nets dst 207.46.111.0<span style="color: #000000; font-weight: bold;">/</span>255.255.255.0
acl MSN_methods method CONNECT
http_access allow MSN_methods MSN_ports MSN_hosts</pre></div></div>

<p>Now, start the squid proxy server as</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">service squid start</pre></div></div>

<p>Also, if you want squid to be started every time you boot the machine, execute the following command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chkconfig <span style="color: #660033;">--level</span> <span style="color: #000000;">345</span> squid on</pre></div></div>

<p>You have a squid proxy server running now. You can ask clients to configure there browsers to use <em>192.168.36.204</em> as a proxy server with <em>8080</em> as proxy port. Command line utilities like elinks, lynx, yum, wget etc. can be asked to use proxy by exporting <em>http_proxy</em> variable as below. Users can also add these lines to <em>~/.bashrc</em> file to avoid exporting every-time.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">http_proxy</span>=<span style="color: #ff0000;">'http://192.168.36.204:8080'</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">ftp_proxy</span>=<span style="color: #ff0000;">'http://192.168.36.204:8080'</span></pre></div></div>

<p>I highly recommend the book &#8220;<span id="btAsinTitle"><strong>Squid: The Definitive Guide (Paperback)</strong>&#8221; for further reading.<br />
</span></p>
<p><span>[amazon-product alink="0000FF" bordercolor="000000" height="240"]0596001622[/amazon-product]<br />
</span><br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.5)">IntelligentMirror: RPM and DEB Caching Improved (0.5)</a></li>
<li><a href="http://gofedora.com/configure-caching-nameserver-named/"  title="How To: Configure Caching Nameserver (named)">How To: Configure Caching Nameserver (named)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-intelligent-1-0-1/"  title="IntelligentMirror Gets Even More Intelligent (1.0.1)">IntelligentMirror Gets Even More Intelligent (1.0.1)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.4)">IntelligentMirror: RPM and DEB Caching Improved (0.4)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-testing/"  title="IntelligentMirror: Available for Testing">IntelligentMirror: Available for Testing</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-configure-squid-proxy-server/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
		<item>
		<title>How To: Write Custom Redirector or Rewritor Plugin For Squid in Python</title>
		<link>http://gofedora.com/how-to-write-custom-redirector-rewritor-plugin-squid-python/</link>
		<comments>http://gofedora.com/how-to-write-custom-redirector-rewritor-plugin-squid-python/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 19:31:26 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Redirector]]></category>
		<category><![CDATA[Rewritor]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=211</guid>
		<description><![CDATA[Mission
To write a custom Python program which can act as a plugin for Squid to redirect a given URL to another URL. This is useful when already existing redirector plugins for Squid doesn&#8217;t suit your needs or you want everything of your own.
Use Cases

When you want to redirect URLs using a database like mysql or [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><h4><b>Mission</b></h4>
<p>To write a custom Python program which can act as a plugin for Squid to redirect a given URL to another URL. This is useful when already existing redirector plugins for Squid doesn&#8217;t suit your needs or you want everything of your own.</p>
<h4><b>Use Cases</b></h4>
<ol>
<li>When you want to redirect URLs using a database like mysql or postgresql.</li>
<li>When you want to redirect based on mappings stored in simple text files.</li>
<li>When you want to build a redirector which can learn by itself using AI techniques <img src='http://gofedora.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' title="How To: Write Custom Redirector or Rewritor Plugin For Squid in Python" /> </li>
</ol>
<h4><b>How to proceed</b></h4>
<p>From <a rel="nofollow" href="http://gofedora.com/goto/http://wiki.squid-cache.org/SquidFaq"  target="_blank">Squid FAQ</a>,</p>
<blockquote><p><i>The redirector program must read URLs (one per line) on standard input, and write rewritten URLs or blank lines on standard output.  Note that the redirector program can not use buffered I/O.  Squid writes additional information after the URL which a redirector can use to make a decision.<i></i></i></p></blockquote>
<p>The format of the line read from the standard input by the program is as follows.</p>
<p>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">URL ip-address<span style="color: #000000; font-weight: bold;">/</span>fqdn ident method
<span style="color: #666666; font-style: italic;"># for example</span>
http:<span style="color: #000000; font-weight: bold;">//</span>saini.co.in 172.17.8.175<span style="color: #000000; font-weight: bold;">/</span>saini.co.in - GET -</pre></td></tr></table></div>

</p>
<p>The implementation sounds very simple and it is indeed very simple to implement. The only thing that should be taken care of is the unbuffered I/O. You should immediately flush the output to standard output once decision is taken.</p>
<p>For this howto, we assume we have a method called &#8216;<i>modify_url()</i>&#8216; which returns either a blank line or a modified URL to which the client should be redirected.</p>
<p>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">def</span> modify_url<span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>:
    <span style="color: #008000;">list</span> = line.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">' '</span><span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;"># first element of the list is the URL</span>
    old_url = <span style="color: #008000;">list</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
    new_url = <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span>
    <span style="color: #808080; font-style: italic;"># take the decision and modify the url if needed</span>
    <span style="color: #808080; font-style: italic;"># do remember that the new_url should contain a '\n' at the end.</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> old_url.<span style="color: black;">endswith</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'.avi'</span><span style="color: black;">&#41;</span>:
        new_url = <span style="color: #483d8b;">'http://fedora.co.in/errors/accessDenied.html'</span> + new_url
    <span style="color: #ff7700;font-weight:bold;">return</span> new_url
&nbsp;
<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span>:
    <span style="color: #808080; font-style: italic;"># the format of the line read from stdin is</span>
    <span style="color: #808080; font-style: italic;"># URL ip-address/fqdn ident method</span>
    <span style="color: #808080; font-style: italic;"># for example</span>
    <span style="color: #808080; font-style: italic;"># http://saini.co.in 172.17.8.175/saini.co.in - GET -</span>
    line = <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdin</span>.<span style="color: #dc143c;">readline</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;"># new_url is a simple URL only</span>
    <span style="color: #808080; font-style: italic;"># for example</span>
    <span style="color: #808080; font-style: italic;"># http://fedora.co.in</span>
    new_url = modify_url<span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>
    <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span>new_url<span style="color: black;">&#41;</span>
    <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">flush</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

</p>
<p>Save the above file somewhere. We save this example file in <i>/etc/squid/custom_redirect.py</i>. Now, we have the function for redirecting clients. We need to configure squid to use custom_redirect.py . Below is the squid configuration for telling squid to use the above program as redirector.</p>
<p>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Add these lines to /etc/squid/squid.conf file.</span>
<span style="color: #666666; font-style: italic;"># /usr/bin/python should be replaced by the path to python executable if you installed it somewhere else.</span>
redirect_program <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>python <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>squid<span style="color: #000000; font-weight: bold;">/</span>custom_redirect.py
<span style="color: #666666; font-style: italic;"># Number of instances of the above program that should run concurrently.</span>
<span style="color: #666666; font-style: italic;"># 5 is good enough but you should go for 10 at least. Anything below 5 would not work properly.</span>
redirect_children <span style="color: #000000;">5</span></pre></td></tr></table></div>

</p>
<p>Now, start/reload/restart squid. That&#8217;s all we need to write and use a custom redirector plugin for squid.</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/news-memepress-yahoo-meme-wordpress-plugin-version-0-3/"  title="News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available">News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available</a></li>
<li><a href="http://gofedora.com/how-to-save-stupid-tech-support-questions/"  title="How To: Save yourself from stupid Tech Support Questions">How To: Save yourself from stupid Tech Support Questions</a></li>
<li><a href="http://gofedora.com/memepress-ready-translated-supports-turkish/"  title="Memepress Ready to be Translated (Supports Turkish now)">Memepress Ready to be Translated (Supports Turkish now)</a></li>
<li><a href="http://gofedora.com/news-memepress-yahoo-meme-wordpress-plugin/"  title="News: Memepress (Yahoo! Meme) Wordpress Plugin is out!">News: Memepress (Yahoo! Meme) Wordpress Plugin is out!</a></li>
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.5)">IntelligentMirror: RPM and DEB Caching Improved (0.5)</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-write-custom-redirector-rewritor-plugin-squid-python/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To: Write Custom Basic Authentication Plugin for Squid in Python</title>
		<link>http://gofedora.com/how-to-write-custom-basic-authentication-plugin-squid-python/</link>
		<comments>http://gofedora.com/how-to-write-custom-basic-authentication-plugin-squid-python/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 19:37:19 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Basic Authentication]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[NTLM]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=217</guid>
		<description><![CDATA[Mission
To write a Python program which can be used to authenticate for Squid proxy server. This is useful when you don&#8217;t want to configure complex systems like LDAP, ntlm etc.
Use Cases

When you want to authenticate clients using mysql database.
When you want to authenticate clients using flat files or /etc/passwd file or some custom service on [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><h4><b>Mission</b></h4>
<p>To write a Python program which can be used to authenticate for Squid proxy server. This is useful when you don&#8217;t want to configure complex systems like LDAP, ntlm etc.</p>
<h4><b>Use Cases</b></h4>
<ol>
<li>When you want to authenticate clients using mysql database.</li>
<li>When you want to authenticate clients using flat files or /etc/passwd file or some custom service on your network.</li>
</ol>
<h4><b>How to proceed</b></h4>
<p>From auth_param section in squid.conf file:</p>
<blockquote><p><i>Specify the command for the external authenticator. Such a program reads a line containing &quot;username password&quot; and replies &quot;OK&quot; or &quot;ERR&quot; in an endless loop. &quot;ERR&quot; responses may optionally be followed by a error description available as %m in the returned error page.</p>
<p> By default, the basic authentication scheme is not used unless a program is specified.</i></p></blockquote>
<p>That clearly states that our python program should read a line from standard input (stdin) and write the appropriate response to the standard output (stdout). But there are some issues with I/O. The output should be unbuffered and should be flushed to standard output immediately after the response is known.</p>
<p>So, lets see a small program where we authenticate using a function &#8216;<i>matchpassword()</i>&#8216;. This function returns <i>True</i> when username, password pair matches and returns <i>False</i> when they mismatch.</p>
<p>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">socket</span>
<span style="color: #483d8b;">&quot;&quot;&quot;USAGE:The function returns True if the user and passwd match False otherwise&quot;&quot;&quot;</span>
<span style="color: #ff7700;font-weight:bold;">def</span> matchpasswd<span style="color: black;">&#40;</span>login,passwd<span style="color: black;">&#41;</span>:
    <span style="color: #808080; font-style: italic;"># Write your own function definition. </span>
    <span style="color: #808080; font-style: italic;"># Use mysql, files, /etc/passwd or some service or whatever you want</span>
    <span style="color: #ff7700;font-weight:bold;">pass</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span>:
    <span style="color: #808080; font-style: italic;"># read a line from stdin</span>
    line = <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdin</span>.<span style="color: #dc143c;">readline</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;"># remove '\n' from line</span>
    line = line.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;"># extract username and password from line</span>
    username = line<span style="color: black;">&#91;</span>:line.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">' '</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>
    password = line<span style="color: black;">&#91;</span>line.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">' '</span><span style="color: black;">&#41;</span>+<span style="color: #ff4500;">1</span>:<span style="color: black;">&#93;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> matchpasswd<span style="color: black;">&#40;</span>username, password<span style="color: black;">&#41;</span>:
        <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'OK<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'ERR<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;"># Flush the output to stdout.</span>
    <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">flush</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

</p>
<p>Save the above file somewhere. We save this example file in <i>/etc/squid/custom_auth.py</i> .Now, we have the function for authenticating clients. We need to configure squid to use custom_auth.py . Below is the squid configuration for telling squid to use the above program as basic authenticator.</p>
<p>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># you need to specify /usr/bin/python if your file is not executable and needs an interpreter to be invoked.</span>
<span style="color: #666666; font-style: italic;"># Replace /usr/bin/python with /usr/bin/php , if you write auth program in php.</span>
auth_param basic program <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>python <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>squid<span style="color: #000000; font-weight: bold;">/</span>custom_auth.py
<span style="color: #666666; font-style: italic;"># how many instances of the above program should run concurrently</span>
auth_param basic children <span style="color: #000000;">5</span>
<span style="color: #666666; font-style: italic;"># display some message to clients when they are asked for username, password</span>
auth_param basic realm Please enter your proxy server username and password
<span style="color: #666666; font-style: italic;"># for how much time the authentication should be valid</span>
auth_param basic credentialsttl <span style="color: #000000;">2</span> hours
<span style="color: #666666; font-style: italic;"># whether username, password should be case sensitive or not</span>
auth_param basic casesensitive on</pre></td></tr></table></div>

</p>
<p>Now, to force clients to authenticate, configure the acls as follow. Below we assume, you want to force all clients on your lan to authenticate for using proxy server.</p>
<p>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># acl to force proxy authentication</span>
acl authenticated proxy_auth REQUIRED
<span style="color: #666666; font-style: italic;"># acl to define IPs from your lan</span>
acl lan src 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span>
<span style="color: #666666; font-style: italic;"># acl to force clients on your lan to authenticate</span>
http_access allow lan authenticated</pre></td></tr></table></div>

</p>
<p>Now, reload/restart squid. That&#8217;s all we need to write and use a custom authentication plugin for squid.</p>
<h4><b>Limitation</b></h4>
<p>Username can&#8217;t contain spaces. Otherwise program will not be able to parse/extract username, password from standard input.</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/news-memepress-yahoo-meme-wordpress-plugin-version-0-3/"  title="News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available">News : Memepress (Yahoo! Meme) Wordpress Plugin Version 0.3 is available</a></li>
<li><a href="http://gofedora.com/how-to-save-stupid-tech-support-questions/"  title="How To: Save yourself from stupid Tech Support Questions">How To: Save yourself from stupid Tech Support Questions</a></li>
<li><a href="http://gofedora.com/memepress-ready-translated-supports-turkish/"  title="Memepress Ready to be Translated (Supports Turkish now)">Memepress Ready to be Translated (Supports Turkish now)</a></li>
<li><a href="http://gofedora.com/news-memepress-yahoo-meme-wordpress-plugin/"  title="News: Memepress (Yahoo! Meme) Wordpress Plugin is out!">News: Memepress (Yahoo! Meme) Wordpress Plugin is out!</a></li>
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.5)">IntelligentMirror: RPM and DEB Caching Improved (0.5)</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-write-custom-basic-authentication-plugin-squid-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Configure Hierarchicy of Proxy Servers (Squid)</title>
		<link>http://gofedora.com/how-to-configure-hierarchicy-proxy-servers-squid/</link>
		<comments>http://gofedora.com/how-to-configure-hierarchicy-proxy-servers-squid/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 10:51:13 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Proxy Server]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Bandwidth Management]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Hierarchical Caching]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=16</guid>
		<description><![CDATA[Yesterday I came across this idea of caching all the data that I browse on my hard disk so that the average load time of a website decreases. Actually the idea is I&#8217;ll cache all the static data that I browse like images, static html pages, CSS files and similar things which does not change [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p>Yesterday I came across this idea of caching all the data that I browse on my hard disk so that the average load time of a website decreases. Actually the idea is I&#8217;ll cache all the static data that I browse like images, static html pages, CSS files and similar things which does not change frequently and can be served from the cache. But while setting up the proxy server on my machine, I faced the problem that my machine which is going to act as a proxy server is behind my institute&#8217;s proxy. So, a simple caching proxy server can&#8217;t serve my needs and I have to really figure out how to setup a hierarchical proxy server. Below we&#8217;ll see how to setup a hierarchical proxy server.</p>
<p><u><strong>Approach</strong></u></p>
<p>When I thought of setting up a caching proxy server, squid immediately struck my mind. Actually I don&#8217;t know about any other proxy servers. I never setup proxy server before this ( I tried a lot of time, but in vain). So, I started googling about squid setup. There were a lot of tutorials, but either they were too small to get things going or they were too verbose that I couldn&#8217;t manage to read them. So, I directly jump into squid configuration file squid.conf . And with references from here and there, I managed to setup the proxy server successfully.</p>
<p><u><strong>Note:</strong></u> The configurations below worked on Fedora 7 with squid 2.6STABLE16. The same configurations may work with other squid versions and on other operating systems as well, but try them at your own risk.</p>
<p><u><strong>Part 1 : Setting up simple proxy server with squid</strong></u></p>
<p>Setting up a very simple and usable proxy server is really easy. You need to add/edit only 2-3 lines /etc/squid/squid.conf to get started.</p>
<p>Add your ip to the access list.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">acl myip src 172.17.8.175 <span style="color: #666666; font-style: italic;">#&lt;your_ip_which_will_use_the_proxy_server&gt; (e.g. )</span>
http_access allow myip
http_port <span style="color: #000000;">8080</span> <span style="color: #666666; font-style: italic;">#&lt;http_proxy_port&gt; (this is 3128 by default. you can set it to anything you like. e.g. 8080)</span></pre></td></tr></table></div>

<p>Save the squid.conf file. Then issue these commands.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost squid<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># squid -z [Enter] (as root) (This needs to be executed only once.)</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost squid<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># service squid start [Enter] (as root)</span></pre></td></tr></table></div>

<p>If you want to start the squid server on boot, issue this command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost squid<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># chkconfig --level 345 squid on [Enter] (as root)</span></pre></div></div>

<p>Now, your machine is a proxy server. You can setup your browser to use the machine as a proxy server.</p>
<p><u><strong>Conditions</strong></u></p>
<p>The proxy server will work only if your machine has a public IP and is directly connected to internet.</p>
<p><u><strong>Part 2: Setting up a hierarchical caching proxy server with squid</strong></u></p>
<p>The above setup works fine if a machine is directly connected to internet. But my machine itself is behind a proxy, so setting up a proxy on my machine is of no use unless the proxy on my machine uses the institute proxy for connecting to internet. So, here we jump into squid.conf again and this time we have to really do some brain storming. If you are a newbie to Linux and don&#8217;t know how to make a system work when nothing seems to help, you will probably be better off by using institute&#8217;s proxy.</p>
<p>Here is the scenario.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">1. Your browser sends a content request to proxy on your machine.
2. Check: <span style="color: #000000; font-weight: bold;">if</span> a cache HIT from institute proxy cache <span style="color: #7a0874; font-weight: bold;">&#40;</span>HIT means content was found <span style="color: #000000; font-weight: bold;">in</span> cache<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	2a. Check: <span style="color: #000000; font-weight: bold;">if</span> content is older than the original upstream content
		2aa. Fetch content from upstream and serve the client
	2b. <span style="color: #000000; font-weight: bold;">else</span>
		2ba. Serve the content from the cache
3. Check: <span style="color: #000000; font-weight: bold;">if</span> cache HIT from proxy on your machine
	3a. Check: <span style="color: #000000; font-weight: bold;">if</span> content is older than the original upstream content
		3aa. Fetch content from upstream and serve the client
	3b. <span style="color: #000000; font-weight: bold;">else</span>
		3ba. Serve the content from the cache
4. Cache MISS from both the proxies
	4a. Fetch the content from upstream and serve the client</pre></td></tr></table></div>

<p>The above method of operation is very basic and is my understanding of squid. It may not be the exact squid behavior.</p>
<p>Now, lets see the configurations needed for setting up the hierarchical caching proxy server with squid.</p>
<p><u><strong>Assumptions</strong></u></p>
<p>I assume that we already have squid setup at institute&#8217;s proxy whether in caching mode or not. The best way to add/edit the following lines in your squid.conf is to search for particular parameter and then edit the value to set as given.</p>
<p>I also assume that you have simple proxy server setup on your machine and now we want to make it act as child proxy of the institute&#8217;s proxy.</p>
<p><u><strong>Configuration</strong></u></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Your local machine will act as a sibling proxy</span>
cache_peer 172.17.8.175 sibling <span style="color: #000000;">3128</span> <span style="color: #000000;">3130</span> no-query <span style="color: #007800;">weight</span>=<span style="color: #000000;">10</span>
<span style="color: #666666; font-style: italic;"># The institute's proxy server will act as a parent proxy</span>
<span style="color: #666666; font-style: italic;"># 'default' mean the last-resort</span>
cache_peer 192.168.36.204 parent <span style="color: #000000;">8080</span> <span style="color: #000000;">3130</span> no-query proxy-only no-digest default
<span style="color: #666666; font-style: italic;"># allow accessing peer cache for access list 'myip'</span>
cache_peer_access 172.17.8.175 allow myip
<span style="color: #666666; font-style: italic;"># Don't cache dynamic content</span>
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
<span style="color: #666666; font-style: italic;"># Size of main memory to be used for caching</span>
cache_mem <span style="color: #000000;">200</span> MB
<span style="color: #666666; font-style: italic;"># max size of content to be stored in main memory</span>
maximum_object_size_in_memory <span style="color: #000000;">7000</span> KB
<span style="color: #666666; font-style: italic;"># policy for cache replacement if memory is full</span>
cache_replacement_policy heap LFUDA
<span style="color: #666666; font-style: italic;"># the directory to be used for storing cache on your hdd</span>
cache_dir aufs <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>spool<span style="color: #000000; font-weight: bold;">/</span>squid <span style="color: #000000;">200</span> <span style="color: #000000;">16</span> <span style="color: #000000;">256</span>
<span style="color: #666666; font-style: italic;"># max file descriptor open at a time .. 0(unlimited)</span>
max_open_disk_fds <span style="color: #000000;">0</span>
<span style="color: #666666; font-style: italic;"># min object size to cache on hdd</span>
minimum_object_size <span style="color: #000000;">0</span> KB
<span style="color: #666666; font-style: italic;"># max object size to cache on hdd</span>
maximum_object_size <span style="color: #000000;">16384</span> KB
<span style="color: #666666; font-style: italic;"># access log</span>
access_log <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>squid<span style="color: #000000; font-weight: bold;">/</span>access.log squid
refresh_pattern ^<span style="color: #c20cb9; font-weight: bold;">ftp</span>:           <span style="color: #000000;">1440</span>    <span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span>     <span style="color: #000000;">10080</span>
refresh_pattern ^gopher:        <span style="color: #000000;">1440</span>    <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">%</span>      <span style="color: #000000;">1440</span>
refresh_pattern .               <span style="color: #000000;">0</span>       <span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span>     <span style="color: #000000;">4320</span>
store_avg_object_size <span style="color: #000000;">20</span> KB
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
refresh_stale_hit <span style="color: #000000;">5</span> seconds
acl SSL_ports port <span style="color: #000000;">443</span> <span style="color: #000000;">563</span> <span style="color: #000000;">1863</span> <span style="color: #000000;">5190</span> <span style="color: #000000;">5222</span> <span style="color: #000000;">5050</span> <span style="color: #000000;">6667</span>
<span style="color: #666666; font-style: italic;"># Allow AIM protocols</span>
acl AIM_ports port <span style="color: #000000;">5190</span> <span style="color: #000000;">9898</span> <span style="color: #000000;">6667</span>
acl AIM_domains dstdomain .oscar.aol.com .blue.aol.com .freenode.net
acl AIM_domains dstdomain .messaging.aol.com .aim.com
acl AIM_hosts dstdomain login.oscar.aol.com login.glogin.messaging.aol.com toc.oscar.aol.com irc.freenode.net
acl AIM_nets dst 64.12.0.0<span style="color: #000000; font-weight: bold;">/</span>255.255.0.0
acl AIM_methods method CONNECT
http_access allow AIM_methods AIM_ports AIM_nets
http_access allow AIM_methods AIM_ports AIM_hosts
http_access allow AIM_methods AIM_ports AIM_domains
<span style="color: #666666; font-style: italic;"># Allow Yahoo Messenger</span>
acl YIM_ports port <span style="color: #000000;">5050</span>
acl YIM_domains dstdomain .yahoo.com .yahoo.co.jp
acl YIM_hosts dstdomain scs.msg.yahoo.com cs.yahoo.co.jp
acl YIM_methods method CONNECT
http_access allow YIM_methods YIM_ports YIM_hosts
http_access allow YIM_methods YIM_ports YIM_domains
<span style="color: #666666; font-style: italic;"># Allow GTalk</span>
acl GTALK_ports port <span style="color: #000000;">5222</span> <span style="color: #000000;">5050</span>
acl GTALK_domains dstdomain .google.com
acl GTALK_hosts dstdomain talk.google.com
acl GTALK_methods method CONNECT
http_access allow GTALK_methods GTALK_ports GTALK_hosts
http_access allow GTALK_methods GTALK_ports GTALK_domains
<span style="color: #666666; font-style: italic;"># Allow MSN</span>
acl MSN_ports port <span style="color: #000000;">1863</span> <span style="color: #000000;">443</span> <span style="color: #000000;">1503</span>
acl MSN_domains dstdomain .microsoft.com .hotmail.com .live.com .msft.net .msn.com .passport.com
acl MSN_hosts dstdomain messenger.hotmail.com
acl MSN_nets dst 207.46.111.0<span style="color: #000000; font-weight: bold;">/</span>255.255.255.0
acl MSN_methods method CONNECT
http_access allow MSN_methods MSN_ports MSN_hosts
<span style="color: #666666; font-style: italic;"># Turn this off if hierarchical behavior is needed</span>
nonhierarchical_direct off
never_direct deny myip
hosts_file <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts
coredump_dir <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>spool<span style="color: #000000; font-weight: bold;">/</span>squid</pre></td></tr></table></div>

<p>That&#8217;s the minimal configuration you need for running squid in hierarchical way. Save the squid.conf file and start/restart/reload the squid service. Setup your browser to use your machine as proxy and while using it&#8217;ll cache all the static content. You should experience some reduction in average page load time.</p>
<p><u><strong>Advantages</strong></u></p>
<p>I am currently using squid in above configuration. And its turning out to be nice for me. I am browsing websites faster and saving a chunk of bandwidth for my institute.</p>
<p><u><strong>Disadvantages</strong></u></p>
<p>Introduction of another proxy server increases the latency for dynamic content.</p>
<p><u><strong>Notice</strong></u></p>
<p>The above configurations and views are a result of my understanding of squid. If you feel this may break your system or it may have adverse effects, don&#8217;t use them. At least don&#8217;t use these on a production system.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-05/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.5)">IntelligentMirror: RPM and DEB Caching Improved (0.5)</a></li>
<li><a href="http://gofedora.com/configure-caching-nameserver-named/"  title="How To: Configure Caching Nameserver (named)">How To: Configure Caching Nameserver (named)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-intelligent-1-0-1/"  title="IntelligentMirror Gets Even More Intelligent (1.0.1)">IntelligentMirror Gets Even More Intelligent (1.0.1)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-rpm-deb-caching-improved-04/"  title="IntelligentMirror: RPM and DEB Caching Improved (0.4)">IntelligentMirror: RPM and DEB Caching Improved (0.4)</a></li>
<li><a href="http://gofedora.com/intelligentmirror-testing/"  title="IntelligentMirror: Available for Testing">IntelligentMirror: Available for Testing</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-configure-hierarchicy-proxy-servers-squid/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
