<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Ali hameed&#039;s Blog</title>
	<atom:link href="http://alihameeds.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://alihameeds.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sat, 14 Nov 2009 11:37:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='alihameeds.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Ali hameed&#039;s Blog</title>
		<link>http://alihameeds.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://alihameeds.wordpress.com/osd.xml" title="Ali hameed&#039;s Blog" />
	<atom:link rel='hub' href='http://alihameeds.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Free BSD Squid &amp; custom kernel compilation</title>
		<link>http://alihameeds.wordpress.com/2009/11/14/free-bsd-squid-custom-kernel-compilation/</link>
		<comments>http://alihameeds.wordpress.com/2009/11/14/free-bsd-squid-custom-kernel-compilation/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 11:37:26 +0000</pubDate>
		<dc:creator>alihameeds</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[free bsd]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://alihameeds.wordpress.com/?p=3</guid>
		<description><![CDATA[I wrote the below document many years back after installation of Free BSD and squid on it, now uploading it here: &#160; Using FreeBSD cant be easier than that! Using this guide you can: Install and condifure FreeBSD machine. Install your own custom Kernel as per your requirement. Install and configure Squid with cache replacement [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alihameeds.wordpress.com&amp;blog=10484956&amp;post=3&amp;subd=alihameeds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wrote the below document many years back after installation of Free BSD and squid on it, now uploading it here:</p>
<p>&nbsp;</p>
<p>Using FreeBSD cant be easier than that! Using this guide you can:</p>
<ul>
<li>Install and condifure FreeBSD machine.</li>
<li>Install your own custom Kernel as per your requirement.</li>
<li>Install and configure Squid with cache replacement policies.</li>
<li>Make your system more secure than ever</li>
</ul>
<p>&nbsp;</p>
<p>Note:    if you are upgrading the system,</p>
<ol>
<li>shift all the load to any other proxy</li>
<li>Note IPs of all the interfaces           ifconfig &gt; ip</li>
<li>Take copy of running crontab</li>
</ol>
<p>&nbsp;</p>
<p>Insert bootable cd disc into cdrom and boot system from cdrom and follow these steps.</p>
<ul>
<li>Skip Kernel config and continue with installation.</li>
<li>Standard</li>
<li>Ok</li>
<li>Disk Partitioning           ‘A’ Use entire Disc
<ul>
<li> 
<ul>
<li> 
<ul>
<li> 
<ul>
<li>‘C’ Create Slice.</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>For all the remaining blocks press ‘Ok’.</li>
<li>Type of Partition 165.</li>
<li>Select the slice</li>
<li>‘S’ set bootable.</li>
<li>‘Q’ finish.</li>
<li>Boot manager               (*) Standard.</li>
<li>Same for Disk 2.</li>
<li>Don’t set bootable (*) leave the boot message.</li>
<li>After creating the slices we need to create partitions.</li>
<li>‘C’                               Create Partition.</li>
<li>After creation of Partitions  Select /cache 1,2,3 &amp; /var and press “S” for soft updates.(note: In version FreeBSD 4.7 soft updates automatically applied when we create partitions)</li>
<li>Choose Distribution &gt; Kernel-Developer &gt; User</li>
</ul>
<ul>
<li>Installation media          CD ROM</li>
<li>Network Interface        Give appropriate addresses.</li>
<li>Configure as A Gateway</li>
<li>Security Profile Medium (Moderate security settings (Default))</li>
</ul>
<p>Note : (Moderate security settings have been selected Sendmail and SSHd jave been enabled, securelevels are disabled, and NFS server setting have been left intact.PLEASE NOTE that this still does not save you from having to properly secure your system in other ways or exercise due diligence in your administration, this simply picks a standard set of out-of-box defaults to start with.To change any of these settings later, edit /etc/rc.conf )</p>
<ul>
<li>Setting Time Zone (PKT)</li>
<li>Linux Compatiability</li>
<li>Select Ports/Packages to Install</li>
</ul>
<ul>
<li>Free BSD Configuration menu-Distribution.</li>
<li>Src &gt; Sys                     (Source for everything)</li>
</ul>
<p>&nbsp;</p>
<h1> </h1>
<h1>Custom Kernel Compilation</h1>
<p>&nbsp;</p>
<p>cd /usr/src/sys/i386/conf</p>
<p>Mkdir /root/kernels</p>
<p>cp GENERIC /root/kernels/ALI</p>
<p>ln –s /root/kernels/ALI</p>
<p>Edit MYKERNEL file and customize</p>
<ul>
<li>Machine                       i386</li>
<li>Max users                    254</li>
<li>Options                                    MSGMNB = 8192</li>
<li>Options                                    MSGMNI  = 80</li>
<li>Options                                    MSGSEG = 512</li>
<li>Options                                    MSGSSZ = 64</li>
<li>Options                                    MSGTQL = 3075</li>
<li>Options                                    SMP (For multi processor machines only.)</li>
<li>Options                                    APIC _IO</li>
<li>Options                                    IPFIREWALL</li>
<li>Options                                    IPFIREWALL_Forward</li>
<li>Options                                    IPFILTER</li>
</ul>
<p>&nbsp;</p>
<p>Scsi Controller</p>
<ul>
<li>Device ahc</li>
</ul>
<p>&nbsp;</p>
<p>Scsi Peripheral</p>
<ul>
<li>Device                          scbus</li>
</ul>
<p>&nbsp;</p>
<p>Build the kernel</p>
<p>/usr/sbin/config                          ALI</p>
<p>cd ../../compile/ALI</p>
<p>make depend</p>
<p>make</p>
<p>make install</p>
<p>&nbsp;</p>
<p>now do ipfw –f flush.</p>
<p>&nbsp;</p>
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
<p>&nbsp;</p>
<h2>Squid Installation</h2>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Note :For FreeBSD 4.7 ver (cd /usr/src/sys/contrib/ipfilter/netinet/)</p>
<p>And copy these three files “<strong>ip_compat.h</strong>” , “<strong>ip_fil.h</strong>” and “<strong>ip_nat.h</strong>” into <strong>/usr/include/</strong>) and then must restart system. These files needed to squid work as a transparent proxy.</p>
<h3> </h3>
<h3>Setenv cflags =’-g –wall’ (Note no space between = and ‘-g –wall’)</h3>
<p>Untar the Squid stable tarball</p>
<p>Tar –zxvf squid-xx.stable.tar.gz</p>
<p>Cd squid-xx.stable</p>
<p>And configure as</p>
<p>./configure &#8211;enable–removal-policies = “lru,heap” &#8212; enable-async-io \                                                                   &#8211;enablestoreio=”diskd,ufs” &#8211;enable–snmp &#8212; enable–underscores \</p>
<p>&#8211; enable–ipf-transparent</p>
<p>make</p>
<p>make install</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration:underline;">Squid configuration file</span></strong></p>
<p>Now edit squid.conf</p>
<p>Vi /usr/local/squid/etc/squid.conf</p>
<p>And set the parameters as per your requirement &amp; create cache dir which you defined in cache_dir  and set the permission nobody:nobody to cache_dir and do</p>
<p>/usr/local/squid/bin/squid -z</p>
<p>If we want to use LFUDA then in squid .conf  will be as below</p>
<p>cache_replacement_policy heap LFUDA</p>
<p>memory_replacement_policy heap LUFDA</p>
<p>&nbsp;</p>
<p>otherwise  </p>
<p>cache_replacement_policy heap</p>
<p>memory_replacement_policy heap</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Other packages to be install and configure</strong></p>
<p>SNMP</p>
<p>Apache</p>
<p>Ntpdate</p>
<p>&nbsp;</p>
<p>Cron Jobs</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>System Security</p>
<p>&nbsp;</p>
<p>Lesser Packages</p>
<p>Stop Inet Daemon &amp; all Unnecessary Daemons</p>
<p>Unnecessary Users Delete (user toor = root)</p>
<p>Edit etc / services and block Unnecessary ports</p>
<p>Secure Squid</p>
<p>Secure snmp</p>
<p>Secure Named</p>
<p>Secure Firewall (copy etc/trproxy from backup server)</p>
<p>Secure Apache (Run of different port and ip restricted access)</p>
<p>ssh enable (telnet should b disabled)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Optimization</p>
<p>IP assignments on Ethernet Interfaces</p>
<p>Copy      tcp and udp configurations in /etc/rc.conf</p>
<p>Log rotation (squid,dansguardian)      Messages is automatically being rotated</p>
<p>/etc/fstab (noatime,async,rw) for cache &amp; /var partitions</p>
<p>Static routes for internal ips in /etc/static-routes</p>
<p>Static routes for  bandwidth /software/scripts/bwmanager-scripts</p>
<p>Configuration of soft updates on partitions</p>
<p>(Note : first check is already soft updates applied or not use command</p>
<p>tunefs –p partition name</p>
<p>eg tunefs –p /var</p>
<p>if soft updates not set could be set by giving following no. of commands</p>
<p>(note: on which partition we going to apply soft updates should’nt be in use first unmount that partition in single user mode. Like following</p>
<ol>
<li>umount  /var</li>
<li>tunefs –n enable  /var)</li>
</ol>
<p>now verify is it applied or not by giving above mentioned command tunefs –p /var and then restart machine.)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alihameeds.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alihameeds.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alihameeds.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alihameeds.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/alihameeds.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/alihameeds.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/alihameeds.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/alihameeds.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alihameeds.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alihameeds.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alihameeds.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alihameeds.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alihameeds.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alihameeds.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alihameeds.wordpress.com&amp;blog=10484956&amp;post=3&amp;subd=alihameeds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://alihameeds.wordpress.com/2009/11/14/free-bsd-squid-custom-kernel-compilation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22db7fe61e0f3715d4b40be266073718?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alihameeds</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://alihameeds.wordpress.com/2009/11/14/hello-world/</link>
		<comments>http://alihameeds.wordpress.com/2009/11/14/hello-world/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 09:22:25 +0000</pubDate>
		<dc:creator>alihameeds</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alihameeds.wordpress.com&amp;blog=10484956&amp;post=1&amp;subd=alihameeds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to <a href="http://wordpress.com/">WordPress.com</a>. This is your first post. Edit or delete it and start blogging!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alihameeds.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alihameeds.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alihameeds.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alihameeds.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/alihameeds.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/alihameeds.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/alihameeds.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/alihameeds.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alihameeds.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alihameeds.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alihameeds.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alihameeds.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alihameeds.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alihameeds.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alihameeds.wordpress.com&amp;blog=10484956&amp;post=1&amp;subd=alihameeds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://alihameeds.wordpress.com/2009/11/14/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22db7fe61e0f3715d4b40be266073718?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alihameeds</media:title>
		</media:content>
	</item>
	</channel>
</rss>
