<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Simon &#38; Jun life journey &#187; Linux howto</title>
	<atom:link href="http://www.simonandjun.com/wordpress/category/howto/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonandjun.com/wordpress</link>
	<description>Journey of our life...to a greener earth</description>
	<lastBuildDate>Tue, 16 Aug 2011 08:38:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Squid-2.6 transparent + SquidGuard</title>
		<link>http://www.simonandjun.com/wordpress/2009/04/14/squid-26-transparent-squidguard/</link>
		<comments>http://www.simonandjun.com/wordpress/2009/04/14/squid-26-transparent-squidguard/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:16:23 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Linux howto]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[SquidGuard]]></category>
		<category><![CDATA[transparent proxy]]></category>

		<guid isPermaLink="false">http://www.simonandjun.com/wordpress/2009/04/14/squid-26-transparent-squidguard/</guid>
		<description><![CDATA[Its a tired long day for today as I spend almost half a day to setup the Squid-2.6 in transparent mode with squidGuard and I think most of you will think that I&#8217;m that dumb takes so long to configure that. It&#8217;s a very good experience to learn that you always need to keep up [...]]]></description>
			<content:encoded><![CDATA[<p>Its a tired long day for today as I spend almost half a day to setup the Squid-2.6 in transparent mode with squidGuard and I think most of you will think that I&#8217;m that dumb takes so long to configure that. It&#8217;s a very good experience to learn that you always need to keep up to the latest update on Linux as if you have stopped playing with it you will loose out.</p>
<p>That&#8217;s why it took me so long till I found out what&#8217;s the problem. First there was problem with squidGuard that all the configuration was done perfectly but the filtering was not working, end up manage to find the problem was the blacklist was not build with .db format. Second problem was the new Squid configuration for transparent mode was different from the older version and much more simpler. Below I write up all the steps to configure transparent proxy with squidGuard.</p>
<p><span id="more-422"></span></p>
<p>Pre-requisite : Squid-2.6, squidGuard-1.4 and iptables</p>
<p>1) Squid and iptables can be installed from the distro cd media, I&#8217;ll assume you have already done so.</p>
<p>2) Download squidGuard from <a href="http://www.squidguard.org/Downloads/squidGuard-1.4.tar.gz" target="_blank">here</a>, unpack the package after finish download and do the installation as follow:-</p>
<blockquote><p>cd squidGuard-1.2.0<br />
./configure<br />
make<br />
make install</p></blockquote>
<p>3) After done the installation, now you need to download the blacklist file and I have do a small script to download the blacklist and update into the db folder. Copy the following and paste into a new file, save the file and change the file mode to 777 by &#8220;chmod 777 &lt;filename&gt;&#8221;.</p>
<blockquote><p>cd /usr/local/squidGuard/db/<br />
rm -f /usr/local/squidGuard/db/blacklists.tgz<br />
wget -c <a href="http://squidguard.mesd.k12.or.us/blacklists.tgz">http://squidguard.mesd.k12.or.us/blacklists.tgz</a><br />
rm -rfv /usr/local/squidGuard/db/blacklist/*<br />
tar xvfz /usr/local/squidGuard/db/blacklists.tgz<br />
/usr/local/bin/squidGuard -C all<br />
chown -R squid.squid /usr/local/squidGuard/db/blacklists/*</p></blockquote>
<p>You need to configured the squidGuard.conf before you can use the squidGuard, <a href="http://hakfig.bay.livefilestore.com/y1p5RlGPjKugxxwemPY5HxYm8S7UM6UMf3eg_7HZAfvJcMUdF9rXh3q72swz6cclwANlvZ_bd6qC3GfbisdKvRiFaiEknvPs5-u/squidGuard.conf?download" target="_blank">here</a> is a sample of the squidGuard.conf configuration file for your reference.</p>
<p>4) Just execute &#8220;./&lt;filename&gt;&#8221; to download the blacklist and update the blacklist database. You also can schedule this script to run weekly to update the blacklist database via crond.</p>
<p>5) After done the SquidGuard installation we proceed to configure the Squid to enable the SquidGuard filter and add the following</p>
<blockquote><p>redirect_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf</p></blockquote>
<p>at the end of the squid.conf file.</p>
<p>6) Then look for the line contain “http_port 3128” and add “transparent” behind as below</p>
<blockquote><p>“http_port 3128 transparent”</p></blockquote>
<p>this is how it enable the transparent proxy for the new squid version. Save the file and reload the squid using the following command</p>
<blockquote><p>/sbin/service squid reload</p></blockquote>
<p>7) The transparent proxy would not successful without add a firewall rules in the iptables as below</p>
<blockquote><p>$IPTABLES -t nat -A PREROUTING -i eth0 -p tcp &#8211;dport 80 -j REDIRECT &#8211;to-port 3128</p></blockquote>
<p>change the “eth0” according to your network interface and add other firewall rules that required but I would not cover it here as it depend on your network environment. Make sure you have put the above line into “/etc/rc.local” so everytime the system boot up will have the iptables rules enabled.</p>
<p>Here we have completed on the Squid Transparent Proxy with SquidGuard successfully configured.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.simonandjun.com%2Fwordpress%2F2009%2F04%2F14%2Fsquid-26-transparent-squidguard%2F';
  addthis_title  = 'Squid-2.6+transparent+%2B+SquidGuard';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.simonandjun.com/wordpress/2009/04/14/squid-26-transparent-squidguard/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Migrate Linux email to Mdaemon</title>
		<link>http://www.simonandjun.com/wordpress/2008/06/30/migrate-linux-email-to-mdaemon/</link>
		<comments>http://www.simonandjun.com/wordpress/2008/06/30/migrate-linux-email-to-mdaemon/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 15:06:39 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux howto]]></category>
		<category><![CDATA[Window]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.simonandjun.com/wordpress/?p=123</guid>
		<description><![CDATA[I was given a migration project to migrate Debian mail server to Mdaemon mail server. This project include setting up the Mdaemon mail server and migrate email over 600+ mailbox on Debian mail server, at first this project seem to be very straight forward as from the first meeting with the customer they mention is 90% of the user [...]]]></description>
			<content:encoded><![CDATA[<p>I was given a migration project to migrate Debian mail server to Mdaemon mail server. This project include setting up the Mdaemon mail server and migrate email over 600+ mailbox on Debian mail server, at first this project seem to be very straight forward as from the first meeting with the customer they mention is 90% of the user is using outlook express. This sound like all the email will be store on the client rather than in debian mailserver right? By the time we do the installation only we found out they given us the wrong info, where 90% of the user is using webmail&#8230;. !@#$#$%#% .</p>
<p><span id="more-123"></span></p>
<p>When I found out that then i know this is not easy man, migrate from webmail to Mdaemon as you all know that webmail store all the email is using Maildir format and not Mbox. If the email store in Mbox format, I can use Mdaemon Multipop to pull the email from Debian mail server and this will much more easier. So the fact now is all the email is store in Maildir and it need to be migrate to Mdaemon, my first plan as follow :-</p>
<p>1) Copy all the email inside Maildir folder that consist of cur, new, tmp folder and paste to mdaemon server<br />
2) Import back into Mdaemon using outlook express</p>
<p>The first plan sound like will work right, but end up with problems. Each of the email inside Maildir file name is too long and when copied over to windows each of the email file name is all same and it can&#8217;t be imported. So have to find another solutions and I was thinking to do the following:-</p>
<p>1) Convert Maildir to Mbox format<br />
2) Copy the mbox file to Mdaemon<br />
3) Extract the mbox file into individual emails<br />
4) Import all the emails using outlook express</p>
<p>Second plan sounds good but need to see whether I can find any tools that can do that from the net, and very glad that I manage to find all the tools needed. I found a tools call <em>Maildir to Mbox conversion</em> from <a href="http://www.systemsaligned.com/content/view/18/19/" target="_blank">here</a> and another tools call <em>Mbox2eml </em>but I have lost the website but I have uploaded the tools <a href="http://cid-ffa94585861850eb.skydrive.live.com/self.aspx/mbox%20tools" target="_blank">here</a>.</p>
<p><a href="http://cid-ffa94585861850eb.skydrive.live.com/self.aspx/Documentation/maildir|_2|_mdaemon.pdf">Here</a> you can get the manual on how to do the migrations.</p>
<p>Source : <a href="http://www.systemsaligned.com/content/view/18/19/" target="_blank">System Aligned</a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.simonandjun.com%2Fwordpress%2F2008%2F06%2F30%2Fmigrate-linux-email-to-mdaemon%2F';
  addthis_title  = 'Migrate+Linux+email+to+Mdaemon';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.simonandjun.com/wordpress/2008/06/30/migrate-linux-email-to-mdaemon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sendmail listen on port 587</title>
		<link>http://www.simonandjun.com/wordpress/2007/12/11/sendmail-listen-on-port-587/</link>
		<comments>http://www.simonandjun.com/wordpress/2007/12/11/sendmail-listen-on-port-587/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 14:48:31 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Linux howto]]></category>

		<guid isPermaLink="false">http://www.simonandjun.com/wordpress/index.php/2007/12/11/sendmail-listen-on-port-587/</guid>
		<description><![CDATA[Due to our country new policy of blocking all dynamic IP broadband  user from being spammer where they have blocked port 25 and force to used the broadband  provider smtp to send all the email out. It also affect those SOHO office that host their email in third party hosting and most of the provider [...]]]></description>
			<content:encoded><![CDATA[<p>Due to our country new policy of blocking all dynamic IP broadband  user from being spammer where they have blocked port 25 and force to used the broadband  provider smtp to send all the email out. It also affect those SOHO office that host their email in third party hosting and most of the provider have change to different port to cater this problem.</p>
<p>Here I&#8217;ll show you on how to set sendmail to listen on port other then 25 or using the MSA port 587.  This how-to based on &#8220;Centos 5.0&#8243;</p>
<p><u><strong>Requirement</strong></u></p>
<p>sendmail-cf-8.13.8-2.el5<br />
sendmail-8.13.8-2.el5</p>
<p>1. Make sure you have the 2 packages installed on your Linux machine. It can be any version as all the setting is done through the .mc files. To check if the packages is install by issuing this command:-</p>
<blockquote><p> # rpm -qa | grep sendmail</p></blockquote>
<p>2.  Go to the &#8220;/etc/mail&#8221; folder and edit the sendmail.mc file.</p>
<blockquote><p># cd /etc/mail<br />
# vi sendmail.mc</p></blockquote>
<p>After edit the &#8220;sendmail.mc&#8221; file, look for the following lines:-</p>
<blockquote><p>dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea&#8217;)dnl</p></blockquote>
<p>to activate this option, remove the word &#8220;dnl&#8221; infront of the statement like:-</p>
<blockquote><p>DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea&#8217;)dnl</p></blockquote>
<p>Save the file.</p>
<p>3. Backup your sendmail.cf configuration file first before you make the new sendmail.cf file.</p>
<blockquote><p># cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.&lt;date&gt;</p></blockquote>
<p>then you can run the following command to create the new sendmail.cf file</p>
<blockquote><p># make -C /etc/mail</p></blockquote>
<p>now restart your sendmail</p>
<blockquote><p># /sbin/service sendmail restart</p></blockquote>
<blockquote><p>Shutting down sm-client:                                   [  OK  ]<br />
Shutting down sendmail:                                    [  OK  ]<br />
Starting sendmail:                                         [  OK  ]<br />
Starting sm-client:                                        [  OK  ]</p></blockquote>
<p>4. Test to telnet to port 587 and see if its working</p>
<blockquote><p># telnet localhost 587</p></blockquote>
<blockquote><p>[root@mmix mail]# telnet localhost 587<br />
Trying 127.0.0.1&#8230;<br />
Connected to localhost.localdomain (127.0.0.1).<br />
Escape character is &#8216;^]&#8217;.<br />
220 abc.com.my ESMTP Sendmail 8.13.8/8.13.8; Fri, 7 Dec 2007 03:41:16 +0800</p></blockquote>
<p>once you can see the above msg, that&#8217;s mean your sendmail now is accepting both port 25 and 587. My friend Wing loon, have another <a href="http://wingloon.com/2007/12/05/setup-exim-qmail-sendmail-to-listen-on-additional-smtp-port/" target="_blank">how-to</a> on using IPTABLES to redirect port 25 to another port.</p>
<p>Source : <a href="http://www.sendmail.org/~gshapiro/8.10.Training/DaemonPortOptions.html" target="_blank">Sendmail.org</a> | <a href="http://wingloon.com/2007/12/05/setup-exim-qmail-sendmail-to-listen-on-additional-smtp-port/" target="_blank">Wingloon.com</a> <a href="http://www.sendmail.org/~gshapiro/8.10.Training/DaemonPortOptions.html" target="_blank"> </a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.simonandjun.com%2Fwordpress%2F2007%2F12%2F11%2Fsendmail-listen-on-port-587%2F';
  addthis_title  = 'Sendmail+listen+on+port+587';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.simonandjun.com/wordpress/2007/12/11/sendmail-listen-on-port-587/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sendmail with SMTP AUTH</title>
		<link>http://www.simonandjun.com/wordpress/2007/10/01/sendmail-with-smtp-auth/</link>
		<comments>http://www.simonandjun.com/wordpress/2007/10/01/sendmail-with-smtp-auth/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 14:05:15 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Linux howto]]></category>

		<guid isPermaLink="false">http://www.simonandjun.com/wordpress/?p=55</guid>
		<description><![CDATA[The purpose of this SMTP AUTH is to block spammer to use your mail server to be a spam server and only authenticated user will be able to send email out from your mail server. The following guide will show you how to enable the Authentication module and is using plain text during the authentication. [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of this SMTP AUTH is to block spammer to use your mail server to be a spam server and only authenticated user will be able to send email out from your mail server. The following guide will show you how to enable the Authentication module and is using plain text during the authentication.</p>
<p>In this guide, I will not go details into the basic sendmail configuration as I assume you&#8217;re familiar with the basic sendmail setup. I will more concentrate on the SMTP AUTH module and this guide can be applied to either Centos 4.x or Centos 5.x.</p>
<p><span id="more-55"></span></p>
<p>Requirement :</p>
<p>sendmail<br />
sendmail-cf<br />
cyrus-sasl<br />
cyrus-sasl-devel<br />
cyrus-sasl-lib<br />
cyrus-sasl-plain<br />
cyrus-sasl-md5</p>
<p>1. First you need to have sendmail installed either the service is started or stopped. Edit the sendmail.mc file under the &#8220;/etc/mail&#8221; folder.</p>
<p>cd /etc/mail<br />
vi sendmail.mc</p>
<p>2. Un-comment the following lines:-</p>
<p>define(`confAUTH_OPTIONS&#8217;, `A&#8217;)dnl<br />
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#8217;)dnl<br />
define(`confAUTH_MECHANISMS&#8217;, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#8217;)dnl</p>
<p>Eg.</p>
<p>define(`confAUTH_OPTIONS&#8217;, `A&#8217;)dnl<br />
dnl #<br />
dnl # The following allows relaying if the user authenticates, and disallows<br />
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links<br />
dnl #<br />
dnl define(`confAUTH_OPTIONS&#8217;, `A p&#8217;)dnl<br />
dnl #<br />
dnl # PLAIN is the preferred plaintext authentication method and used by<br />
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do<br />
dnl # use LOGIN. Other mechanisms should be used if the connection is not<br />
dnl # guaranteed secure.<br />
dnl # Please remember that saslauthd needs to be running for AUTH.<br />
dnl #<br />
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#8217;)dnl<br />
define(`confAUTH_MECHANISMS&#8217;, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#8217;)dnl</p>
<p>by default the &#8220;confAUTH_OPTIONS&#8221; is already un-commented, just leave it and un-comment the remaining 2 lines.</p>
<p>3. After made the changes, you need to create the new sendmail.cf file using the configuration from the</p>
<p>sendmail.mc. Run the following command to generate the new sendmail.cf file:</p>
<p>make -C /etc/mail</p>
<p>4. After generating the new sendmail.cf, you edit the basic setting for sendmail and start the sendmail service:-</p>
<p>/sbin/service sendmail start</p>
<p>make sure you can see the &#8220;OK&#8221; when the service starting.</p>
<p>5. Now you can test the sendmail see if the server is using the SMTP AUTH module by doing a telnet to port 25.</p>
<p>telnet localhost 25</p>
<p>if you can see like the screenshot below with this line &#8220;250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#8221; means its working.</p>
<p><img src="http://simonz.72photos.com/client_images/3606/smtp-auth.jpg" alt="" /></p>
<p>6. But that&#8217;s not all, you still not able to send email out from your server even you have keyin the correct username and password due to the saslauthd authenticator is not started. To do that start the saslauthd services:-</p>
<p>/sbin/service saslauthd start</p>
<p>7. Now you can try to use any email client to test send email to the server without using the SMTP AUTH on the client side and you will get the following error.</p>
<p><img src="http://simonz.72photos.com/client_images/3606/smtp-error.jpg" alt="" width="438" height="86" /></p>
<p>just enable the &#8220;SMTP AUTH&#8221; option in the email client and you can send the email out to the mail server.</p>
<p>8. Make sure both of the services is auto start when the server boot up:-</p>
<p>/sbin/chkconfig &#8211;level 2345 sendmail on<br />
/sbin/chkconfig &#8211;level 2345 saslauthd on</p>
<p>9. That&#8217;s all, you have done the SMTP AUTH for sendmail. Please drop me a comment if you found any error during your implementation and I&#8217;ll glad to help out.</p>
<p>Source : <a href="http://www.sendmail.org/~ca/email/auth.html" target="_blank">sendmail.org</a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.simonandjun.com%2Fwordpress%2F2007%2F10%2F01%2Fsendmail-with-smtp-auth%2F';
  addthis_title  = 'Sendmail+with+SMTP+AUTH';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.simonandjun.com/wordpress/2007/10/01/sendmail-with-smtp-auth/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Securing SSH with Denyhost</title>
		<link>http://www.simonandjun.com/wordpress/2007/09/27/securing-ssh-with-denyhost/</link>
		<comments>http://www.simonandjun.com/wordpress/2007/09/27/securing-ssh-with-denyhost/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 15:33:22 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Linux howto]]></category>

		<guid isPermaLink="false">http://www.simonandjun.com/wordpress/?p=53</guid>
		<description><![CDATA[Denyhost is a script intended to run by linux system administrators to help thwart SSH server attacks (also known as dictionary based attacks and brute force attacks). If you&#8217;ve ever looked at your ssh log (/var/log/secure on Redhat, /var/log/auth.log on Mandrake, etc&#8230;) you may be alarmed to see how many hackers attempted to gain access [...]]]></description>
			<content:encoded><![CDATA[<p>Denyhost is a script intended to run by linux system administrators to help thwart SSH server attacks (also known as dictionary based attacks and brute force attacks).</p>
<p>If you&#8217;ve ever looked at your ssh log (/var/log/secure on Redhat, /var/log/auth.log on Mandrake, etc&#8230;) you may be alarmed to see how many hackers attempted to gain access to your server. Hopefully, none of them were successful (but then again, how would you know?). Wouldn&#8217;t it be better to automatically prevent that attacker from continuing to gain entry into your system?</p>
<p><span id="more-53"></span></p>
<p>This is where Denyhost come in place, where it check for any host that try to login within few failed attempt the remote host ip will be block from login for week or month depend on your setting.</p>
<p>You need to have the followng packages installed:-</p>
<p>1. First you need to download from this website denyhost from here</p>
<p>cd /opt</p>
<p>wget -c http://optusnet.dl.sourceforge.net/sourceforge/denyhosts/DenyHosts-2.6.tar.gz</p>
<p>2. Extract the file</p>
<p>tar xvfz /opt/DenyHosts-2.6.tar.gz</p>
<p>cd /opt/Denyhost-2.6</p>
<p>3. Install the package</p>
<p>python setup.py install</p>
<p>4. After install, the sample configuration file will be located in /usr/share/denyhosts and you need to copy it</p>
<p>cd /usr/share/denyhosts<br />
cp denyhosts.cfg-dist denyhosts.cfg</p>
<p>5. Edit the denyhosts.cfg file and change the following lines:-</p>
<p>PURGE_DENY = 2w  # purge the blocked entries after 2 week. Default is never<br />
BLOCK_SERVICE = ALL  # default is sshd only, prefered to block all<br />
DENY_THRESHOLD_INVALID = 3  # default is 5, deny host if failed 3 login attempt.</p>
<p>the rest of the setting can leave it as default and it works perfectly. They do have other function that can send notification through email when new</p>
<p>block ip added.</p>
<p>6. We have done the setting part, now is to have the Denyhost to start automatically when server bootup. Copy the daemon-control file into</p>
<p>&#8220;/etc/rc.d/init.d/&#8221; folder.</p>
<p>cp daemon-control-dist /etc/rc.d/init.d/denyhost<br />
chkconfig &#8211;add denyhost</p>
<p>7. To start the service immediately, run the following</p>
<p>/sbin/service denyhost start</p>
<p>8. To check if the service is running</p>
<p>ps xa | grep denyhost</p>
<p>and if you can see as below, that&#8217;s mean is already working</p>
<p>16747 ?        S      0:00 python /usr/bin/denyhosts.py &#8211;daemon &#8211;config=/usr/share/denyhosts/denyhosts.cfg</p>
<p>9. All the IP being blocked is listed in the &#8220;/etc/hosts.deny&#8221; file and to remove the IP from blocked, just remove the IP from the file and it can be login back to the server.</p>
<p>That&#8217;s all, you have successfully installed the Denyhost.</p>
<p>Source :  <a href="http://www.howtoforge.com/preventing_ssh_dictionary_attacks_with_denyhosts">Howtoforge</a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.simonandjun.com%2Fwordpress%2F2007%2F09%2F27%2Fsecuring-ssh-with-denyhost%2F';
  addthis_title  = 'Securing+SSH+with+Denyhost';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.simonandjun.com/wordpress/2007/09/27/securing-ssh-with-denyhost/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mounting Windows share into Ubuntu Linux</title>
		<link>http://www.simonandjun.com/wordpress/2007/09/06/mounting-windows-share-into-ubuntu-linux/</link>
		<comments>http://www.simonandjun.com/wordpress/2007/09/06/mounting-windows-share-into-ubuntu-linux/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 15:33:11 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Linux howto]]></category>

		<guid isPermaLink="false">http://www.simonandjun.com/wordpress/?p=49</guid>
		<description><![CDATA[Today my friend (Yeoh) ask me to help him to mount a windows share folder in to a Linux box running on VMware. He is using Ubuntu 7.02 with Deluge installed to download torrent. He don&#8217;t want to save the downloaded torrent file into the VMware but into the windows share folder. So he ask [...]]]></description>
			<content:encoded><![CDATA[<p>Today my friend (Yeoh) ask me to help him to mount a windows share folder in to a Linux box running on VMware. He is using Ubuntu 7.02 with Deluge installed to download torrent. He don&#8217;t want to save the downloaded torrent file into the VMware but into the windows share folder.</p>
<p>So he ask me to help him to do the auto mount the windows share folder. To start off the configuration, make sure the windows pc have set as below:-</p>
<p>1) Windows firewall enable the &#8220;File and Printer Sharing&#8221;</p>
<p>2) Have share a folder with &#8220;Full access&#8221; and make sure there is no space in the shared name, try to use simple name.</p>
<p>If you have those set in the windows PC, then you can head to the Ubuntu box and mount the windows shared drive. If your Ubuntu does not have the smbfs type the following to install it:-</p>
<p># apt-get install smbfs</p>
<p>after install then we create a mount point folder in &#8220;<em>/mnt </em>&#8221; called download</p>
<p># mkdir /mnt/download</p>
<p># smbmount //&lt;computer name&gt;/&lt;shared folder&gt;  /mnt/download  -o password=&#8221;",rw,dmask=0775</p>
<p>This will mount the windows share folder into /mnt/download folder but will not auto mount after reboot, in order to do that i use the <em>&#8220;/etc/rc.local&#8221;</em> file to auto mount it. Add the following command in the file.</p>
<p>#  /usr/bin/smbmount //&lt;computer name&gt;/&lt;shared folder&gt;  /mnt/download -o password=&#8221;",rw,dmask=0775</p>
<p>if your windows share folder need username and password then use the following:-</p>
<p># /usr/bin/smbmount //&lt;computer name&gt;/&lt;shared folder&gt;  /mnt/download -o username=&lt;username&gt;,password=&lt;password&gt;,rw,dmask=0775</p>
<p>That&#8217;s all, now you can start using the <em>/mnt/download</em> folder.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.simonandjun.com%2Fwordpress%2F2007%2F09%2F06%2Fmounting-windows-share-into-ubuntu-linux%2F';
  addthis_title  = 'Mounting+Windows+share+into+Ubuntu+Linux';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.simonandjun.com/wordpress/2007/09/06/mounting-windows-share-into-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

