<?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/"
	>

<channel>
	<title>FernandoMarcelo.com</title>
	<atom:link href="http://fernandomarcelo.com/feed" rel="self" type="application/rss+xml" />
	<link>http://fernandomarcelo.com</link>
	<description>Geek things that i learn everyday.</description>
	<pubDate>Wed, 24 Feb 2010 22:33:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CRB - Cpanel Rsync Backup</title>
		<link>http://fernandomarcelo.com/2010/02/24/crb-cpanel-rsync-backup/%</link>
		<comments>http://fernandomarcelo.com/2010/02/24/crb-cpanel-rsync-backup/%#comments</comments>
		<pubDate>Wed, 24 Feb 2010 22:25:03 +0000</pubDate>
		<dc:creator>Fernando Marcelo Morgenstern</dc:creator>
		
		<category><![CDATA[Work]]></category>

		<category><![CDATA[cpanel]]></category>

		<category><![CDATA[crb]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://fernandomarcelo.com/?p=78</guid>
		<description><![CDATA[Again, a long time without updating my blog, but i am back with a new script.
Last week, i was helping a friend with his server. As his main focus is web design, he asked me to help with some admin tasks, more exactly, with CPBackup and remote backups.
The issue was that CPBackup was taking 14 [...]]]></description>
			<content:encoded><![CDATA[<p>Again, a long time without updating my blog, but i am back with a new script.</p>
<p>Last week, i was helping a friend with his server. As his main focus is web design, he asked me to help with some admin tasks, more exactly, with CPBackup and remote backups.</p>
<p>The issue was that CPBackup was taking 14 hours to complete so, as he run it daily, his server was more than 50% of the time doing backups <img src='http://fernandomarcelo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I created a simple script, now called CRB - Cpanel Rsync Backup. This scripts does <strong>remote backups</strong> of your Cpanel server using rsync.</p>
<p>This means that the first time will take some hours to finish, but the next backups will be much faster as it only copies the changed files since last run. Considering that you run it daily, you will probably have very few files to copy.</p>
<p>This way you can save time, bandwidth, CPU and even money always having a full backup of your files on a safety place.</p>
<p><strong>Installation</strong></p>
<p>Please note, this script is still <strong>beta</strong>. Use at your own risk!</p>
<p>Installation is pretty simple. Just download the install script and run it:</p>
<blockquote>
<p style="padding-left: 30px;">wget http://fernandomarcelo.com/crb/install.sh</p>
<p style="padding-left: 30px;">sh install.sh</p>
</blockquote>
<p>It is installed at /usr/local/crb. The first step is to edit file /usr/local/crb/crb.conf with your conf. The file has some comments which should make it simple, but in case you have questions, feel free to ask on comments.</p>
<p>After that, you can run the script with:</p>
<blockquote>
<p style="padding-left: 30px;">sh /usr/local/crb/crb.sh</p>
</blockquote>
<p>Or, if you prefer to run it daily, add to cron.</p>
<p><strong>Note:</strong> you must set password less login in order to have it running properly via cron.</p>
<p><strong>Uninstall</strong></p>
<p>Just remove folder /usr/local/crb from your server and, if necessary, remove cron job too.</p>
<p><strong>Development</strong></p>
<p>I still want to add more features for this script, making it more flexible and reducing cpu usage . You can follow up the development at the repository page: <a href="http://jira.consultorpc.com:766/browse/GPL/crb/trunk">http://jira.consultorpc.com:766/browse/GPL/crb/trunk</a></p>
<p>Thanks for Daniel from <a href="http://consultorpc.com">ConsultorPC</a> for allowing me to use the SVN repository.</p>
<p><strong>How It Works?</strong></p>
<p>No time to write this at the moment, but i will try to write soon <img src='http://fernandomarcelo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://fernandomarcelo.com/2010/02/24/crb-cpanel-rsync-backup/%/feed</wfw:commentRss>
		</item>
		<item>
		<title>Installing DDos-Deflate and making sure that it won&#8217;t ban your users</title>
		<link>http://fernandomarcelo.com/2009/11/18/installing-ddos-deflate-and-making-sure-that-it-wont-ban-your-users/%</link>
		<comments>http://fernandomarcelo.com/2009/11/18/installing-ddos-deflate-and-making-sure-that-it-wont-ban-your-users/%#comments</comments>
		<pubDate>Wed, 18 Nov 2009 23:18:41 +0000</pubDate>
		<dc:creator>Fernando Marcelo Morgenstern</dc:creator>
		
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://fernandomarcelo.com/?p=72</guid>
		<description><![CDATA[I really like DDos-Deflate and have it installed on almost all servers that i run. The issue, is that sometimes it bans your clients, even when they don&#8217;t have a high number of connections or are not doing something wrong.
So, i am going to show how i install and do a simple modification to avoid [...]]]></description>
			<content:encoded><![CDATA[<p>I really like DDos-Deflate and have it installed on almost all servers that i run. The issue, is that sometimes it bans your clients, even when they don&#8217;t have a high number of connections or are not doing something wrong.</p>
<p>So, i am going to show how i install and do a simple modification to avoid this problem.</p>
<p><strong>1. Download and install:</strong></p>
<blockquote><p>wget http://www.inetbase.com/scripts/ddos/install.sh</p></blockquote>
<blockquote><p>chmod 0700 install.sh</p>
<p>/install.sh</p></blockquote>
<p><strong>2. Configuring</strong></p>
<p>Change your settings by editing file /usr/local/ddos/ddos.conf. I usually only change my email and the number of connections.</p>
<p>Because of the changes that we are going to make on step 3, a good number of connections is between 40 and 50, and not 150.</p>
<p><strong>3. Changing a few things</strong></p>
<p>Now, edit file /usr/local/ddos/ddos.sh and find this line:</p>
<blockquote><p>netstat -ntu | awk &#8216;{print $5}&#8217; | cut -d: -f1 | sort | uniq -c | sort -nr &gt; $BAD_IP_LIST</p></blockquote>
<p>Change it to:</p>
<blockquote><p>netstat -ntu | grep ESTAB | awk &#8216;{print $5}&#8217; | cut -d: -f1 | sort | uniq -c | sort -nr &gt; $BAD_IP_LIST</p></blockquote>
<p>And save the file.</p>
<p><strong>4.</strong> <strong>Conclusion</strong></p>
<p>The issue with ddos deflate banning your client&#8217;s IP is because it gets all connections on netstat and sometimes, if your client is accessing different services like web, mail and ftp server within a short period of time, it will ban his IP because of TIME_WAIT connections.</p>
<p>By applying the change that i mentioned, you are only checking for established connections.</p>
<p>From my experience, a user will rarely have more than 10 established connections to the server. So if an IP is getting more than 40 connections, he is probably doing something wrong <img src='http://fernandomarcelo.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://fernandomarcelo.com/2009/11/18/installing-ddos-deflate-and-making-sure-that-it-wont-ban-your-users/%/feed</wfw:commentRss>
		</item>
		<item>
		<title>Debian VE in OpenVz: FATAL: Could not load /lib/modules/2.6.26-2-openvz-amd64/modules.dep: No such file or directory</title>
		<link>http://fernandomarcelo.com/2009/11/18/debian-ve-in-openvz-fatal-could-not-load-libmodules2626-2-openvz-amd64modulesdep-no-such-file-or-directory/%</link>
		<comments>http://fernandomarcelo.com/2009/11/18/debian-ve-in-openvz-fatal-could-not-load-libmodules2626-2-openvz-amd64modulesdep-no-such-file-or-directory/%#comments</comments>
		<pubDate>Wed, 18 Nov 2009 23:00:58 +0000</pubDate>
		<dc:creator>Fernando Marcelo Morgenstern</dc:creator>
		
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://fernandomarcelo.com/?p=67</guid>
		<description><![CDATA[FATAL: Could not load /lib/modules/2.6.26-2-openvz-amd64/modules.dep: No such file or directory
I had this problem when running Debian on a OpenVZ VE, more exactly when trying to start APF. This problem also happens with other firewalls that use iptables.
The fix is pretty simple. On your HN, edit file /etc/vz/conf/{$VEID}.conf ( or /etc/vz/vz.conf if you want for all [...]]]></description>
			<content:encoded><![CDATA[<p><strong>FATAL: Could not load /lib/modules/2.6.26-2-openvz-amd64/modules.dep: No such file or directory</strong><br />
I had this problem when running Debian on a OpenVZ VE, more exactly when trying to start APF. This problem also happens with other firewalls that use iptables.</p>
<p>The fix is pretty simple. On your HN, edit file /etc/vz/conf/{$VEID}.conf ( or /etc/vz/vz.conf if you want for all VE ) and add the following line:</p>
<blockquote><p>IPTABLES=&#8221;ip_tables iptable_filter iptable_mangle ip_conntrack ip_conntrack_irc ip_conntrack_ftp ipt_state ipt_multiport ipt_limit  ipt_LOG ipt_REJECT ipt_length ipt_multiport ipt_owner ipt_state ipt_ttl ipt_TOS ipt_TCPMSS&#8221;</p></blockquote>
<p>This should be on one line, you shouldn&#8217;t have line breaks on it. Save the file and restart the VE.</p>
<p>Now, enter on the VE and run:</p>
<blockquote><p>depmod -a</p></blockquote>
<p>If you get problems about <span class="MsgBodyText">directory /lib/modules/2.6.26-2-openvz-amd64/ missing, just create it with:</span></p>
<blockquote><p><span class="MsgBodyText">mkdir </span><span class="MsgBodyText">/lib/modules/2.6.26-2-openvz-amd64/</span></p></blockquote>
<p>And run depmod -a again.</p>
<p>Done, you should not get more iptables problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://fernandomarcelo.com/2009/11/18/debian-ve-in-openvz-fatal-could-not-load-libmodules2626-2-openvz-amd64modulesdep-no-such-file-or-directory/%/feed</wfw:commentRss>
		</item>
		<item>
		<title>So, here is the place where i work</title>
		<link>http://fernandomarcelo.com/2009/04/16/so-here-is-the-place-where-i-work/%</link>
		<comments>http://fernandomarcelo.com/2009/04/16/so-here-is-the-place-where-i-work/%#comments</comments>
		<pubDate>Thu, 16 Apr 2009 18:28:52 +0000</pubDate>
		<dc:creator>Fernando Marcelo Morgenstern</dc:creator>
		
		<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://fernandomarcelo.com/?p=48</guid>
		<description><![CDATA[Sorry about the low quality picture. I used my IPhone, so the camera is just 2 megapixels.
That&#8217;s where i stay most of my time during work and non-work hours. It is a good place to work and using 3 monitors improves my productivity.

I have two 19&#8243; widescreen monitor with  one of them used in vertical [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry about the low quality picture. I used my IPhone, so the camera is just 2 megapixels.</p>
<p>That&#8217;s where i stay most of my time during work and non-work hours. It is a good place to work and using 3 monitors improves my productivity.</p>
<p><img class="aligncenter size-medium wp-image-49" title="img_0174" src="http://fernandomarcelo.com/wp-content/uploads/2009/04/img_0174-300x225.jpg" alt="img_0174" width="300" height="225" /></p>
<p>I have two 19&#8243; widescreen monitor with  one of them used in vertical position. That&#8217;s were my favorite editor ( <a href="http://kate-editor.org/">Kate</a> ) always stand.</p>
<p>And, at the middle, there is a 22&#8243; widescreen monitor.</p>
<p><strong>Hardware</strong></p>
<p>There is a Dell PowerEdge SC440 and a custom built computer ( C2D E8500, 4GB of RAM and 750GB of Harddisk ). Oh yes, i almost forgot. You can also see my Macbook on the right.</p>
<p><strong>Operational System</strong></p>
<p>My Server and PC runs <a href="http://debian.org">Debian GNU/Linux</a> and my Macbook is running Mac Os X - Leopard.</p>
]]></content:encoded>
			<wfw:commentRss>http://fernandomarcelo.com/2009/04/16/so-here-is-the-place-where-i-work/%/feed</wfw:commentRss>
		</item>
		<item>
		<title>Setting up my website</title>
		<link>http://fernandomarcelo.com/2009/04/16/setting-up-my-website/%</link>
		<comments>http://fernandomarcelo.com/2009/04/16/setting-up-my-website/%#comments</comments>
		<pubDate>Thu, 16 Apr 2009 13:33:55 +0000</pubDate>
		<dc:creator>Fernando Marcelo Morgenstern</dc:creator>
		
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://fernandomarcelo.com/?p=13</guid>
		<description><![CDATA[That&#8217;s it! I have been working for quite a while as a freelance programmer and thought it was time to set up a website where i can show my work  ( and hopefully get more ).
I own fernandomarcelo.com for 2 years but never had a website on it, just using for email. I will try [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s it! I have been working for quite a while as a freelance programmer and thought it was time to set up a website where i can show my work  ( and hopefully get more ).</p>
<p>I own fernandomarcelo.com for 2 years but never had a website on it, just using for email. I will try to keep this updated as much as i can.</p>
]]></content:encoded>
			<wfw:commentRss>http://fernandomarcelo.com/2009/04/16/setting-up-my-website/%/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
