<?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>sNkr</title>
	<atom:link href="http://shankarsubedi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shankarsubedi.com</link>
	<description>Shankar Subedi</description>
	<lastBuildDate>Sat, 26 Nov 2011 06:45:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='shankarsubedi.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>sNkr</title>
		<link>http://shankarsubedi.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://shankarsubedi.com/osd.xml" title="sNkr" />
	<atom:link rel='hub' href='http://shankarsubedi.com/?pushpress=hub'/>
		<item>
		<title>Mount disk in Linux without rebooting</title>
		<link>http://shankarsubedi.com/2011/11/26/mount-disk-in-linux-without-rebooting/</link>
		<comments>http://shankarsubedi.com/2011/11/26/mount-disk-in-linux-without-rebooting/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 06:37:18 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://shankarsubedi.com/?p=24</guid>
		<description><![CDATA[Rescan SCSI Bus echo &#8220;- &#8211; -&#8221;  &#62; /sys/class/scsi_host/host#/scan Or For Fibre Channel Connected LUNs. echo &#8220;- &#8211; -&#8221; &#62; /sys/class/fc_host/host#/scan  scsi_host or fc_host folder can contain number of folders such as host0,host1.  Run the scan for each folders.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=24&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Rescan SCSI Bus</p>
<blockquote><p><em>echo &#8220;- &#8211; -&#8221;  &gt; /sys/class/scsi_host/host#/scan</em></p></blockquote>
<p>Or For Fibre Channel Connected LUNs.</p>
<blockquote><p><em>echo &#8220;- &#8211; -&#8221; &gt; /sys/class/fc_host/host#/scan </em></p></blockquote>
<p><em>scsi_host</em> or <em>fc_host</em> folder can contain number of folders such as host0,host1.  Run the scan for each folders.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=24&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2011/11/26/mount-disk-in-linux-without-rebooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>some good links</title>
		<link>http://shankarsubedi.com/2007/12/04/some-good-links/</link>
		<comments>http://shankarsubedi.com/2007/12/04/some-good-links/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 10:36:07 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/12/04/some-good-links/</guid>
		<description><![CDATA[1. Creating the chrooted file system http://open.itworld.com/5040/nlsunix071113/page_1.html 2. some linux tips http://www.perpetualpc.net/srtd_commands_rev.html http://www.mydeveloperconnection.com/html/os.htm 3. http://search.cpan.org/~clkao/Pushmi-v1.0.0/lib/Pushmi.pm 4. http://www.linuxquestions.org/questions/susenovell-60/windows-xp-installation-cd-doesnt-boot-after-suse-installation-381216/ 5. http://www.redhat.com/magazine/015jan06/departments/tips_tricks/ 6. http://www.cyberciti.biz/faq/can-i-run-fsck-or-e2fsck-when-linux-file-system-is-mounted/ 7. http://www.cyberciti.biz/faq/linux-force-fsck-on-the-next-reboot-or-boot-sequence/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=16&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>1. Creating the chrooted file system<br />
<a href="http://open.itworld.com/5040/nlsunix071113/page_1.html">http://open.itworld.com/5040/nlsunix071113/page_1.html</a><br />
2. some linux tips<br />
<a href="http://www.perpetualpc.net/srtd_commands_rev.html">http://www.perpetualpc.net/srtd_commands_rev.html</a><br />
<a href="http://www.mydeveloperconnection.com/html/os.htm">http://www.mydeveloperconnection.com/html/os.htm</a><br />
3. <a href="http://search.cpan.org/~clkao/Pushmi-v1.0.0/lib/Pushmi.pm">http://search.cpan.org/~clkao/Pushmi-v1.0.0/lib/Pushmi.pm</a><br />
4. <a href="http://www.linuxquestions.org/questions/susenovell-60/windows-xp-installation-cd-doesnt-boot-after-suse-installation-381216/">http://www.linuxquestions.org/questions/susenovell-60/windows-xp-installation-cd-doesnt-boot-after-suse-installation-381216</a><a href="http://www.linuxquestions.org/questions/susenovell-60/windows-xp-installation-cd-doesnt-boot-after-suse-installation-381216/">/</a><br />
5. <a href="http://www.redhat.com/magazine/015jan06/departments/tips_tricks/">http://www.redhat.com/magazine/015jan06/departments/tips_tricks/</a><br />
6. <a href="http://www.cyberciti.biz/faq/can-i-run-fsck-or-e2fsck-when-linux-file-system-is-mounted/">http://www.cyberciti.biz/faq/can-i-run-fsck-or-e2fsck-when-linux-file-system-is-mounted/</a><br />
7. <a href="http://www.cyberciti.biz/faq/linux-force-fsck-on-the-next-reboot-or-boot-sequence/">http://www.cyberciti.biz/faq/linux-force-fsck-on-the-next-reboot-or-boot-sequence/</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=16&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/12/04/some-good-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>using find command</title>
		<link>http://shankarsubedi.com/2007/11/15/using-find-command/</link>
		<comments>http://shankarsubedi.com/2007/11/15/using-find-command/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 11:00:52 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/11/15/using-find-command/</guid>
		<description><![CDATA[find     One of the most powerful and useful commands      more than locating files; it can automatically execute sequences of other UNIX commands, using the filenames found for input.     Find command can delete, copy, move, and execute the files  that it finds. In addition, with the -exec parameter, it can automatically run files [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=15&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="left"><strong><em>find<br />
</em></strong>    One of the most powerful and useful commands <br />
    more than locating files; it can automatically execute sequences of other UNIX commands, using the filenames found for input.<br />
    Find command can delete, copy, move, and execute the files  that it finds. In addition, with the -exec parameter, it can automatically run files through any sequences of UNIX commands you need. It can even ask you before it performs such operations on any file.</p>
<p>   <em> $ find . -name *.gif -exec ls {} \;</em><em>The <em>-exec </em>parameter holds the real power. When a file is found that matches the search criteria, the <em>-exec </em>parameter defines what to do with the file. This tells computer to<br />
         Search, all files that have a name ending in .gif, list all found files using the ls command.<br />
The <em>-exec</em> parameter requires further scrutiny(close look). When a filename is found that matches the search criteria, the find command executes ls {} string, substituting the filename and path for the {} text.  If snkr.gif was found in search, find would execute this command.<br />
      <br />
<em>  $ls  ./snkr.gif</em></p>
<p></em><strong>Optional execution<br />
       </strong><em>-ok </em>is an important alternative to <em>-exec </em>. It behaves the  same as <em>-exec </em>, but prompts you to see of you want to run command on the file. <br />
      The following commands lists all the .txt files in home directory. To delete the files, you must enter Y or y when the find command prompts for action by listing the filename</p>
<p>   <em>$ find $HOME/. -name *.txt -ok  rm {} \;</em><em>So, -ok adds some safety to the danger of automatic file removal.</p>
<p></em><strong>Some good Uses of find</strong><br />
1. Clean out temporary files</p>
<p>    <em>$ find . \( -name a.out -o -name &#8216;*.o&#8217; -o -name &#8216;core&#8217; \) -exec rm {} \;</em><em>The file masks identifying the file types to be removed are located between the parantheses. each mask is preceded by  <em>-name</em> and <em>-o</em> is OR</p>
<p></em>2. Copy a directory&#8217;s contents<br />
   find lets you copy the entire contents of a directory while preserving the permissions, times, and ownership of  every file and subdirectory.</p>
<p>     <em>$ find . | cpio -pdumv /path/to/dest/dir</em><em>cpio is a command designed to copy files into and out of a cpio or tar archive, automatically preserving permissions, times, and ownership of files and subdirectories.</p>
<p></em>3. List the first lines of text files</p>
<p>    <em>$ find $HOME/. -name *.txt -exec head -n 1 -v {} \; &gt; report.txt<br />
        -v of head prints the headers giving the file names.</em><em>4. Maintain LOG and TMP file storage spaces</p>
<p></em>    <em>$ find  $LOGDIR -type d -mtime +0 -exec compress -r {} \;</em>        searches all the directories -type d in $LOGDIR wherein a file&#8217;s data has been modified within the last 24 hours (-mtime +0) and compresses them<em> </em><em>   $ find $LOGDIR  -type d -mtime +5 -exec rm -f {} ;</p>
<p>       finds all the directories -type d for files that are more than a work-week old (-mtime +5), and deletes them (rm -f {});<br />
5. Copy complex directory trees</p>
<p></em>         <em>$ find . -depth &#8211; print | cpio -o -O &lt;target dir&gt;</em><em>This copies directory trees from one machine to another machine while preserving copy permissions and the UID and GID, and leaving user files alone,</p>
<p></em>6. Locate and rename unprintable directories<br />
It&#8217;s possible in UNIX for an errant or malicious program to create a directory with unprintable characters.</p>
<p><em>      $ find . -inum 3553 -exec mv {} newname.dir \;<br />
</em><br />
7. List zero-length files</p>
<p><em>     $ find . -empty  -exec ls {} \;</em> </p>
<p>8.  Using different options in find</p>
<p>     <em>$ find   /   -type  -f  -user root   -perm   644  -name *.gif     -exec    ls -lh {} \;</em><em>9. Find all files owned by no one in particular and give them  to root:</p>
<p></em>   <em>$ find    / -nogroup   -exec chgrp  root {} \;10. Using find with xargs<br />
    $ find  . -iname *.gif | xargs ls -lht</em><em>   Find current directory (.) for files with .gif extension and the output of find is passed to xargs11. Use -type option for types of files such as<em>  </em>sym. link(l), plain file (f), directory (d), block special file (b),  character special file (c), named pipe(p), socket (s) etc.<br />
<em>   <br />
    $ find / -type s -exec ls -li {} \;<br />
     <br />
</em>The following command find all the symbolic links in a directory, and print the files the link points to</p>
<p></em><em>    $find  .  -type l -print  | xargs ls -ld   | awk  &#8216;{print $10}&#8217;</em><em>Resources:<br />
1. <a href="http://www.ibm.com/developerworks/aix/library/au-unix-find.html">http://www.ibm.com/developerworks/aix/library/au-unix-find.html</a><br />
2. <a href="http://www.grymoire.com/Unix/Find.html">http://www.grymoire.com/Unix/Find.html</a></p>
<p></em></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=15&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/11/15/using-find-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>expect script multiple server</title>
		<link>http://shankarsubedi.com/2007/11/13/expect-script-multiple-server/</link>
		<comments>http://shankarsubedi.com/2007/11/13/expect-script-multiple-server/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 04:37:20 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/11/13/expect-script-multiple-server/</guid>
		<description><![CDATA[#!/usr/bin/expect &#8211; #This program logins to the remote computer using expect and runs the diskcheck script located at /root/ #the pass_list and server_list contains the list of password and server name to connect respectively # @author sNkr set timeout -1 set pass_list &#8220;&#8221; set server_list &#8220;&#8221; global pass_list lappend pass_list &#8220;pass1&#8243; lappend pass_list &#8220;pass2&#8243; lappend [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=14&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#!/usr/bin/expect &#8211;<br />
#This program logins to the remote computer using expect and runs the diskcheck script located at /root/<br />
#the pass_list and server_list contains the list of password and server name to connect respectively<br />
# @author sNkr<br />
set timeout -1<br />
set pass_list &#8220;&#8221;<br />
set server_list &#8220;&#8221;<br />
global pass_list<br />
lappend pass_list &#8220;pass1&#8243;<br />
lappend pass_list &#8220;pass2&#8243;<br />
lappend pass_list &#8220;pass3&#8243;<br />
lappend pass_list &#8220;pass4&#8243;</p>
<p>global server_list<br />
lappend server_list &#8220;server1&#8243;<br />
lappend server_list &#8220;server2&#8243;<br />
lappend server_list &#8220;server3&#8243;<br />
lappend server_list &#8220;server4&#8243;</p>
<p>foreach s $server_list p $pass_list {<br />
 spawn ssh -l root $s<br />
 expect {<br />
   -re &#8220;(yes/no).*&#8221;<br />
    { send &#8220;yes\r&#8221;<br />
       expect  &#8220;password:&#8221;<br />
       send &#8220;$p\r&#8221;<br />
    }<br />
    &#8220;password:&#8221; {<br />
      send &#8220;$p\r&#8221;<br />
     }<br />
 }<br />
#change # according to the type of user logs in<br />
 expect &#8220;#&#8221;<br />
 send &#8220;/root/diskcheck \r&#8221;<br />
 #send &#8220;ls -lht \r&#8221;<br />
 expect &#8220;#&#8221;<br />
 send &#8220;logout \r&#8221;<br />
 interact<br />
}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=14&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/11/13/expect-script-multiple-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>check disk space in linux (script)</title>
		<link>http://shankarsubedi.com/2007/11/05/check-disk-space-in-linux-script/</link>
		<comments>http://shankarsubedi.com/2007/11/05/check-disk-space-in-linux-script/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 08:04:51 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/11/05/check-disk-space-in-linux-script/</guid>
		<description><![CDATA[This script can be used to check the total, used and free disks space in linux. file: checkdisk.sh  !/bin/bash DISC=$1 PARTITION=`df -h &#124;grep $DISC &#124; awk &#8216;{print $1}&#8217;` SIZE=`df -h&#124;grep $DISC&#124;awk &#8216;{print $2}&#8217;` USED=`df -h&#124;grep $DISC&#124;awk &#8216;{print $3}&#8217;` FREE=`df -h&#124;grep $DISC&#124;awk &#8216;{print $4}&#8217;` echo &#8220;Partition: $PARTITION&#8221; echo &#8220;Total size: $SIZE&#8221; echo &#8220;Used space: $USED&#8221; echo &#8220;Free space: $FREE&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=13&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This script can be used to check the total, used and free disks space in linux.</p>
<p>file: checkdisk.sh <br />
!/bin/bash<br />
DISC=$1<br />
PARTITION=`df -h |grep $DISC | awk &#8216;{print $1}&#8217;`<br />
SIZE=`df -h|grep $DISC|awk &#8216;{print $2}&#8217;`<br />
USED=`df -h|grep $DISC|awk &#8216;{print $3}&#8217;`<br />
FREE=`df -h|grep $DISC|awk &#8216;{print $4}&#8217;`<br />
echo &#8220;Partition: $PARTITION&#8221;<br />
echo &#8220;Total size: $SIZE&#8221;<br />
echo &#8220;Used space: $USED&#8221;<br />
echo &#8220;Free space: $FREE&#8221;</p>
<p>./diskcheck sda3 </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=13&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/11/05/check-disk-space-in-linux-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>rsync and windows-to-windows copy</title>
		<link>http://shankarsubedi.com/2007/10/29/rsync-and-windows-to-windos-copy/</link>
		<comments>http://shankarsubedi.com/2007/10/29/rsync-and-windows-to-windos-copy/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 08:38:56 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/10/29/rsync-and-windows-to-windos-copy/</guid>
		<description><![CDATA[rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up file transfers when destination file is being updated  The remote-update protocol allows rsync to transfer the difference between two sets of file across the network connection, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=11&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up file transfers when destination file is being updated<br />
 The remote-update protocol allows rsync to transfer the difference between two sets of file across the network connection, using an efficient checksum-search algorithm.<br />
SOme of the additional features of rsync are<br />
     1. support for copying links, devices, owners, groups, and permissions<br />
     2. exclude and exclude-from options similar to GNU tar<br />
     3. a CVS exclude mode for ignoring the same files that CVS would ignore<br />
     4. can use any transparent remote shell, including ssh or rsh<br />
     5. does not require super-user privileges<br />
     6. pipelining of file transfers to minimize latency costs<br />
     7. support for anonymous or authenticated rsync daemons (ideal for mirroring)</p>
<p>Rsync copies files either to or from a remote host, or locally on the current host. It doesnot support copying files between two remote hosts.<br />
If a single source arg is specified without a destination, the files are listed in an output format similar to &#8220;ls -l&#8221;</p>
<p>-a option of rsync means archive mode which is same as <strong>-rlptgoD</strong> which ensures that (-r) recurse into directories (-l)symbolic links, (-D) devices, attributes,(-p) permissions, (-o)ownerships, etc. are preserved in the transfer. Also there are options for compression to reduce size of data during transfer.</p>
<p>rsync can also be used in local-only mode, where both the source and destination don&#8217;t have a &#8216;:&#8217; in the name. In this case it behaves like an improved copy command.<br />
<strong> </strong></p>
<p><strong>ISSUE 1</strong><br />
<a href="http://www.itefix.no/phpws/index.php?module=faq&amp;FAQ_op=view&amp;FAQ_id=54">www.itefix.no/phpws/index.php?module=faq&amp;FAQ_op=view&amp;FAQ_id=54</a><br />
Can rsync transfer security/ownership information between two windows machines ?<br />
 <br />
A: cwRsync alone has limited support since it runs on cygwin posix emulation layer. However, after an rsync operation,<br />
you can use Robocopy XP010 from Windows Server 2003 Resource Kit, to transfer all windows specific file information<br />
 (NTFS security, timestamps, attributes, ownership, auditing info):<br />
   ROBOCOPY source destination /XO /XN /XC /E /COPY:ATSOU<br />
   options<br />
                <strong>/XO</strong> (exclude older),<br />
                <strong>/XN</strong> (exclude newer)<br />
                  and <strong>/XC </strong>(exclude changed) assure that only existing files are targeted.<br />
               Option /E is for recursive directory operation including empty ones.<br />
               Option <strong>/COPY:ATSOU</strong> instructs Robocopy to copy only<br />
                              attributes (A),<br />
                              timestamps (T),<br />
                             NTFS security information (S),<br />
                            Ownership (O) and auditing (U).</p>
<p>       Windows Server 2003 Resource Kit can be downloaded from<br />
<a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displayLang=en">microsoft.com/downloads/thankyou.aspx?familyId=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displayLang=en</a>    <br />
 </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=11&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/10/29/rsync-and-windows-to-windos-copy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>Juniper Endpoint Defense Initiative (J.E.D.I)</title>
		<link>http://shankarsubedi.com/2007/10/24/juniper-endpoint-defense-initiative-jedi/</link>
		<comments>http://shankarsubedi.com/2007/10/24/juniper-endpoint-defense-initiative-jedi/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 10:03:50 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/10/24/juniper-endpoint-defense-initiative-jedi/</guid>
		<description><![CDATA[JEDI, developed by juniper networks, provides a comprehensive solution to access the trust worthiness of SSL VPN endpoints. JEDI uses a layered approach to address the full range of risks that endpoints can pose to the enterprise network. Using JEDI we can secure the systems of users inside and outside network before allowing them to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=4&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>JEDI, developed by juniper networks, provides a comprehensive solution to access the trust worthiness of SSL VPN endpoints. JEDI uses a layered approach to address the full range of risks that endpoints can pose to the enterprise network.</p>
<p>Using JEDI we can secure the systems of users inside and outside network before allowing them to connect to SSL VPN appliance</p>
<p>JEDI components include</p>
<ul>
<li>Native Host checks and policy-based enforcement</li>
<li>Host check Client interface</li>
<li>Host check Server Integration Interface</li>
<li>Cache cleaner</li>
</ul>
<p>We may develop a layered protection approach, managing and provisioning a variety of endpoing check all from   within the SSL VPN.  We may choose to check for virus detection, personal firewall software before allowing a usr to access to any of the IVE realms, launch the software on the user&#8217;s system if necessary, map the user to roles based on the individual policies defined in your own DLL, and then further restrict access to individual resources based on the existence of spyware detection software. Then you may use Cache Cleaner to remove residual files and clear the users.</p>
<p>In short,<br />
      JEDI can push   missing software, antivirus signatures, personal firewall, malware detection agent, spawning virtual desktops.</p>
<p>Source:  <a href="http://f.netline.junipermarketing.com/netline000s/?msg=chief.txt&amp;_m=26%2e10ws%2ea%2emfm%2el">f.netline.junipermarketing.com/netline000s/?msg=chief.txt&amp;_m=26%2e10ws%2ea%2emfm%2el</a><br />
 </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=4&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/10/24/juniper-endpoint-defense-initiative-jedi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>Juniper Zones</title>
		<link>http://shankarsubedi.com/2007/10/24/juniper-zones/</link>
		<comments>http://shankarsubedi.com/2007/10/24/juniper-zones/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 09:49:07 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/10/24/juniper-zones/</guid>
		<description><![CDATA[        Juniper Network security devices use zones to host physical and logical interfaces, tunnels, and special-purpose items. There are number of default zones in ScreenOs but we can create new zones and configure them to meet the requirements of organization.       The names of ScreenOs security zones are as follows:         1. Layer 2:                     Use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=8&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>        Juniper Network security devices use zones to host physical and logical interfaces, tunnels, and special-purpose items. There are number of default zones in ScreenOs but we can create new zones and configure them to meet the requirements of organization.<br />
      The names of ScreenOs security zones are as follows:<br />
        1. Layer 2: <br />
                   Use Layer 2 security zones when the device operates in  Transparent mode.<br />
                      a. v1-trust &#8211; which hosts physical interfaces that communicate with trusted network space.<br />
                      b. v1-unturst &#8211; which hosts physical interfaces that communicate with untrusted network space.<br />
                      c. v1-dmz &#8211; which hosts the DMZ physical interface<br />
                      d. name <em>name_str &#8211; </em>user-defined layer 2 security zone. such zones can be created using the<br />
                          <strong>set</strong> <strong>zone name</strong><em> name_str</em><strong> <em>L2</em></strong> command<br />
       <br />
        2. Layer 3:<br />
                 Use Layer 3 security zone when the device operated in NAT or Router mode.<br />
                1. trust &#8211; which hosts physical interfaces (and logical subinterfaces) that communicate with trusted                    network space<br />
                2. untrust &#8211; which hosts physical interfaces ( and logical subinterfaces) that communicate with  untrusted         network space<br />
                3. global &#8211; which serves as a storage are for mapped IP (MIP) and virtual IP (VIP) address. Because traffice<br />
                                  going to these address is mapped to other addresses, the global zone does not require an interface.<br />
               4. dmz &#8211; which hosts the DMZ physical interface<br />
               5. name <em>name_str </em>- a user defined layer 2 security zone.  such zones can be created using <br />
                              <strong>set zone </strong><strong>name </strong><em>name_str   </em>command</p>
<p>       3. Tunnel:<br />
                      Use tunnel  zones to set up VPN tunnels with other security devices.<br />
           1. untrust-tun &#8211; which hosts VPN tunnels<br />
           2. name <em>name_str </em>- a user defoned tunnel zone. such zones can be created using the <br />
                    <strong>set zone name </strong><em>name_str <strong>tunnel </strong></em>tunnel</p>
<p>      4. Function:<br />
          Use function  zones as described below.<br />
          1. null &#8211; which serves as temporary storage for any interfaces that are not currently bound to another zones.<br />
          2. self &#8211; which hosts the interface for remote mangement commections. e.g. when you connect to the device via<br />
                        HTTP, SCS, or Telnet, you connect to the Self zone.<br />
         3. ha &#8211; which hosts the high availability interfaces HA1 and HA2<br />
         4. mgt &#8211; which hosts the out-of-band mangement  interface,   MGT<br />
       </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=8&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/10/24/juniper-zones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>qmail DNS response bug</title>
		<link>http://shankarsubedi.com/2007/10/18/qmail-dns-response-bug/</link>
		<comments>http://shankarsubedi.com/2007/10/18/qmail-dns-response-bug/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 04:43:49 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/10/18/qmail-dns-response-bug/</guid>
		<description><![CDATA[deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/        Dns responses have been limited to 512 bytes. Some large sites have started returning MX reponses longer than that. qmail and many other programs have a problem with Domain Name Server(DNS) queries that return very large results. There are two ways to fix this in qmail and one workaround that might be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=6&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/<br />
</strong><br />
       Dns responses have been limited to 512 bytes. Some large sites have started returning MX reponses longer than that. qmail and many other programs have a problem with Domain Name Server(DNS) queries that return very large results.</p>
<p>There are two ways to fix this in qmail and one workaround that might be sufficient for some applications.<br />
 1. patch=&gt; christopher K Davis patch<br />
    This is an adaption of a patch by Chuck Foster that should work with any resolver library, no matter how old, and uses a   guard byte to avoid the &#8220;number of bytes placed in the buffer&#8221; library bug.<br />
    <br />
 2. Bump the packet buffer size up to  65536<br />
          Works with recent BIND resolver libraries, which will automatically do a TCP query within the library code if the reply comes back   with truncation bit set. This is the simplest fix, though it&#8217;s also potentially the most wasteful of memory, depending on how your    system handles paging.<br />
    To do This just replace PACKETSZ with 65536 in dns.c and rebuild qmail.<br />
   <br />
 3. Run dnscache from djbdns<br />
   dnscache is, as the name implies, a caching DNS server. It knows how to handle large DNS responses and removes unnecessary information  from them, so the response it returns is usually much smaller than the direct response.<br />
   It generally improves DNS lookup performance for all  services that use DNS.<br />
   Because it doesnot require patching qmail, this might be an acceptable workaround.<br />
   Unfortunately, it&#8217;s not complete fix because response can still be too large for qmail.<br />
   <br />
 Since djbdns(dnscache) trims the DNS requests but after trimming also the size of the response can exceed 512 bytes because the DNS response can be as large as 65536. So this is not the complete solution. So using Christopher&#8217;s patch we can handle over sized DNS packets.<br />
   <br />
 The patch can be found at<br />
   <a href="http://www.ckdhr.com/ckd/qmail-103.patch">http://www.ckdhr.com/ckd/qmail-103.patch</a><br />
 </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=6&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/10/18/qmail-dns-response-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
		<item>
		<title>IPSec and SSL VPN</title>
		<link>http://shankarsubedi.com/2007/10/17/ipsec-and-ssl-vpn/</link>
		<comments>http://shankarsubedi.com/2007/10/17/ipsec-and-ssl-vpn/#comments</comments>
		<pubDate>Wed, 17 Oct 2007 08:03:04 +0000</pubDate>
		<dc:creator>sNkr</dc:creator>
				<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://shankarsubedi.wordpress.com/2007/10/17/ipsec-and-ssl-vpn/</guid>
		<description><![CDATA[     Traditional VPN&#8217;s rely   on IPSec to tunnel between the two endpoints. IPSec works on the Network Layer of the OSI model- securing all data that travels between the two endpoints without an association to any specific applications.      The majority of IPSec VPN solutions require third party hardware and/or software. In order to access [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=5&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>     Traditional VPN&#8217;s rely   on IPSec to tunnel between the two endpoints. IPSec works on the Network Layer of the OSI model- securing all data that travels between the two endpoints without an association to any specific applications.<br />
     The majority of IPSec VPN solutions require third party hardware and/or software. In order to access an IPSec VPN, the workstation or device must have an IPSec client software application installed. It can be burden, maintainining licenses for client software, cofigure client software on all remote machines &#8211; especially if they can&#8217;t be on site physically to configure the software themselves.<br />
  The advantage of IPSec VPN is that, it provides and extra layer of security if the client machine is required not only to be running the right VPN client software to connect to your IPSec VPN, but also must have it properly configured. These  are additional hurdles that an unauthorized user would have to get over before gaining access to your network.</p>
<p>  SSL is a common protocol and most web  browsers have SSL capabilities built in. It allow more precise access control. First of all they provide tunnels to specific application rather than to entire corporate LAN. So, users on SSL VPN connections can onlu access the application that they are configured to access rather than the whole network. Also it is easier to provide different access rights to different users and have more granular control over users access.<br />
  SSL   VPN&#8217;s have been gaining in prevalance and popularity; however they are not the right solutions for every instances.<br />
Next con of SSL VPN&#8217;s is that you are accessing the applications through a web browser which means that they really only work for web-based applications. It is possible to web-enable other applications so that they can be accessed through SSL VPN&#8217;s, however doing so adds to the complexity of the solution and eliminates some of the pros.<br />
   Having direct access only to the Web-enabled SSL application also means that users don&#8217;t have access to network resources such as,<br />
               1. printers <br />
               2. centralized storage and<br />
               3. unable to use the VPN for the file sharing or file backups</p>
<p>Note: In case of Juniper router, if the firewall blocks the IPSec connection then it automatically changes to the SSL VPN.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shankarsubedi.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shankarsubedi.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shankarsubedi.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shankarsubedi.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shankarsubedi.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shankarsubedi.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shankarsubedi.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shankarsubedi.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shankarsubedi.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shankarsubedi.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shankarsubedi.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shankarsubedi.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shankarsubedi.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shankarsubedi.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shankarsubedi.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shankarsubedi.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shankarsubedi.com&amp;blog=1835216&amp;post=5&amp;subd=shankarsubedi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shankarsubedi.com/2007/10/17/ipsec-and-ssl-vpn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f65ed8ba2566f73550cf3c8c3181bfd1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shankarsubedi</media:title>
		</media:content>
	</item>
	</channel>
</rss>
