<?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>http://www.fakrul.name</title>
	<atom:link href="http://fakrul.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fakrul.wordpress.com</link>
	<description>weblog is just about me, myself and my works</description>
	<lastBuildDate>Sat, 25 Jul 2009 13:47:55 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='fakrul.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/28d0abee71b7e00f1a969df31cf0f906?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>http://www.fakrul.name</title>
		<link>http://fakrul.wordpress.com</link>
	</image>
			<item>
		<title>Piwik : Open source web analytics</title>
		<link>http://fakrul.wordpress.com/2009/07/25/piwik-open-source-web-analytics/</link>
		<comments>http://fakrul.wordpress.com/2009/07/25/piwik-open-source-web-analytics/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 13:47:55 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[Piwik]]></category>
		<category><![CDATA[Web Analytics]]></category>
		<category><![CDATA[Web Analyzer]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=81</guid>
		<description><![CDATA[Piwik is an open source web analytics. It&#8217;s free and great. If you are familier with google web analystics, this piwik is the same. You can have your own web analytics. It&#8217;s easy to install and use mysql database in background to store the data. Webbased installation makes the whole installation process very easy.
Piwik main [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=81&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Piwik is an open source web analytics. It&#8217;s free and great. If you are familier with google web analystics, this piwik is the same. You can have your own web analytics. It&#8217;s easy to install and use mysql database in background to store the data. Webbased installation makes the whole installation process very easy.</p>
<p>Piwik main site : http://piwik.org/</p>
<p>Download link : http://piwik.org/latest.zip</p>
<p>Demo : http://piwik.org/demo/</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=81&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2009/07/25/piwik-open-source-web-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
		<item>
		<title>Delete Postfix Queue based on domain name or email pattern</title>
		<link>http://fakrul.wordpress.com/2009/07/15/delete-postfix-queue-based-on-domain-name-or-email-pattern/</link>
		<comments>http://fakrul.wordpress.com/2009/07/15/delete-postfix-queue-based-on-domain-name-or-email-pattern/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 06:25:56 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[My Work]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=77</guid>
		<description><![CDATA[I found this particluar perl file very effective. This scripts give me the option to delete mail from the queue based on domain name or email id pattern. I have found this script in www.cyberciti.biz
#!/usr/bin/perl

$REGEXP = shift &#124;&#124; die "no email-adress given (regexp-style, e.g. bl.*\@yahoo.com)!";

@data = qx&#60;/usr/sbin/postqueue -p&#62;;
for (@data) {
  if (/^(\w+)(\*&#124;\!)?\s/) {
  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=77&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I found this particluar perl file very effective. This scripts give me the option to delete mail from the queue based on domain name or email id pattern. I have found this script in www.cyberciti.biz</p>
<pre><span style="color:#808080;font-style:italic;">#!/usr/bin/perl</span>

<span style="color:#0000ff;">$REGEXP</span> = <a href="http://perldoc.perl.org/functions/shift.html"><span style="color:#000066;">shift</span></a> || <a href="http://perldoc.perl.org/functions/die.html"><span style="color:#000066;">die</span></a> <span style="color:#ff0000;">"no email-adress given (regexp-style, e.g. bl.*<span style="color:#000099;font-weight:bold;">\@</span>yahoo.com)!"</span>;

<span style="color:#0000ff;">@data</span> = qx&lt;/usr/sbin/postqueue -p&gt;;
<span style="color:#b1b100;">for</span> <span style="color:#66cc66;">(</span><span style="color:#0000ff;">@data</span><span style="color:#66cc66;">)</span> <span style="color:#66cc66;">{</span>
  <span style="color:#b1b100;">if</span> <span style="color:#66cc66;">(</span>/^<span style="color:#66cc66;">(</span>\w+<span style="color:#66cc66;">)</span><span style="color:#66cc66;">(</span>\*|\!<span style="color:#66cc66;">)</span>?\<a href="http://perldoc.perl.org/functions/s.html"><span style="color:#000066;">s</span></a>/<span style="color:#66cc66;">)</span> <span style="color:#66cc66;">{</span>
     <span style="color:#0000ff;">$queue_id</span> = $<span style="color:#cc66cc;">1</span>;
  <span style="color:#66cc66;">}</span>
  <span style="color:#b1b100;">if</span><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$queue_id</span><span style="color:#66cc66;">)</span> <span style="color:#66cc66;">{</span>
    <span style="color:#b1b100;">if</span> <span style="color:#66cc66;">(</span>/<span style="color:#0000ff;">$REGEXP</span>/i<span style="color:#66cc66;">)</span> <span style="color:#66cc66;">{</span>
      <span style="color:#0000ff;">$Q</span><span style="color:#66cc66;">{</span><span style="color:#0000ff;">$queue_id</span><span style="color:#66cc66;">}</span> = <span style="color:#cc66cc;">1</span>;
      <span style="color:#0000ff;">$queue_id</span> = <span style="color:#ff0000;">""</span>;
    <span style="color:#66cc66;">}</span>
  <span style="color:#66cc66;">}</span>
<span style="color:#66cc66;">}</span>

<span style="color:#808080;font-style:italic;">#open(POSTSUPER,"|cat") || die "couldn't open postsuper" ;</span>
<a href="http://perldoc.perl.org/functions/open.html"><span style="color:#000066;">open</span></a><span style="color:#66cc66;">(</span>POSTSUPER,<span style="color:#ff0000;">"|postsuper -d -"</span><span style="color:#66cc66;">)</span> || <a href="http://perldoc.perl.org/functions/die.html"><span style="color:#000066;">die</span></a> <span style="color:#ff0000;">"couldn't open postsuper"</span> ;

<span style="color:#b1b100;">foreach</span> <span style="color:#66cc66;">(</span><a href="http://perldoc.perl.org/functions/keys.html"><span style="color:#000066;">keys</span></a> <span style="color:#0000ff;">%Q</span><span style="color:#66cc66;">)</span> <span style="color:#66cc66;">{</span>
  <a href="http://perldoc.perl.org/functions/print.html"><span style="color:#000066;">print</span></a> POSTSUPER <span style="color:#ff0000;">"$_<span style="color:#000099;font-weight:bold;">\n</span>"</span>;
<span style="color:#66cc66;">}</span>;
<a href="http://perldoc.perl.org/functions/close.html"><span style="color:#000066;">close</span></a><span style="color:#66cc66;">(</span>POSTSUPER<span style="color:#66cc66;">)</span>;

Save this scripts and change the chmod to 755 (make the scripts executable). Now you can run the following command

./script.pl domain.com which will delete the domain.com mail from the mailq.
./script.pl xyz which will delete all queued messages that contain the word "xyz" in the e-mail address.</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=77&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2009/07/15/delete-postfix-queue-based-on-domain-name-or-email-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
		<item>
		<title>Restore MySQL data from crashed server</title>
		<link>http://fakrul.wordpress.com/2009/04/26/restore-mysql-data-from-crashed-server/</link>
		<comments>http://fakrul.wordpress.com/2009/04/26/restore-mysql-data-from-crashed-server/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 14:18:52 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=75</guid>
		<description><![CDATA[This is good to know where the MySQL data are stored. People usually backup there MySQL database when the server is up using mysqldump syntex. But what happen when server crash or server is show kernel panic? It&#8217;s easy. Boot the Server using any live distro (Knoppix, Ubuntu or Linux/CentOS in rescue mode). Mount your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=75&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is good to know where the MySQL data are stored. People usually backup there MySQL database when the server is up using mysqldump syntex. But what happen when server crash or server is show kernel panic? It&#8217;s easy. Boot the Server using any live distro (Knoppix, Ubuntu or Linux/CentOS in rescue mode). Mount your HDD. MySQL data&#8217;s are stored in /var/lib/mysql. So after mouting your HDD the location will be /your_mount_point/var/lib/mysql. Copy the files in your new server. Check the ownership. It should be mysql:mysql. Start the mysqld service. You are done.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=75&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2009/04/26/restore-mysql-data-from-crashed-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving to MAC</title>
		<link>http://fakrul.wordpress.com/2009/03/20/moving-to-mac/</link>
		<comments>http://fakrul.wordpress.com/2009/03/20/moving-to-mac/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 18:05:11 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[MAC]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=73</guid>
		<description><![CDATA[I got a new MacBook. It is stunning with following configuration :
Processor : 2 GHz Intel Core 2 Duo
Memory : 2 GB
No of Processor : 1
HD : 150 GB
Graphics : NVIDIA GeForce 9400M
Display : 13.3 inch
Networking : WiFi, Ethernet, Bluetooth
You can get the details from http://store.apple.com/us/browse/home/shop_mac/family/macbook
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=73&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I got a new MacBook. It is stunning with following configuration :</p>
<p>Processor : 2 GHz Intel Core 2 Duo<br />
Memory : 2 GB<br />
No of Processor : 1<br />
HD : 150 GB<br />
Graphics : NVIDIA GeForce 9400M<br />
Display : 13.3 inch<br />
Networking : WiFi, Ethernet, Bluetooth</p>
<p>You can get the details from http://store.apple.com/us/browse/home/shop_mac/family/macbook</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=73&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2009/03/20/moving-to-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
		<item>
		<title>BTCL Block YouTube??!!##@!</title>
		<link>http://fakrul.wordpress.com/2009/03/06/btcl-block-youtube/</link>
		<comments>http://fakrul.wordpress.com/2009/03/06/btcl-block-youtube/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 16:47:56 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=71</guid>
		<description><![CDATA[Can&#8217;t access YouTube. Seems BTCL filter it out   . Here is traceroute result
[root@mrtg ~]# traceroute www.youtube.com
traceroute to www.youtube.com (208.65.153.238), 30 hops max, 40 byte packets
1  202.4.96.1 (202.4.96.1)  1.151 ms  1.768 ms  2.034 ms
2  core-router.dhakacom.com (202.4.100.5)  2.564 ms  2.618 ms  2.673 ms
3  203.112.207.253 (203.112.207.253)  3.814 ms  3.873 ms  3.933 ms
4  * * *
5  * [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=71&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Can&#8217;t access YouTube. Seems BTCL filter it out <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  . Here is traceroute result</p>
<p>[root@mrtg ~]# traceroute www.youtube.com</p>
<p>traceroute to www.youtube.com (208.65.153.238), 30 hops max, 40 byte packets</p>
<p>1  202.4.96.1 (202.4.96.1)  1.151 ms  1.768 ms  2.034 ms<br />
2  core-router.dhakacom.com (202.4.100.5)  2.564 ms  2.618 ms  2.673 ms<br />
3  203.112.207.253 (203.112.207.253)  3.814 ms  3.873 ms  3.933 ms<br />
4  * * *<br />
5  * * *<br />
6  * * *<br />
7  * * *</p>
<div>I think this is the first time BTCL filtering out some thing <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Three cheers to BTCL</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=71&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2009/03/06/btcl-block-youtube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
		<item>
		<title>Pop Before SMTP &amp; Postfix</title>
		<link>http://fakrul.wordpress.com/2009/03/06/pop-before-smtp-postfix/</link>
		<comments>http://fakrul.wordpress.com/2009/03/06/pop-before-smtp-postfix/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 18:04:48 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Outgoing Authentication]]></category>
		<category><![CDATA[Outgoing Mail Gateway]]></category>
		<category><![CDATA[POP]]></category>
		<category><![CDATA[POP before SMTP]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[SMTP]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=68</guid>
		<description><![CDATA[Though POP Before SMTP is not a secured way, but it is an easiest way to configure mail server to allow roaming user to use the mailserver  as SMTP gateway. Before configuring POP Before SMTP make sure that your Mail Server &#38; POP3/IMAP sever working properly. Following Perl Module are required for the POP Before [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=68&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Though POP Before SMTP is not a secured way, but it is an easiest way to configure mail server to allow roaming user to use the mailserver  as SMTP gateway. Before configuring POP Before SMTP make sure that your Mail Server &amp; POP3/IMAP sever working properly. Following Perl Module are required for the POP Before SMTP :</p>
<p><span style="white-space:pre;"> </span>Time:: HiRes<br />
<span style="white-space:pre;"> </span>File:: Tail<br />
<span style="white-space:pre;"> </span>Date:: Parse<br />
<span style="white-space:pre;"> </span>Net:: Netmask<br />
<span style="white-space:pre;"> </span>BerkeleyDB</p>
<p>Download the POP Before SMTP perl files from http://popbsmtp.sourceforge.net/. Untar the files &amp; copy them to the following locaiton</p>
<p><span style="white-space:pre;"> </span>% cp pop-before-smtp.init /etc/rc.d/init.d/pop-before-smtp<br />
<span style="white-space:pre;"> </span>% cp pop-before-smtp /usr/sbin/<br />
<span style="white-space:pre;"> </span>% cp pop-before-smtp-conf.pl /etc</p>
<p>Edit the pop-before-smtp-conf.pl file to customize it for your system.</p>
<p><span style="white-space:pre;"> </span>$ logto = &#8216;/ var / log / pop-before-smtp&#8217;;<br />
<span style="white-space:pre;"> </span>$ dbfile = &#8216;/ etc / postfix / pop-before-smtp&#8217;;<br />
<span style="white-space:pre;"> </span>$ grace = 10 * 60; # the time to log 10 minutes and $ file_tail ( &#8216;name&#8217;) = &#8216;/ var / log / dovecot&#8217;;</p>
<p>Uncomment the following lines which you will get after &#8220;# For Dovecot POP3/IMAP when it does its own logging.&#8221;</p>
<p><span style="white-space:pre;"> </span>$pat = &#8216;^dovecot: [LOGTIME] Info: (?:imap|pop3)-login: &#8216; .<br />
<span style="white-space:pre;"> </span>&#8216;Login: .+? rip=[:f]*(\d+\.\d+\.\d+\.\d+),&#8217;;<br />
<span style="white-space:pre;"> </span>$out_pat = &#8216;^dovecot: [LOGTIME] Info: (?:imap|pop3)-login: &#8216; .<br />
<span style="white-space:pre;"> </span>&#8216;Disconnected.*? rip=[:f]*(\d+\.\d+\.\d+\.\d+),&#8217;;</p>
<p>Next comment the following two lines :</p>
<p><span style="white-space:pre;"> </span>= cut #====================== Postfix BerkeleyDB ======================= START =<br />
<span style="white-space:pre;"> </span>= cut #====================== Postfix BerkeleyDB ======================= == END =</p>
<p>Now edit /etc/dovecot.conf file :</p>
<p><span style="white-space:pre;"> </span>protocols = imap imaps pop3 pop3s<br />
<span style="white-space:pre;"> </span>imap_listen = *<br />
<span style="white-space:pre;"> </span>pop3_listen = *<br />
<span style="white-space:pre;"> </span>log_path = / var / log / dovecot<br />
<span style="white-space:pre;"> </span>info_log_path = / var / log / dovecot<br />
<span style="white-space:pre;"> </span>log_timestamp = &#8220;% b% d% H:% M:% S&#8221;</p>
<p>Finally make the following changes to the /etc/postfix/main.cf file</p>
<p><span style="white-space:pre;"> </span>smtpd_recipient_restrictions = permit_mynetworks,reject_non_fqdn_recipient, check_client_access hash:/etc/postfix/pop-before-smtp, reject_unauth_destination</p>
<p><span style="white-space:pre;"> </span>% touch /etc/postfix/pop-before-smtp<br />
<span style="white-space:pre;"> </span>% postmap /etc/postfix/pop-before-smtp<br />
<span style="white-space:pre;"> </span>% /etc/init.d/pop-before-smtp start<br />
<span style="white-space:pre;"> </span>% /etc/init.d/postfix reload</p>
<p>Now configure you outlook/eudora. Do POP before sending any mail. You will get the logged IP in /var/log/pop-before-smtp file.</p>
<p>If you&#8217;re having trouble getting pop-before-smtp to work; you will get more in http://popbsmtp.sourceforge.net/debug.shtml</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=68&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2009/03/06/pop-before-smtp-postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
		<item>
		<title>Empty Mail Trash Folder</title>
		<link>http://fakrul.wordpress.com/2009/02/23/empty-mail-trash-folder/</link>
		<comments>http://fakrul.wordpress.com/2009/02/23/empty-mail-trash-folder/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 06:45:48 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[BASH]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Trash Folder]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=66</guid>
		<description><![CDATA[User always forget to empty there trash folder. User delete mail from there inbox; but don&#8217;t delete those mail from Trash folder. At the end, it eats up a lot of your server disk space. Empty this Trash folder is big headache for the administrator. Shell script can easily rescue the administrator. First create a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=66&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>User always forget to empty there trash folder. User delete mail from there inbox; but don&#8217;t delete those mail from Trash folder. At the end, it eats up a lot of your server disk space. Empty this Trash folder is big headache for the administrator. Shell script can easily rescue the administrator. First create a list for you user. You can create it easily from awk commad. Save it in a file named user. Now create a new bassh file named trash_empty.sh and chown it to 755. Add the following syntex to the trash_empty.sh file</p>
<p>#!/bin/sh<br />
for i in `more user`<br />
do<br />
echo $i<br />
cat /dev/null &gt; $i/mail/Trash<br />
done</p>
<p>[user Trash folder in /home/username/mail/Trash. It may varies depending on your mail server configuration. ]</p>
<p>Now run the file trash_empty.sh WOW all your users Trash folder will be empty <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Please take your own responsibility to empty users trash folder <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=66&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2009/02/23/empty-mail-trash-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows Blue Screen</title>
		<link>http://fakrul.wordpress.com/2008/12/28/windows-blue-screen/</link>
		<comments>http://fakrul.wordpress.com/2008/12/28/windows-blue-screen/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 11:05:39 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[খামাখা]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=59</guid>
		<description><![CDATA[
The &#8220;Great Blue Screen&#8221; of Windows in Zia International Airport Terminal.The &#8220;Great Blue Screen&#8221; of Windows in Zia International Airport Terminal.The &#8220;Great Blue Screen&#8221; of Windows in Zia International Airport Terminal.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=59&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="size-full wp-image-60" title="Great Blue Screen" src="http://fakrul.files.wordpress.com/2008/12/n621095446_4693623_4559.jpg?w=600&#038;h=450" alt="The &quot;Great Blue Screen&quot; of Windows in Zia International Airport Terminal." width="600" height="450" /></p>
<p>The &#8220;Great Blue Screen&#8221; of Windows in Zia International Airport Terminal.The &#8220;Great Blue Screen&#8221; of Windows in Zia International Airport Terminal.The &#8220;Great Blue Screen&#8221; of Windows in Zia International Airport Terminal.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=59&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2008/12/28/windows-blue-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>

		<media:content url="http://fakrul.files.wordpress.com/2008/12/n621095446_4693623_4559.jpg" medium="image">
			<media:title type="html">Great Blue Screen</media:title>
		</media:content>
	</item>
		<item>
		<title>Transparent Squid Proxy Server with WCCP support</title>
		<link>http://fakrul.wordpress.com/2008/12/11/transparent-squid-proxy-server-with-wccp-support/</link>
		<comments>http://fakrul.wordpress.com/2008/12/11/transparent-squid-proxy-server-with-wccp-support/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 07:40:56 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[My Work]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Transparent]]></category>
		<category><![CDATA[WCCP]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=57</guid>
		<description><![CDATA[For Squid Proxy with WCCP support we need to recompile the kernel. We need to enable firewall &#38; IP forward option. We use FreeBSD 7.0 as server.
[root@proxy ~]# cd /usr/src/sys/i386/conf
[root@proxy ~]#  cp GENERIC to DCOM
[root@proxy ~]#  vi DCOM
cpu I486_CPU
cpu I586_CPU
cpu I686_CPU
#ident GENERIC Commented on 29/06/08
ident DCOM #Change the ident name
# To statically compile [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=57&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="font-size:10pt;font-family:&quot;">For Squid Proxy with WCCP support we need to recompile the kernel. We need to enable firewall &amp; IP forward option. We use FreeBSD 7.0 as server.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# cd /usr/src/sys/i386/conf</span><span style="font-size:10pt;font-family:&quot;"><br />
[root@proxy ~]# <span> </span>cp GENERIC to DCOM<br />
[root@proxy ~]# <span> </span>vi DCOM</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">cpu<span> </span>I486_CPU</span><span style="font-size:10pt;font-family:&quot;"><br />
cpu<span> </span>I586_CPU<br />
</span><span style="font-size:10pt;font-family:&quot;">cpu<span> </span>I686_CPU<br />
</span><span style="font-size:10pt;font-family:&quot;">#ident<span> </span>GENERIC Commented on 29/06/08<br />
ident<span> </span>DCOM #Change the ident name</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"># To statically compile in device wiring instead of /boot/device.hints</span><span style="font-size:10pt;font-family:&quot;">#hints<span> </span>&#8220;GENERIC.hints&#8221;<span><br />
</span># Default places to look for devices.<br />
makeoptions<span> </span>DEBUG=-g<span> </span># Build kernel with gdb(1) debug symbols<br />
</span><span style="font-size:10pt;font-family:&quot;"></span><span style="font-size:10pt;font-family:&quot;">options<span> </span>IPFIREWALL<br />
</span><span style="font-size:10pt;font-family:&quot;">options<span> </span>IPFIREWALL_DEFAULT_TO_ACCEPT<br />
options<span> </span>IPFIREWALL_VERBOSE<br />
options<span> </span>IPFIREWALL_FORWARD</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# <span> </span>/usr/sbin/config DCOM<br />
</span><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# <span> </span><span> </span>cd ../compile/DCOM<br />
</span><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# <span> </span><span> </span>make depend</span><span style="font-size:10pt;font-family:&quot;"><br />
[root@proxy ~]# <span> </span><span> </span>make<br />
[root@proxy ~]# <span> </span><span> </span>make install</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">Reboot the server.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">Download the latest stable version of Squid.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# <span> </span><span> </span>wget <a href="http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE10.tar.gz">http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE10.tar.gz</a><br />
[root@proxy ~]# <span> </span><span> </span>tar –zxvf squid-3.0.STABLE10.tar.gz<br />
[root@proxy ~]# <span> </span><span> </span>cd squid-3.0.STABLE10<br />
[root@proxy ~]# <span> </span><span> </span>./configure &#8211;prefix=/usr/local &#8211;enable-async-io &#8211;enable-icmp &#8211;enable-useragent-log &#8211;enable-snmp &#8211;enable-cache-digests &#8211;enable-follow-x-forwarded-for &#8211;enable-storeio=&#8221;aufs&#8221; &#8211;enable-removal-policies=&#8221;heap,lru&#8221; &#8211;with-maxfd=16384 &#8211;enable-poll &#8211;disable-ident-lookups &#8211;enable-truncate &#8211;exec-prefix=/usr &#8211;bindir=/usr/local/sbin &#8211;sbindir=/usr/local/sbin &#8211;datadir=/usr/local/etc/squid &#8211;libexecdir=/usr/local/libexec/squid &#8211;enable-external-acl-helpers=ip_user session unix_group wbinfo_group &#8211;enable-default-err-language=English &#8211;mandir=/usr/local/man &#8211;enable-ipfw-transparent &#8216;i386-portbld-freebsd7.0&#8242; &#8216;build_alias=i386-portbld-freebsd7.0&#8242; &#8216;host_alias=i386-portbld-freebsd7.0&#8242; &#8216;target_alias=i386-portbld-freebsd7.0&#8242; &#8216;CC=cc&#8217; &#8216;CFLAGS= -DNUMTHREADS=150 -O2 -fno-strict-aliasing -pipe &#8216; &#8216;LDFLAGS=&#8217; &#8216;CPPFLAGS=&#8217;<br />
[root@proxy ~]# <span> </span><span> </span>make<br />
[root@proxy ~]# <span> </span><span> </span>make install</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">Next we need to do some fine tune to our firewall and kernel parameters.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# <span> </span><span> </span>echo if_gre_load=&#8221;YES&#8221; &gt; /boot/loader.conf</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">Add the following lines to the /etc/rc.local</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">/sbin/ifconfig gre0 plumb<br />
/sbin/ifconfig gre0 link2<br />
/sbin/ifconfig gre0 tunnel 172.16.1.2 172.16.1.1<br />
/sbin/ifconfig gre0 inet 192.192.192.1 192.192.192.2<br />
/sbin/sysctl -w net.inet.icmp.icmplim=50<br />
/sbin/sysctl -w net.inet.tcp.msl=3000<br />
/sbin/sysctl -w kern.<span> </span>=65536<br />
/sbin/sysctl -w kern.maxfiles=32768<br />
/sbin/sysctl -w kern.ipc.somaxconn=8192<br />
/sbin/sysctl -w net.inet.tcp.sendspace=65535<br />
/sbin/sysctl -w net.inet.tcp.recvspace=65535<br />
/sbin/sysctl -w net.inet.udp.recvspace=65535<br />
/sbin/sysctl -w net.local.stream.recvspace=65535<br />
/sbin/sysctl -w net.local.stream.sendspace=65535<br />
/sbin/sysctl -w kern.ipc.nmbclusters=32768</span><span style="font-size:10pt;font-family:&quot;">/sbin/sysctl -w kern.ipc.maxsockets=32768</p>
<p>We need to take care of gre0 inet line. Here first IP is the Proxy Server IP and the second IP is the Cisco Router External IP. 192.192.192.1 and 192.192.192.2 are the fake IP used to establish the GRE tunnel.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# echo net.inet.ip.forwarding=1 &gt; /etc/sysctl.conf</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">Add the following lines to /etc/rc.conf</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">inetd_enable=&#8221;NO&#8221;<br />
keymap=&#8221;us.iso&#8221;<br />
linux_enable=&#8221;YES&#8221;<br />
router_enable=&#8221;YES&#8221;<br />
sendmail_enable=&#8221;YES&#8221;<br />
sshd_enable=&#8221;YES&#8221;<br />
squid_enable=&#8221;YES&#8221;<br />
firewall_enable=&#8221;YES&#8221;<br />
firewall_type=&#8221;open&#8221;<br />
gateway_enable=&#8221;YES&#8221;<br />
natd_enable=&#8221;YES&#8221;</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">Lastly, add the following lines to /etc/rc.firewall</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">#!/bin/sh<br />
ipfw -f flush<br />
ipfw add fwd 127.0.0.1,8080 tcp from any to any 80 recv gre0</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">Reboot the server.<br />
</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">In this point we are done with the installing the proxy and fine tune the firewall parameter. Next we configure the squid proxy server.</p>
<p>Usually squid installed in /usr/local/etc/squid.conf. Backup the original squid.conf file and use the following configuration.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">#&#8212;&#8211;start of squid.conf file&#8212;&#8212;-<br />
acl manager proto cache_object<br />
acl localhost src 127.0.0.1/32<br />
acl to_localhost dst 127.0.0.0/8<br />
acl DCOM src 172.16.0.0/16 # your ip block which are allowed to use the proxy.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">acl SSL_ports port 443<br />
acl Safe_ports port 80<span> </span># http<br />
acl Safe_ports port 21<span> </span># ftp<br />
acl Safe_ports port 443<span> </span># https<br />
acl Safe_ports port 70<span> </span># gopher<br />
acl Safe_ports port 210<span> </span># wais<br />
acl Safe_ports port 1025-65535<span> </span># unregistered ports<br />
acl Safe_ports port 280<span> </span># http-mgmt<br />
acl Safe_ports port 488<span> </span># gss-http<br />
acl Safe_ports port 591<span> </span># filemaker<br />
acl Safe_ports port 777<span> </span># multiling http<br />
acl CONNECT method CONNECT</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">http_access allow manager localhost<br />
http_access deny manager<br />
http_access deny !Safe_ports<br />
http_access deny CONNECT !SSL_ports<br />
http_access deny to_localhost<br />
http_access allow localhost<br />
http_access allow DCOM<br />
http_access deny all<br />
icp_access deny all<br />
htcp_access deny all</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">http_port 172.16.1.2:8080 transparent<br />
http_port 127.0.0.1:8080 transparent</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">hierarchy_stoplist cgi-bin ?</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">cache_mem 100 MB<br />
maximum_object_size_in_memory 50 KB<br />
cache_replacement_policy heap LFUDA<br />
cache_dir ufs /cache 18000 16 256</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">maximum_object_size 25600 KB<br />
cache_swap_low 90<br />
cache_swap_high 95</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">access_log /usr/local/var/logs/access.log squid<br />
cache_log /usr/local/var/logs/cache.log<br />
cache_store_log /usr/local/var/logs/store.log</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">logfile_rotate 10</span><span style="font-size:10pt;font-family:&quot;"><br />
pid_filename /usr/local/squid/squid.pid<br />
buffered_logs on</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">refresh_pattern ^ftp:<span> </span>1440<span> </span>20%<span> </span>10080<br />
refresh_pattern ^gopher:<span> </span>1440<span> </span>0%<span> </span>1440<br />
refresh_pattern (cgi-bin|\?)<span> </span>0<span> </span>0%<span> </span>0<br />
refresh_pattern .<span> </span>0<span> </span>20%<span> </span>4320</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">quick_abort_min 0 KB<br />
quick_abort_max 0 KB</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">half_closed_clients off<br />
cache_effective_user squid</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">wccp2_router 172.16.1.1 # Router IP<br />
wccp2_forwarding_method 1<br />
wccp2_return_method 1<br />
wccp2_service standard 0</p>
<p></span><span style="font-size:10pt;font-family:&quot;">icp_port 3130</span><span style="font-size:10pt;font-family:&quot;">log_icp_queries off<br />
dns_nameservers 4.2.2.2<br />
hosts_file /etc/hosts</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">memory_pools off<br />
client_db off<br />
coredump_dir /cache</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">#&#8212;-End of squid.conf file&#8212;&#8212;-</p>
<p>As we are storing the cache in /cache we need to create the folder and change the permission.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# mkdir /cache<br />
[root@proxy ~]# chown squid:squid /cache<br />
[root@proxy ~]# /usr/local/sbin/squid –k<br />
[root@proxy ~]# /usr/local/sbin/squid</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">At this point our squid is installed. Next we configure the router to forward the HTTP traffic to the proxy server.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">core-router# config t<br />
core-router(config)# ip wccp web-cache redirect-list 110<br />
core-router(config)# access-list 110 permit ip any any<br />
core-router(config)# interface FastEthernet1/0<br />
core-router(config-if)# ip wccp web-cache redirect out</p>
<p></span><strong><span style="font-size:10pt;font-family:&quot;">Troubleshoot</span></strong></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">To check whether we are receiving the http request from the router through GRE tunnel we can use the following syntax.</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">[root@proxy ~]# tcpdump -nn -i re1 | grep gre-proto<br />
[root@proxy ~]# tcpdump -nn -i gre0 | more</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">Check the log from tail –f /usr/local/var/log/access.log</span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=57&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2008/12/11/transparent-squid-proxy-server-with-wccp-support/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
		<item>
		<title>Youtube Hijack Saga</title>
		<link>http://fakrul.wordpress.com/2008/09/27/youtube-hijack-saga/</link>
		<comments>http://fakrul.wordpress.com/2008/09/27/youtube-hijack-saga/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 14:10:51 +0000</pubDate>
		<dc:creator>fakrul</dc:creator>
				<category><![CDATA[Reading]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[PTA]]></category>
		<category><![CDATA[Youtube hack]]></category>

		<guid isPermaLink="false">http://fakrul.wordpress.com/?p=46</guid>
		<description><![CDATA[On February 24th, 2008, the Youtube routing has been hacked  . Ya, that&#8217;s true. As Pakistan Government notify PTA (Pakistan Telecommunication Authority) to block Youtube access from Pakistan. And they announce Youtube IP Block. Defcon 16th conference describe the steps very nicely :
1. You Tube announces 5 prefixes : -A /19, /20, /22 and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=46&subd=fakrul&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>On February 24th, 2008, the Youtube routing has been hacked <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . Ya, that&#8217;s true. As Pakistan Government notify PTA (Pakistan Telecommunication Authority) to block Youtube access from Pakistan. And they announce Youtube IP Block. Defcon 16th conference describe the steps very nicely :</p>
<p>1. You Tube announces 5 prefixes : -A /19, /20, /22 and two /24s. The /22 is 208.65.152.0/22</p>
<p>2. Pakistan&#8217;s government decides to block You Tube.</p>
<p>3. Pakistan Telecom internally nails up a more specific route (208.65.153.0/24) out of You Tube&#8217;s /22 to nul0 (the routers discard interface)</p>
<p>4. Somehow redists from static &#8211;&gt; bgp, then to PCCW</p>
<p>5. Upstream provider sends routes to everyone else..</p>
<p>6. Most of the net now goes to Pakistan for You Tube, gets nothing!</p>
<p>7. You Tube responds by announcing both the /24 and two more specific /25s, with partial sucess</p>
<p>8. PCCW turns off Pakistan Telecom peering two hours later</p>
<p>9.  3 to 5 minutes afterward, global bgp table is clean again.</p>
<p>Heheheh..that&#8217;s awesome. The details are in RIPE websites <a title="http://www.ripe.net/news/study-youtube-hijacking.html" href="http://www.ripe.net/news/study-youtube-hijacking.html" target="_blank">http://www.ripe.net/news/study-youtube-hijacking.html</a></p>
<p>So if your a transit ISP, please be careful. Please don&#8217;t be lazy to apply appropriate prefix list and as path filter.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fakrul.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fakrul.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fakrul.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fakrul.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fakrul.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fakrul.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fakrul.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fakrul.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fakrul.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fakrul.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fakrul.wordpress.com&blog=181375&post=46&subd=fakrul&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fakrul.wordpress.com/2008/09/27/youtube-hijack-saga/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7540b9acb22fb3926cf6e0b90abba1b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pappu</media:title>
		</media:content>
	</item>
	</channel>
</rss>