<?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>www.elsotanillo.net de Juan Sierra Pons</title>
	<atom:link href="http://www.elsotanillo.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.elsotanillo.net</link>
	<description>Linux, Open Source, Bash, Virtualization, Blog, Travels, etc.</description>
	<lastBuildDate>Thu, 29 Dec 2011 17:42:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu Cloud Webcast and service orchestration</title>
		<link>http://www.elsotanillo.net/2011/11/ubuntu-cloud-webcast-and-service-orchestration/</link>
		<comments>http://www.elsotanillo.net/2011/11/ubuntu-cloud-webcast-and-service-orchestration/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 18:13:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[service orchestration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Webminar]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/?p=885</guid>
		<description><![CDATA[Today I have assisted to the Ubuntu Cloud Webcast, Presented by: Mark Shuttleworth (Canonical Founder) and Stephen O&#8217;Grady from Redmonk. Enjoy! I have assisted to several others Ubuntu webminars: What&#8217;s new in Landscape 1.5: Link to the webinar Link to &#8230; <a href="http://www.elsotanillo.net/2011/11/ubuntu-cloud-webcast-and-service-orchestration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I have assisted to the Ubuntu Cloud Webcast, Presented by: <a title="http://en.wikipedia.org/wiki/Mark_Shuttleworth" href="http://en.wikipedia.org/wiki/Mark_Shuttleworth" target="_blank">Mark Shuttleworth</a> (Canonical Founder) and Stephen O&#8217;Grady from Redmonk.</p>
<p>Enjoy!<br />
<span id="more-885"></span><br />
<script type="text/javascript" src="http://www.brighttalk.com/clients/js/embed/embed.js"></script> <object class="BrightTALKEmbed" width="705" height="660"><param name="player" value="channel_player"/><param name="domain" value="http://www.brighttalk.com"/><param name="channelid" value="6793"/><param name="communicationid" value="35441"/><param name="autoStart" value="false"/><param name="theme" value=""/></object></p>
<p>I have assisted to several others Ubuntu webminars:</p>
<ul>
<li>What&#8217;s new in Landscape 1.5:</li>
</ul>
<blockquote>
<ol>
<li><a title="What's new in Landscape 1.5 webminar" href="https://us88.spreed.com/c/711148157/spreed/131/recorder?recording=1" target="_blank">Link to the webinar</a></li>
<li><a title="Landscape 1.5 Webinar.pdf" href="https://us88-rr.spreed.net/rrr/repo/1545371/application/pdf/001/Landscape%201.5%20Webinar.pdf?m=s&amp;u=https%3A%2F%2Fus88.spreed.com%2Fvalidate_ticket&amp;ticket=LWludGVybmFsOmRlNTIyNTg5LTdiY2QtNDk2Mi1hMzk0LTkxMzlhNzA1N2ZjMQcxNTQ1MzcxACRmYWMzOTVlZS0wOTY2LTQ3NmEtYjEyZS0yNjA3ODNmNTNhZWIXeJC6hoVAoDdfApO6SJEV&amp;download=1" target="_blank">Link to the documents</a></li>
</ol>
</blockquote>
<ul>
<li>Ubuntu Enterprsie Cloud in your Business:</li>
</ul>
<blockquote>
<ol>
<li><a title="Ubuntu Enterprsie Cloud in your Business webminar" href="https://us88.spreed.com/c/956818927/recording_gui?recording=1" target="_blank">Link to the webinar</a></li>
<li><a title="20100604UECWebinarpdf4.pdf" href="https://us88-rr.spreed.net/rrr/repo/1577275/application/pdf/002/20100604UECWebinarpdf4.pdf?m=s&amp;u=https%3A%2F%2Fus88.spreed.com%2Fvalidate_ticket&amp;ticket=LWludGVybmFsOmExM2M1ZjFlLThhYjUtNDg2MC1iYmMyLTM3MjY5MGJjYzZjNgcxNTc3Mjc1ACQxNjNlNmYxZC03ZmRjLTQ5NTAtYThlZS04M2M5Yjc1YjNiYTBthS4jSD6ywk6YjZDbmZc1&amp;download=1" target="_blank">Link to the documents</a></li>
</ol>
</blockquote>
<ul>
<li>Successful desktop migrations:</li>
</ul>
<blockquote>
<ol>
<li><a title="Successful Desktop Migration webminar" href="https://us88.spreed.com/c/907238117/recording_gui?recording=1" target="_blank">Link to the webinar</a></li>
<li><a title="UbuntuDesktopMigration.pdf" href="https://us88-rr.spreed.net/rrr/repo/1854441/application/pdf/000/UbuntuDesktopMigration.pdf?m=s&amp;u=https%3A%2F%2Fus88.spreed.com%2Fvalidate_ticket&amp;ticket=LWludGVybmFsOmQ0NDMxODZmLTBjZGMtNDMzOS1iN2ZlLTk4OTVkOTkyZTgxNwcxODU0NDQxACRjZDZjNTdkOS1lYzYwLTRlZDgtYmMxMC00NWZhMzkzN2RkZTS57Q9t0BCQaHDdxDAQYq+L&amp;download=1" target="_blank">Link to the documents</a></li>
</ol>
</blockquote>
<ul>
<li>Managing UEC with Landscape:</li>
</ul>
<blockquote>
<ol>
<li><a title="Managing UEC with Landscape webminar" href="https://us88.spreed.com/c/836231777/recording_gui?recording=1" target="_blank">Link to the webinar</a></li>
<li><a title="Landscape_Cloud_webinar.pdf" href="https://us88-rr.spreed.net/rrr/repo/1873384/application/pdf/002/Landscape_Cloud_webinar.pdf?m=s&amp;u=https%3A%2F%2Fus88.spreed.com%2Fvalidate_ticket&amp;ticket=LWludGVybmFsOmIxOTQ2ZDc0LTNhNjYtNDIyZi04OGYzLTdjYzFiYjk4ZjAwMwcxODczMzg0ACRhZGNjYjNkMC1jZTJhLTQ4NmMtYWU0OC0xOTAxM2RjNDk5YTHfrhCYSBJcnxPpDePQLgAB&amp;download=1" target="_blank">Link to the documents</a></li>
</ol>
</blockquote>
<ul>
<li>Top 10 Server questions answered</li>
</ul>
<blockquote>
<ol>
<li><a title="Your top 10 Ubuntu Server questions answered  webminar" href="https://eu42.spreed.com/c/322771773" target="_blank">Link to the webinar</a> This one I couldn&#8217;t assist  <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  but anyway the webinar is public <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ol>
</blockquote>
<p>Here you are the <a title="List with all Canonical webminars" href="http://www.canonical.com/about-canonical/resources/webinars" target="_blank">list with all Canonical webminars</a>.</p>
<p>More or less I already knew all the concepts speakers talked about: Landscape, cloud, computing, monitoring, provisioning etc. But in this one I first hear about something called <a title="A Formal Introduction to The Ubuntu Orchestra Project" href="http://blog.dustinkirkland.com/2011/08/formal-introduction-to-ubuntu-orchestra.html" target="_blank">Service orchestration.</a></p>
<p>I have previous experience with (as they call in the webinar): <strong>Machine-centric configuration</strong> management systems as <a title="http://www.puppetlabs.com" href="http://www.puppetlabs.com">puppet</a> and more or less with Landscape but In the webinar they talk about <strong>Service-centric</strong> management.</p>
<p>Interesting concept: managing services not machines.</p>
<p>I have learned something new so I can go to sleep now. &#8211; Spanish saying</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2011/11/ubuntu-cloud-webcast-and-service-orchestration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to connect a road warrior VPN linux client to a Check Point Firewall-1</title>
		<link>http://www.elsotanillo.net/2011/09/how-to-connect-a-road-warrior-vpn-linux-client-to-a-check-point-firewall-1/</link>
		<comments>http://www.elsotanillo.net/2011/09/how-to-connect-a-road-warrior-vpn-linux-client-to-a-check-point-firewall-1/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 14:54:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[VPN]]></category>
		<category><![CDATA[OpenSwan]]></category>
		<category><![CDATA[roadwarriors VPNs in linux]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/?p=842</guid>
		<description><![CDATA[Yesterday I received a message in the debian-user-spanish mailing list with subject: Conectarse por VPN a un Firewall-1 In that email the user was referring to very useful tutorial: Check Point Firewall-1 NG(X). I remembered that link as I used &#8230; <a href="http://www.elsotanillo.net/2011/09/how-to-connect-a-road-warrior-vpn-linux-client-to-a-check-point-firewall-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I received a message in the <a title="http://lists.debian.org/debian-user-spanish" href="http://lists.debian.org/debian-user-spanish" target="_blank">debian-user-spanish</a> mailing list with subject: <a title="Conectarse por VPN a un Firewall-1" href="http://lists.debian.org/debian-user-spanish/2011/09/msg01496.html" target="_blank">Conectarse por VPN a un Firewall-1</a></p>
<p>In that email the user was referring to very useful tutorial: <a title="Check Point Firewall-1 NG(X)" href="http://www.fw-1.de/aerasec/ng/vpn-freeswan/CP-FW1-NG+Linux-FreeSWAN-RoadWarrior.html" target="_blank">Check Point Firewall-1 NG(X). </a>I remembered that link as I used it to configure my first road warrior VPN client. But this document is outdated as the procedure to obtain the private key is not valid anymore. There is a new procedure that I documented in my personal wiki. In this post I am gonna copy &amp; paste the right procedure from it.</p>
<p><span id="more-842"></span></p>
<p>This is a almost copy and paste procedure post. I am not going to explain all the &#8220;History/Theory&#8221; as it has been already well documented in the <a title="Check Point Firewall-1 NG(X)" href="http://www.fw-1.de/aerasec/ng/vpn-freeswan/CP-FW1-NG+Linux-FreeSWAN-RoadWarrior.html" target="_blank">Check Point Firewall-1 NG(X)</a> tutorial.</p>
<h1>Get the needed files from the .pk12 certificate and put them in the right directories:</h1>
<p>Retrieving DER-encoded CRL from CheckPoint</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>firewall-<span style="color: #000000;">1</span>:<span style="color: #000000;">18264</span><span style="color: #000000; font-weight: bold;">/</span>ICA_CRL1.crl</pre></div></div>

<p>Converting DER-encoded CRL to PEM-encoded and store it in related directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl crl <span style="color: #660033;">-in</span> ICA_CRL1.crl <span style="color: #660033;">-inform</span> DER <span style="color: #660033;">-outform</span> PEM <span style="color: #660033;">-out</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ipsec.d<span style="color: #000000; font-weight: bold;">/</span>crls<span style="color: #000000; font-weight: bold;">/</span>checkpoint.crl</pre></div></div>

<p>Convert user certificate generated by Check Point Management from PKCS#12 to X.509</p>
<p>Extract private key of user PKCS#12, you have to specify first the import password (remember: given in GUI) and an export password</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl pkcs12 <span style="color: #660033;">-in</span> vpnjuan.p12 <span style="color: #660033;">-nocerts</span> <span style="color: #660033;">-out</span> tempkey.pem</pre></div></div>

<p>Convert private key of user to RSA:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl rsa <span style="color: #660033;">-in</span> tempkey.pem <span style="color: #660033;">-des3</span> <span style="color: #660033;">-out</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ipsec.d<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>vpnjuan-key.pem</pre></div></div>

<p>Copy <strong>firewall-1-cert.pem</strong> (provided by your network admin) in /etc/ipsec.d/certs/<strong>firewall-1-cert.pem</strong></p>
<p>Extract certificates of user from PKCS#12 to X.509 (results in a file containing the CA and the user certificate)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl pkcs12 <span style="color: #660033;">-in</span> vpnjuan.p12 <span style="color: #660033;">-nokeys</span> <span style="color: #660033;">-out</span> temp2.pem</pre></div></div>

<p>Split singe file into different ones, results in e.g. firewall-1-internal-ca.pem (CA certificate is first one in file) and vpnjuan-cert.pem (user certificate is normally the second one in file) The header part of the CA certificate is like:</p>
<p>subject=/O=checkpoint.intranet.example.com..p9bkhs</p>
<p>issuer= /O=checkpoint.intranet.example.com..p9bkhs</p>
<p>The header of the user certificate is like:</p>
<p>subject=/O=checkpoint.intranet.example.com..p9bkhs/OU=users/CN=freeswan</p>
<p>issuer=/O=checkpoint.intranet.example.com..p9bkhs</p>
<p>Copy user X.509 certificate to related Openswan directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> vpnjuan-cert.pem <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ipsec.d<span style="color: #000000; font-weight: bold;">/</span>certs</pre></div></div>

<p>Copy firewall-1 CA certificate to related Openswan directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> firewall-<span style="color: #000000;">1</span>-internal-ca.pem <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ipsec.d<span style="color: #000000; font-weight: bold;">/</span>cacerts</pre></div></div>

<h1>Modifying the .conf files:</h1>
<p>Add the following line to /etc/ipsec.secrets</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">: RSA <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ipsec.d<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>vpnjuan-key.pem <span style="color: #000000; font-weight: bold;">%</span>prompt</pre></div></div>

<p>Modify the /etc/ipsec.conf depending your own configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/ipsec/ipsec.conf - Openswan IPsec configuration file</span>
<span style="color: #666666; font-style: italic;"># RCSID $Id: ipsec.conf.in,v 1.15.2.6 2006/10/19 03:49:46 paul Exp $</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># This file:  /usr/share/doc/openswan-2.4.15-r2/ipsec.conf-sample</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Manual:     ipsec.conf.5</span>
&nbsp;
version <span style="color: #000000;">2.0</span>     <span style="color: #666666; font-style: italic;"># conforms to second version of ipsec.conf specification</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># basic configuration</span>
config setup
        <span style="color: #666666; font-style: italic;"># plutodebug / klipsdebug = &quot;all&quot;, &quot;none&quot; or a combation from below:</span>
        <span style="color: #666666; font-style: italic;"># &quot;raw crypt parsing emitting control klips pfkey natt x509 private&quot;</span>
        <span style="color: #666666; font-style: italic;"># eg: plutodebug=&quot;control parsing&quot;</span>
        <span style="color: #666666; font-style: italic;">#</span>
        <span style="color: #666666; font-style: italic;"># ONLY enable plutodebug=all or klipsdebug=all if you are a developer !!</span>
        <span style="color: #666666; font-style: italic;">#</span>
        <span style="color: #666666; font-style: italic;"># NAT-TRAVERSAL support, see README.NAT-Traversal</span>
        <span style="color: #007800;">nat_traversal</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>
        <span style="color: #666666; font-style: italic;"># virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12</span>
        <span style="color: #666666; font-style: italic;">#</span>
        <span style="color: #666666; font-style: italic;"># enable this if you see &quot;failed to find any available worker&quot;</span>
        <span style="color: #007800;">nhelpers</span>=<span style="color: #000000;">0</span>
<span style="color: #666666; font-style: italic;">#       plutodebug=all</span>
        <span style="color: #007800;">protostack</span>=netkey
<span style="color: #666666; font-style: italic;"># Add connections here</span>
<span style="color: #666666; font-style: italic;"># sample VPN connections, see /etc/ipsec.d/examples/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## RoadWarrior to Net behind Gateway: FreeS/WAN X.509 &lt;-&gt; Check Point - Net</span>
conn MYCOMPANYCONNECTION
    <span style="color: #666666; font-style: italic;"># Right side is FreeS/WAN RoadWarrior</span>
    <span style="color: #007800;">right</span>=<span style="color: #000000; font-weight: bold;">%</span>defaultroute
    <span style="color: #007800;">rightrsasigkey</span>=<span style="color: #000000; font-weight: bold;">%</span>cert
    <span style="color: #007800;">rightcert</span>=vpnjuan-cert.pem
    <span style="color: #666666; font-style: italic;"># Left side is Check Point</span>
    <span style="color: #007800;">left</span>=X.X.X.X          <span style="color: #666666; font-style: italic;">### put here your firewall's IP address</span>
    <span style="color: #007800;">leftsubnet</span>=10.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span> <span style="color: #666666; font-style: italic;">### put here your company's network range</span>
    <span style="color: #007800;">leftcert</span>=firewall-<span style="color: #000000;">1</span>-cert.pem
    <span style="color: #007800;">leftid</span>=X.X.X.X        <span style="color: #666666; font-style: italic;">### put here your firewall's IP address</span>
    <span style="color: #666666; font-style: italic;"># config</span>
    <span style="color: #007800;">type</span>=tunnel
    <span style="color: #007800;">keyingtries</span>=<span style="color: #000000;">3</span>
    <span style="color: #007800;">disablearrivalcheck</span>=no
    <span style="color: #007800;">authby</span>=rsasig
    <span style="color: #007800;">auth</span>=esp
    <span style="color: #007800;">keyexchange</span>=ike
    <span style="color: #007800;">auto</span>=route</pre></div></div>

<h1>Procedure to connect:</h1>
<p>Restart ipsec daemon to reread configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ipsec.d<span style="color: #000000; font-weight: bold;">/</span>certs<span style="color: #666666; font-style: italic;"># service ipsec restart</span>
ipsec_setup: Stopping Openswan IPsec...
ipsec_setup: stop ordered, but IPsec appears to be already stopped<span style="color: #000000; font-weight: bold;">!</span>
ipsec_setup: doing cleanup anyway...
ipsec_setup: Starting Openswan IPsec U2.6.28<span style="color: #000000; font-weight: bold;">/</span>K2.6.38-<span style="color: #000000;">2</span>-amd64...</pre></div></div>

<p>Insert the passphrase of yout private key:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ipsec.d<span style="color: #000000; font-weight: bold;">/</span>certs<span style="color: #666666; font-style: italic;"># ipsec auto --rereadsecrets</span>
040 need passphrase <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #ff0000;">'/etc/ipsec.d/private/vpnjuan-key.pem'</span>
Enter passphrase:</pre></div></div>

<h1>Start the VPN:</h1>
<p>mediacenter:/etc/ipsec.d/certs# ipsec auto &#8211;up MYCOMPANYCONNECTION</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">104</span> <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#1: STATE_MAIN_I1: initiate</span>
003 <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#1: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n] method set to=106</span>
<span style="color: #000000;">106</span> <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#1: STATE_MAIN_I2: sent MI2, expecting MR2</span>
003 <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#1: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike-02/03: i am NATed</span>
<span style="color: #000000;">108</span> <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#1: STATE_MAIN_I3: sent MI3, expecting MR3</span>
004 <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#1: STATE_MAIN_I4: ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=oakley_3des_cbc_192 prf=oakley_sha group=modp1024}</span>
<span style="color: #000000;">117</span> <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#2: STATE_QUICK_I1: initiate</span>
003 <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#2: ignoring informational payload, type IPSEC_RESPONDER_LIFETIME msgid=1a0f153c</span>
004 <span style="color: #ff0000;">&quot;MYCOMPANYCONNECTION&quot;</span> <span style="color: #666666; font-style: italic;">#2: STATE_QUICK_I2: sent QI2, IPsec SA established tunnel mode {ESP=&gt;0x6ae22f40 &lt;0x4bca9ef5 xfrm=3DES_0-HMAC_SHA1 NATOA=none NATD=none DPD=none}</span></pre></div></div>

<p>Launch the rdesktop (terminal server client for linux) against your Pc&#8217;s IP address and have fun!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ipsec.d<span style="color: #000000; font-weight: bold;">/</span>certs<span style="color: #666666; font-style: italic;"># rdesktop X.X.X.X</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2011/09/how-to-connect-a-road-warrior-vpn-linux-client-to-a-check-point-firewall-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Backing up a cpanel hosting account</title>
		<link>http://www.elsotanillo.net/2011/09/backing-up-a-cpanel-hosting-account/</link>
		<comments>http://www.elsotanillo.net/2011/09/backing-up-a-cpanel-hosting-account/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 17:59:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Bluehost]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Spideroak]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/?p=797</guid>
		<description><![CDATA[Since 2005 I have a hosted this web page in the Cpanel based Bluehost company. First with Joomla and recently migrated to WordPress. Bluehost allows to download a daily, weekly and monthly backup from your Cpanel control panel, but manual &#8230; <a href="http://www.elsotanillo.net/2011/09/backing-up-a-cpanel-hosting-account/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since 2005 I have a hosted this web page in the <a title="http://www.cpanel.net" href="http://www.cpanel.net" target="_blank">Cpanel</a> based <a title="www.bluehost.com" href="http://www.bluehost.com/track/elsotani" target="_blank">Bluehost </a>company. First with <a title="www.joomla.org" href="http://www.joomla.org" target="_blank">Joomla</a> and recently migrated to <a title="www.wordpress.org" href="http://www.wordpress.org" target="_blank">WordPress</a>.</p>
<p><a title="www.bluehost.com" href="http://www.bluehost.com/track/elsotani" target="_blank">Bluehost </a>allows to download a daily, weekly and monthly backup from your <a title="http://www.cpanel.net" href="http://www.cpanel.net" target="_blank">Cpanel </a>control panel, but manual intervention is needed:</p>
<ol>
<li>Logon in the control panel</li>
<li>Navigate to the backup page</li>
<li>Perform the backup</li>
<li>Download it to your local computer.</li>
</ol>
<p>This is a manually/time consuming task and of course <strong>you should not forget it!!</strong></p>
<p>In this post I gonna show my automatic method to backup files and databases using:</p>
<ol>
<li>Crontab for automatic backups.</li>
<li>Public/private keys for passwordless ssh connections.</li>
<li>Mysqldump for dumping the MySQL databases to a local file.</li>
<li>Rsync command for synchronizing directories between remote and local servers. This way bandwidth is reduced as if a file has already been copied to the local server no data transfer is needed.</li>
<li><a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak</a> for data <a title="http://en.wikipedia.org/wiki/Data_deduplication" href="http://en.wikipedia.org/wiki/Data_deduplication" target="_blank">deduplication</a> and remote backup.</li>
</ol>
<p>Some previous knowledge is needed to understand how it works, anyway there are some useful links to understand it. <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span id="more-797"></span></p>
<p>Let&#8217;s have a look to the script:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Defining some variables</span>
<span style="color: #007800;">MAILTO</span>=<span style="color: #ff0000;">&quot;your@domain.tld&quot;</span>
<span style="color: #007800;">USERDB</span>=<span style="color: #ff0000;">&quot;yourlogin&quot;</span>
<span style="color: #007800;">PASSDB</span>=<span style="color: #ff0000;">&quot;YourDBPASS&quot;</span>
<span style="color: #007800;">SSHUSER</span>=<span style="color: #ff0000;">&quot;yoursshuser&quot;</span>
<span style="color: #007800;">DOMAIN</span>=<span style="color: #ff0000;">&quot;domain.tld&quot;</span> <span style="color: #666666; font-style: italic;"># This is your main domain</span>
<span style="color: #007800;">LOCAL_MYSQL_PATH_BACKUP</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/domain.tld/BackupDDBB/&quot;</span>
<span style="color: #007800;">LOCAL_PATH_BACKUP</span>=<span style="color: #ff0000;">&quot;/home/login/domain.tld/&quot;</span>
<span style="color: #007800;">DB_NAME_BACKUP</span>=<span style="color: #ff0000;">&quot;BackupDDBB_<span style="color: #780078;">`date +%Y-%m-%d`</span>.sql&quot;</span>
<span style="color: #007800;">REMOTE_PATH_BACKUP</span>=<span style="color: #ff0000;">&quot;/home/<span style="color: #007800;">$SSHUSER</span>/&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## Checking ssh-agent is running and have valid identities already loaded</span>
<span style="color: #c20cb9; font-weight: bold;">ssh-add</span> <span style="color: #660033;">-l</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
        <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Please add private key identities to the authentication agent and run it again&quot;</span><span style="color: #000000; font-weight: bold;">|</span>mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;error in backup sc
ript&quot;</span> <span style="color: #007800;">$MAILTO</span>
        <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span> <span style="color: #666666; font-style: italic;">## no identities were loaded, so the script finished here as private/public ssh-keys are needed to remote logon</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Loading ssh-agent variables for private/public passwordless logon</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>keychain
<span style="color: #7a0874; font-weight: bold;">source</span>  <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>.keychain<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${HOSTNAME}</span><span style="color: #660033;">-sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Remote msyqldump to local file</span>
<span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$SSHUSER</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #007800;">$DOMAIN</span> <span style="color: #ff0000;">&quot;mysqldump -u<span style="color: #007800;">$USERDB</span> -p<span style="color: #007800;">$PASSDB</span> --all-databases&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$LOCAL_MYSQL_PATH_BACKUP</span><span style="color: #007800;">$DB_NAME_BACKUP</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Rsync between remote and local server</span>
<span style="color: #666666; font-style: italic;">### We don't want to backup cache, session, mail and others directories,  so I &quot;--exclude&quot; them from the rsync command</span>
<span style="color: #666666; font-style: italic;">###</span>
&nbsp;
rsync <span style="color: #660033;">-avr</span> <span style="color: #660033;">--exclude</span> <span style="color: #ff0000;">'mail/'</span> \
           <span style="color: #660033;">--exclude</span> <span style="color: #ff0000;">'.cpanel'</span> \
           <span style="color: #660033;">--exclude</span> <span style="color: #ff0000;">'tmp'</span> \
<span style="color: #007800;">$SSHUSER</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #007800;">$DOMAIN</span>:<span style="color: #007800;">$REMOTE_PATH_BACKUP</span> <span style="color: #007800;">$LOCAL_PATH_BACKUP</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Run SpiderOak for deduplication and folder synchronization</span>
SpiderOak <span style="color: #660033;">--batchmode</span></pre></td></tr></table></div>

<p>And now let&#8217;s explain how it works:</p>
<ol>
<li>Some variables must to be defined depending your own configuration. MAILTO, USERDB, etc. These depends on your login name, ssh user, etc</li>
<li>The script checks if the ssh-agent have valid identities already loaded. If not an email is send to MAILTO informing about the error and the script returns a 1 as a returning code.</li>
<li>Runs the <a title="http://www.gentoo.org/proj/en/keychain/index.xml" href="http://www.gentoo.org/proj/en/keychain/index.xml" target="_blank">keychain</a> and read some variables from <em>$HOME/.keychain/${HOSTNAME}-sh</em> file. Please read the <a title="http://oceanpark.com/notes/howto_ssh_keychain_public_key_authentication_forwarding.html" href="http://oceanpark.com/notes/howto_ssh_keychain_public_key_authentication_forwarding.html" target="_blank"><span style="font-family: CG Times;">Passwordless connections via OpenSSH using public key authentication, keychain and AgentForward.</span></a><span style="font-family: CG Times;"> web page for more information.</span></li>
<li><span style="font-family: CG Times;">As at this moment passwordless ssh connections can be made between your computer and the remote server. So remote commands can be launched. Now a backup using msyqldump is made in a LOCAL_PATH_BACKUP in your local computer with all your mysql databases. <strong>Note: I don&#8217;t have any postgresql database. If you have any you will have to deal with it by yourself. But the same procedure can be applied with some modifications.</strong></span></li>
<li><span style="font-family: CG Times;">At this moment databases are already copied to the local server so we can proceed with the raw data in your remote /home/login directory. The rsync command is launched excluding some directories which contains no interesting data to be copied. When rsync finished all the files are copied to our local computer</span></li>
<li><span title="www.spideroak.com">Now is turn run the <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak</a> command (<a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak</a> needs to be previously installed and configured). This will copy (using data <a title="http://en.wikipedia.org/wiki/Data_deduplication" href="http://en.wikipedia.org/wiki/Data_deduplication" target="_blank">deduplication</a>) your pre-defined directories to the <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak</a> cloud. <strong>This way you will have at least 2 remote copies:</strong> your local PC and the <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak</a> cloud.<br />
</span></li>
</ol>
<h1> Installing SpiderOak in your computer (the debian way)</h1>
<ol>
<li>Create your <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak </a>account. They provide a 2 GBlifetime free account.</li>
<li>install the client depending your O.S (They have clients for many O.S. windows, linux, MAC OS). For Debian add the following to your <strong>sources.list</strong>:                             deb http://apt.spideroak.com/debian/ stable non-free</li>
<li>apt-get update &amp;&amp; apt-get install SpiderOak</li>
<li>Run <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak</a> from a console to start the configuration GUI and customize it to adjust your needs: defining the directories you want to backup, you want to share, you want to sync with others computers, etc.</li>
</ol>
<h1>FAQs:</h1>
<h2>I don&#8217;t see any deduplication benefits here <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_evil.gif' alt=':evil:' class='wp-smiley' />   Can you put an example?</h2>
<p>Imagine you have 3 Joomla, 4 Mediawiki and 6 WordPress installations in your <a title="www.bluehost.com" href="http://www.bluehost.com/track/elsotani" target="_blank">Bluehost </a>account.</p>
<p>The benefits can be seen when the <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak</a> software copies the data between your server and its cloud network as all the installation files must be the same (if your are using same versions) and even if they are different versions as they must look similar. Data is transfered onces for same files and partially for similar files. This saves you a lot of bandwidth and space on your <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak</a> account.</p>
<p><a title="SpiderOak uses de-duplication in a very advantageous way as it relates to your SpiderOak account" href="https://spideroak.com/blog/20090112220000-what-does-i_-mn--v_r-__--_-_-_c_">&#8220;<em>SpiderOak uses de-duplication in a very advantageous way as it relates to your SpiderOak account</em>&#8220;</a></p>
<p>Today my SpiderOak account has <strong>21.515 GB</strong></p>
<p>Size of all stored files (without compression or deduplication): <strong>107.638 GB</strong></p>
<p>Also SpiderOak keep multiple versions of files:</p>
<p><a title="If a file is ever damaged or deleted or accidentally overwritten, you will always have the option of downloading an earlier undamaged version." href="https://spideroak.com/faq/questions/6/does_spideroak_keep_multiple_versions_of_files/"><em>&#8220;If a file is ever damaged or deleted or accidentally overwritten, you will always have the option of downloading an earlier undamaged version.&#8221;</em></a></p>
<h2>I am a little bit concerned/paranoid with my backups. How can I have more security in my backups?</h2>
<p>If for more security you understand more copies of your data in distant places&#8230;. you can use the <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak&#8217;s</a> SYNC feature.</p>
<p>In a standard configuration you can have several directories synchronized in severals server across multiple location using the standard <a title="www.spideroak.com" href="https://spideroak.com/download/referral/a219fa1e410c25e80883cbfbd01d3769" target="_blank">SpiderOak&#8217;s</a> client. <a title="In a standard configuration you can have several directories synchronized in severals server across multiple location using the standard SpiderOak's client" href="https://spideroak.com/fiveservicesinone#sync">Learn howto</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2011/09/backing-up-a-cpanel-hosting-account/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Debian Templates Disk Images Qemu/KVM for libvirt</title>
		<link>http://www.elsotanillo.net/2011/08/debian-templates-disk-images-qemukvm-for-libvirt/</link>
		<comments>http://www.elsotanillo.net/2011/08/debian-templates-disk-images-qemukvm-for-libvirt/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 19:44:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Qemu / KVM]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[debian virtual templates]]></category>
		<category><![CDATA[kvm debian templates]]></category>
		<category><![CDATA[qemu debian templates]]></category>
		<category><![CDATA[virtualbox debian templates]]></category>
		<category><![CDATA[vmware debian templates]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/?p=768</guid>
		<description><![CDATA[A long time ago, in a galaxy far far away when I started with openvz I followed this tutorial for Debian template creation. Now I am adapting it (using my own experience and this template-squeeze tutorial too) to Qemu/KVM disk &#8230; <a href="http://www.elsotanillo.net/2011/08/debian-templates-disk-images-qemukvm-for-libvirt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A long time ago, in a galaxy far far away when I started with openvz I followed this tutorial for <a href="http://wiki.openvz.org/Debian_template_creation#Squeeze_.28current_Debian_stable.29" rel="nofollow">Debian template creation</a>. Now I am adapting it (using my own experience and this <a href="http://wiki.sugarlabs.org/go/Machine/template-squeeze" rel="nofollow">template-squeeze tutorial </a>too) to Qemu/KVM disk images than later can be used directly or via libvirt.</p>
<p>This procedure tries to generalize the template. While working with disk cloned images many elements need to be &#8220;generalized&#8221; before capturing and deploying a disk image to multiple computers. Some of these elements include:</p>
<ol>
<li>ssh keys</li>
<li>/etc/apt/sources.list</li>
</ol>
<p>The more &#8220;generalized&#8221; is a template, the less manual work is needed after deploying it.</p>
<p>This method must work in others virtualization systems: vmware, virtualbox, etc. As it is &#8220;virtualizator/hypervisor/emulator independent&#8221; as it is focused only in the disk image.</p>
<p><span id="more-768"></span></p>
<ul>
<li>Install the Debian image using you usual procedure, LVM, packages, virtio, etc.</li>
</ul>
<ul>
<li>Set Debian repositories</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&lt;&lt;</span>EOF <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list
deb http:<span style="color: #000000; font-weight: bold;">//</span>ftp.rediris.es<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> squeeze main
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>ftp.rediris.es<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> squeeze main
&nbsp;
deb http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org<span style="color: #000000; font-weight: bold;">/</span> squeeze<span style="color: #000000; font-weight: bold;">/</span>updates main
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org<span style="color: #000000; font-weight: bold;">/</span> squeeze<span style="color: #000000; font-weight: bold;">/</span>updates main
&nbsp;
<span style="color: #666666; font-style: italic;"># squeeze-updates, previously known as 'volatile'</span>
deb http:<span style="color: #000000; font-weight: bold;">//</span>ftp.rediris.es<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> squeeze-updates main
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>ftp.rediris.es<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> squeeze-updates main
EOF</pre></div></div>

<ul>
<li>Install some more packages</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> quota <span style="color: #c20cb9; font-weight: bold;">less</span> acpid bash-completion <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vim</span> facter</pre></div></div>

<ul>
<li>Remove some unneeded packages</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">--purge</span> ppp pppoeconf pppoe pppconfig</pre></div></div>

<ul>
<li>Upgrade system</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade</pre></div></div>

<ul>
<li>Clean packages</li>
</ul>
<p>After installing packages, you&#8217;ll have some junk packages laying around in your cache. Since you don&#8217;t want your template to have those, this command will wipe them out.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">--purge</span> clean</pre></div></div>

<ul>
<li>Reconfigure your desired locales</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dpkg-reconfigure locales</pre></div></div>

<ul>
<li>Change timezone</li>
</ul>
<p>dpkg-reconfigure tzdata</p>
<ul>
<li>Disable all but one tty in <strong>/etc/inittab</strong> as in a VM you don&#8217;t usually need 6 tty working, even in real servers&#8230; <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Note that on most Debian systems tty7 is used by the X Window System,</span>
<span style="color: #666666; font-style: italic;"># so if you want to add more getty's go ahead but skip tty7 if you run X.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000;">1</span>:<span style="color: #000000;">2345</span>:respawn:<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>getty <span style="color: #000000;">38400</span> tty1
<span style="color: #666666; font-style: italic;">#2:23:respawn:/sbin/getty 38400 tty2</span>
<span style="color: #666666; font-style: italic;">#3:23:respawn:/sbin/getty 38400 tty3</span>
<span style="color: #666666; font-style: italic;">#4:23:respawn:/sbin/getty 38400 tty4</span>
<span style="color: #666666; font-style: italic;">#5:23:respawn:/sbin/getty 38400 tty5</span>
<span style="color: #666666; font-style: italic;">#6:23:respawn:/sbin/getty 38400 tty6</span></pre></div></div>

<ul>
<li>Disable sync() for syslog</li>
</ul>
<p>Turn off doing sync() on every write for syslog&#8217;s log files, to improve I/O performance:</p>

<div class="wp_syntax"><div class="code"><pre class="" style="font-family:monospace;">sed -i -e 's@\<span class="br0">&#40;</span><span class="br0">&#91;</span><span class="br0">&#91;</span>:space:<span class="br0">&#93;</span><span class="br0">&#93;</span>\<span class="br0">&#41;</span>\<span class="br0">&#40;</span>/var/log/\<span class="br0">&#41;</span>@\<span style="">1</span>-\<span style="">2</span>@' /etc/*syslog.conf</pre></div></div>

<ul>
<li>Copy your public key to the template (for passwordless ssh logins)</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ssh-copy-id root<span style="color: #000000; font-weight: bold;">@</span>IPADDRESS</pre></div></div>

<ul>
<li>Delete the udev rule related to your NIC</li>
</ul>
<p>This is important or when you clone your first VM you will see that it doesn&#8217;t have any NIC&#8230; This is caused by the rule /etc/udev/rules.d/70-persistent-net.rules as it has your current MAC configured on it. Cloned VM will have different MAC so this rule will fail and VM will not have any eth0 configured.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># This file was automatically generated by the /lib/udev/write_net_rules</span>
<span style="color: #666666; font-style: italic;"># program, run by the persistent-net-generator.rules rules file.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># You can modify it, as long as you keep each rule on a single</span>
<span style="color: #666666; font-style: italic;"># line, and change only the value of the NAME= key.</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># PCI device 0x1af4:0x1000 (virtio_net)</span>
<span style="color: #007800;">SUBSYSTEM</span>==<span style="color: #ff0000;">&quot;net&quot;</span>, <span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">DRIVERS</span>==<span style="color: #ff0000;">&quot;?*&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>address<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;&lt;strong&gt;52:54:00:18:d9:5f&lt;/strong&gt;&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>dev_id<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;0x0&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">type</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;1&quot;</span>, KERN
<span style="color: #007800;">EL</span>==<span style="color: #ff0000;">&quot;eth*&quot;</span>, <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;eth0&quot;</span></pre></div></div>

<p>It&#8217;s safe to delete it as a new file will be generated on boot time</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>udev<span style="color: #000000; font-weight: bold;">/</span>rules.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">70</span>-persistent-net.rules</pre></div></div>

<ul>
<li>Fix SSH host keys.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>ssh_host_<span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>This is only useful if you installed SSH. Each individual VM should have its own pair of SSH host keys. The code below will wipe out the existing SSH keys and instruct the newly-created VE to create new SSH keys on first boot.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&lt;&lt;</span> EOF <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>ssh_gen_host_keys
<span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;">### BEGIN INIT INFO</span>
<span style="color: #666666; font-style: italic;"># Provides:          Generates new ssh host keys on first boot</span>
<span style="color: #666666; font-style: italic;"># Required-Start:    $remote_fs $syslog</span>
<span style="color: #666666; font-style: italic;"># Required-Stop:     $remote_fs $syslog</span>
<span style="color: #666666; font-style: italic;"># Default-Start:     2 3 4 5</span>
<span style="color: #666666; font-style: italic;"># Default-Stop:</span>
<span style="color: #666666; font-style: italic;"># Short-Description: Generates new ssh host keys on first boot</span>
<span style="color: #666666; font-style: italic;"># Description:       Generates new ssh host keys on first boot</span>
<span style="color: #666666; font-style: italic;">### END INIT INFO</span>
<span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>ssh_host_rsa_key <span style="color: #660033;">-t</span> rsa <span style="color: #660033;">-N</span> <span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>ssh_host_dsa_key <span style="color: #660033;">-t</span> dsa <span style="color: #660033;">-N</span> <span style="color: #ff0000;">&quot;&quot;</span>
insserv <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>ssh_gen_host_keys
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> \<span style="color: #007800;">$0</span>
EOF</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> a+x <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>ssh_gen_host_keys
insserv <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>ssh_gen_host_keys</pre></div></div>

<p>Finally stop the VM make a backup and label it as a Template.</p>
<p>In next posts I am gonna configure all the cloned servers &#8220;automagically&#8221; using puppet.</p>
<p>Have a look to the <a title="Installing Puppet master and client in the same host. The Debian way" href="http://www.elsotanillo.net/2011/08/installing-puppet-master-and-client-in-the-same-host-the-debian-way/" target="_blank">Installing Puppet master and client in the same host. The Debian way</a> previous post for more info.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2011/08/debian-templates-disk-images-qemukvm-for-libvirt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Puppet master and client in the same host. The Debian way</title>
		<link>http://www.elsotanillo.net/2011/08/installing-puppet-master-and-client-in-the-same-host-the-debian-way/</link>
		<comments>http://www.elsotanillo.net/2011/08/installing-puppet-master-and-client-in-the-same-host-the-debian-way/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 15:48:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[installing puppet the debian way]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[puppet client]]></category>
		<category><![CDATA[puppet debian]]></category>
		<category><![CDATA[puppet master]]></category>
		<category><![CDATA[puppet master client in the same host]]></category>
		<category><![CDATA[puppet master client in the same server]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/?p=739</guid>
		<description><![CDATA[Since I started learning puppet several weeks ago I wanted to install the client and the server in the same host but using several aliases for the same machine. But there are several funny error related to puppet master and &#8230; <a href="http://www.elsotanillo.net/2011/08/installing-puppet-master-and-client-in-the-same-host-the-debian-way/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I started learning <a href="http://www.puppetlabs.com/" target="_blank">puppet</a> several weeks ago I wanted to install the client and the server in the same host but using several aliases for the same machine. But there are several funny error related to puppet master and client sharing the same ssl directory: <a href="http://bugs.debian.org/514550">SSL certificate confusion</a>, <a href="http://bugs.debian.org/573416">obscure errors</a>, and <a href="http://reductivelabs.com/redmine/issues/show/1525">SSL revocation horrors</a>.</p>
<p>I took the main ideas from <a href="http://madduck.net/blog/2010.03.11:splitting-puppetd-from-puppetmaster/" target="_blank">Splitting puppetd from puppetmaster</a> from <a href="http://madduck.net" target="_blank">madduck</a>&#8216;s blog. But using this method you don&#8217;t have to create 2 differents <strong>ssl</strong> directories. Both installations (client and server) will share the same directory. I think it&#8217;s easier to implement and maintain.</p>
<p>The golden rule is to create all the SSL stuff (CA, keys, certificates,etc) in the right moment. And you may ask&#8230; When is the right moment? After the file <strong>/etc/puppet/puppet.conf</strong> is created with the <strong>certname</strong> directive properly updated. As by default puppet create all the SSL stuff using the hostname instead of the alias you want.</p>
<p>This tutorial assume you are using Debian (but should work on its derivatives: Ubuntu, Mint, etc) and have one server with two aliases replying to the same host (via /etc/hosts or DNS) In my case: puppet (server) and mediacenter (client).</p>
<h1><span id="more-739"></span>Let&#8217;s have fun:</h1>
<ul>
<li>Install puppetmaster:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> puppetmaster</pre></div></div>

<ul>
<li>Stop puppetmaster:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>puppetmaster stop</pre></div></div>

<ul>
<li>kill <strong>puppet master</strong> processes</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>puppet<span style="color: #666666; font-style: italic;"># ps -ef|grep puppet</span>
puppet    <span style="color: #000000;">3610</span>     <span style="color: #000000;">1</span>  <span style="color: #000000;">0</span> 08:09 ?        00:00:01 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby1.8 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>puppet master <span style="color: #660033;">--masterport</span>=<span style="color: #000000;">8140</span>
root      <span style="color: #000000;">4053</span>  <span style="color: #000000;">3035</span>  <span style="color: #000000;">0</span> 08:<span style="color: #000000;">28</span> pts<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>    00:00:00 <span style="color: #c20cb9; font-weight: bold;">grep</span> puppet
<span style="color: #c20cb9; font-weight: bold;">kill</span> <span style="color: #000000;">3610</span></pre></div></div>

<ul>
<li>Remove ssl directory: (as it has the ssl data related to the hostname instead of the alias you want)</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>puppet<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<ul>
<li>create /etc/puppet/puppet.conf</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>main<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>master<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">certname</span>=puppet.vnet
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>agent<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">server</span>=puppet.vnet</pre></div></div>

<ul>
<li>Start puppetmaster:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>puppetmaster start</pre></div></div>

<ul>
<li>Check ssl logs on /var/log/daemon.log (ans check ssl directory and certificates have been created using puppet as server name)</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3758</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Signed certificate request <span style="color: #000000; font-weight: bold;">for</span> ca
mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3758</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Rebuilding inventory <span style="color: #c20cb9; font-weight: bold;">file</span>
mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3758</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: puppet.vnet has a waiting certificate request
mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3758</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Signed certificate request <span style="color: #000000; font-weight: bold;">for</span> puppet.vnet
mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3758</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Removing <span style="color: #c20cb9; font-weight: bold;">file</span> Puppet::SSL::CertificateRequest puppet.vnet at <span style="color: #ff0000;">'/etc/puppet/ssl/ca/requests/puppetmaster.vnet.pem'</span>
mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3758</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Removing <span style="color: #c20cb9; font-weight: bold;">file</span> Puppet::SSL::CertificateRequest puppet.vnet at <span style="color: #ff0000;">'/etc/puppet/ssl/certificate_requests/puppetmaster.vnet.pem'</span>
mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3815</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Reopening log files
mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3815</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Starting Puppet master version 2.7.1</pre></div></div>

<ul>
<li>Check ssl directory has been re-created on /etc/puppet:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>puppet<span style="color: #000000; font-weight: bold;">/</span>ssl</pre></div></div>

<ul>
<li>Install puppet client:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> puppet</pre></div></div>

<ul>
<li>Create a SSL certificate for <strong>mediacenter.vnet</strong>. In order for the two systems to communicate securely we need to create signed SSL certificates.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>puppet<span style="color: #666666; font-style: italic;"># puppetd --no-daemonize --onetime --verbose --waitforcert 30</span>
warning: peer certificate won<span style="color: #ff0000;">'t be verified in this SSL session
info: Creating a new SSL certificate request for mediacenter.vnet
info: Certificate Request fingerprint (md5): 93:7C:65:BD:77:39:2C:90:F3:15:99:D1:46:18:F1:40
warning: peer certificate won'</span>t be verified <span style="color: #000000; font-weight: bold;">in</span> this SSL session</pre></div></div>

<ul>
<li>Check all certificates:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>puppet<span style="color: #666666; font-style: italic;"># puppetca --list --all</span>
mediacenter.vnet <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">93</span>:7C:<span style="color: #000000;">65</span>:BD:<span style="color: #000000;">77</span>:<span style="color: #000000;">39</span>:2C:<span style="color: #000000;">90</span>:F3:<span style="color: #000000;">15</span>:<span style="color: #000000;">99</span>:D1:<span style="color: #000000;">46</span>:<span style="color: #000000;">18</span>:F1:<span style="color: #000000;">40</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
+ puppet.vnet <span style="color: #7a0874; font-weight: bold;">&#40;</span>7A:5B:E1:<span style="color: #000000;">42</span>:00:B3:C9:EE:<span style="color: #000000;">38</span>:<span style="color: #000000;">10</span>:<span style="color: #000000;">47</span>:9E:D2:ED:C2:8C<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<ul>
<li>Check pending certificates (to be signed by the server)</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>puppet<span style="color: #666666; font-style: italic;"># puppetca --list</span>
mediacenter.vnet</pre></div></div>

<ul>
<li>Sign mediacenter.vnet certificate</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>puppet<span style="color: #666666; font-style: italic;"># puppetca --sign mediacenter.vnet</span>
notice: Signed certificate request <span style="color: #000000; font-weight: bold;">for</span> mediacenter.vnet</pre></div></div>

<ul>
<li>Now all certificates are signed. <strong>Pay attention to the plus (+) symbol</strong></li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>mediacenter:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>puppet<span style="color: #666666; font-style: italic;"># puppetca --list --all</span>
+ mediacenter.vnet <span style="color: #7a0874; font-weight: bold;">&#40;</span>B3:<span style="color: #000000;">87</span>:0C:F5:05:00:<span style="color: #000000;">29</span>:<span style="color: #000000;">76</span>:07:B5:1C:D1:2B:DA:<span style="color: #000000;">20</span>:<span style="color: #000000;">12</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
+ puppet.vnet <span style="color: #7a0874; font-weight: bold;">&#40;</span>7A:5B:E1:<span style="color: #000000;">42</span>:00:B3:C9:EE:<span style="color: #000000;">38</span>:<span style="color: #000000;">10</span>:<span style="color: #000000;">47</span>:9E:D2:ED:C2:8C<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<ul>
<li>At this moment some test can be performed. from: <a href="http://www.howtoforge.com/installing_puppet_on_ubuntu" rel="nofollow">Installing Puppet On Ubuntu</a>.</li>
</ul>
<ul>
<li>Create the file /etc/puppet/manifests/site.pp</li>
</ul>
<ol>
<li>Create &#8220;/tmp/testfile&#8221; if it doesn&#8217;t exist.</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">class test_class <span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> <span style="color: #ff0000;">&quot;/tmp/testfile&quot;</span>:
      ensure =<span style="color: #000000; font-weight: bold;">&gt;</span> present,
      mode   =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">644</span>,
      owner  =<span style="color: #000000; font-weight: bold;">&gt;</span> root,
      group  =<span style="color: #000000; font-weight: bold;">&gt;</span> root
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># tell puppet on which client to run the class</span>
node mediacenter <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    include test_class
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<ul>
<li>On the client run puppetd in verbose mode (-v) and only once (-o).</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">puppetd <span style="color: #660033;">-v</span> <span style="color: #660033;">-o</span></pre></div></div>

<ul>
<li>Then you will see in the logs the following:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mediacenter puppet-master<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">4620</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Compiled catalog <span style="color: #000000; font-weight: bold;">for</span> mediacenter.vnet <span style="color: #000000; font-weight: bold;">in</span> environment production <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0.02</span> seconds
mediacenter puppet-agent<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">5271</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Caching catalog <span style="color: #000000; font-weight: bold;">for</span> mediacenter.vnet
mediacenter puppet-agent<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">5271</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Applying configuration version <span style="color: #ff0000;">'1313132026'</span>
mediacenter puppet-agent<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">5271</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>Stage<span style="color: #7a0874; font-weight: bold;">&#91;</span>main<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #000000; font-weight: bold;">/</span>Test_class<span style="color: #000000; font-weight: bold;">/</span>File<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>testfile<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #000000; font-weight: bold;">/</span>ensure<span style="color: #7a0874; font-weight: bold;">&#41;</span> created
mediacenter puppet-agent<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">5271</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Finished catalog run <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0.06</span> seconds</pre></div></div>

<ul>
<li>Check is the file has been created:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>testfile
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">0</span> ago <span style="color: #000000;">13</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">53</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>testfile</pre></div></div>

<ul>
<li>Now that all is running OK, configure the puppet agent to start on boot by modifying /etc/default/puppet</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Defaults for puppet - sourced by /etc/init.d/puppet</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Start puppet on boot?</span>
<span style="color: #007800;">START</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Startup options</span>
<span style="color: #007800;">DAEMON_OPTS</span>=<span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<ul>
<li>Start puppet client</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>puppet start</pre></div></div>

<p>Now, you can start playing with puppet master and client in the same host. <strong>Have fun!</strong></p>
<p>Special thanks to <a href="http://madduck.net" target="_blank">madduck</a> for sharing his time and knowledge!.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2011/08/installing-puppet-master-and-client-in-the-same-host-the-debian-way/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Migration from Joomla to WordPress succesfully done!</title>
		<link>http://www.elsotanillo.net/2011/08/migration-from-joomla-to-wordpress-succesfully-done/</link>
		<comments>http://www.elsotanillo.net/2011/08/migration-from-joomla-to-wordpress-succesfully-done/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 14:32:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[joomla2wordpress]]></category>
		<category><![CDATA[Mambo importer]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/?p=722</guid>
		<description><![CDATA[Last week I finally finished the migration from my old 1.0.15 Joomla installation to the new shiny 3.2.1 WordPress. I had in mind to migrate to the new 1.5.X Joomla series but there was not an easy one-click upgrade tool as &#8230; <a href="http://www.elsotanillo.net/2011/08/migration-from-joomla-to-wordpress-succesfully-done/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last week I finally finished the migration from my old 1.0.15 Joomla installation to the new shiny 3.2.1 WordPress. I had in mind to migrate to the new 1.5.X Joomla series but there was not an easy one-click upgrade tool as there was so many core differences between version and some manual work had to be done. That was the reason to study other options.</p>
<p>Finally I decided to move on with WordPress and with the help of <a title="Misterpah" href="http://misterpah.com/" rel="home">Misterpah</a>&#8216;s <a title="Mambo Importer" href="http://misterpah.com/scripts/import-mambo-into-wordpress/" target="_blank"><strong>Mambo Importer</strong></a> plug-in at least half of the work was already done. <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Although some manual work has to be done (recreating path&#8217;s, images, etc) <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Special thanks to <a title="Misterpah" href="http://misterpah.com/" rel="home">Misterpah</a> for sharing his knowledge and time!</p>
<p>P.S.: Starting from today all (or at least almost) news posts/pages will be written in English.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2011/08/migration-from-joomla-to-wordpress-succesfully-done/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thai Yoga Massage advanced course</title>
		<link>http://www.elsotanillo.net/2011/07/thai-yoga-massage-advanced-course/</link>
		<comments>http://www.elsotanillo.net/2011/07/thai-yoga-massage-advanced-course/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 20:09:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Thai Yoga Massage]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/?p=779</guid>
		<description><![CDATA[Finally after one cancellation I assisted to the Thai Yoga Massage advanced course (Energetic Lines) in Murcia. One week doing Yoga, meditation,enjoying Jose&#8217;s vegetarian food, learning and practicing. And a very important thing: One week without computers. And&#8230; of course &#8230; <a href="http://www.elsotanillo.net/2011/07/thai-yoga-massage-advanced-course/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Finally after one cancellation I assisted to the <a title="Thai Yoga Massage advanced course (Energetic Lines) in Murcia" href="http://www.emchi.net/site/sun136761/hau521923244.asp?osLang=2" target="_blank">Thai Yoga Massage advanced course (Energetic Lines) in Murcia.</a></p>
<p><span id="more-779"></span></p>
<p>One week doing Yoga, meditation,enjoying Jose&#8217;s vegetarian food, learning and practicing. And a very important thing: One week without computers.</p>
<p>And&#8230; of course I got my diploma <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="mceTemp" style="text-align: center;">
<dl id="attachment_781" class="wp-caption alignnone" style="width: 2058px;">
<dt class="wp-caption-dt"><a href="http://www.elsotanillo.net/wp-content/uploads/CIMG1106.jpg"><img class="size-full wp-image-781" title="Foto con el titulo del Curso avanzado de masaje Thailandés (Lineas energeticas) con Choenzom" src="http://www.elsotanillo.net/wp-content/uploads/CIMG1106.jpg" alt="Foto con el titulo del Curso avanzado de masaje Thailandés (Lineas energeticas) con Choenzom" width="2048" height="1536" /></a>Picture with Choenzom (my teacher)</dt>
</dl>
</div>
<p>&nbsp;</p>
<div class="mceTemp" style="text-align: center;">
<dl id="attachment_780" class="wp-caption alignnone" style="width: 1546px;">
<dt class="wp-caption-dt"><a href="http://www.elsotanillo.net/wp-content/uploads/CIMG1107.jpg"><img class="size-full wp-image-780" title="Foto con el titulo del Curso avanzado de masaje Thailandés (Lineas energeticas) con Jose" src="http://www.elsotanillo.net/wp-content/uploads/CIMG1107.jpg" alt="Foto con el titulo del Curso avanzado de masaje Thailandés (Lineas energeticas) con Jose" width="1536" height="2048" /></a>Picture with Jose (the cook)</dt>
</dl>
</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2011/07/thai-yoga-massage-advanced-course/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo Convertir archivos audio a mp3</title>
		<link>http://www.elsotanillo.net/2009/02/howto-convertir-archivos-audio-a-mp3-2/</link>
		<comments>http://www.elsotanillo.net/2009/02/howto-convertir-archivos-audio-a-mp3-2/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 03:46:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[HowTo Convertir archivos audio a mp3]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[m4a2mp3]]></category>
		<category><![CDATA[m4atomp3]]></category>
		<category><![CDATA[ogg2mp3]]></category>
		<category><![CDATA[oggtomp3]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/wp/?p=515</guid>
		<description><![CDATA[Algunas veces tienes que pasar música a tu mp3 portátil y esa música esta en formato ogg, m4a, etc. Pásala a mp3 sin ningún esfuerzo. El comando a usar es el ffmpeg y según los parámetros lo podremos usar para &#8230; <a href="http://www.elsotanillo.net/2009/02/howto-convertir-archivos-audio-a-mp3-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Algunas veces tienes que pasar música a tu mp3 portátil y esa música esta en formato ogg, m4a, etc. Pásala a mp3 sin ningún esfuerzo.<br />
<span id="more-515"></span></p>
<p>El comando a usar es el ffmpeg y según los parámetros lo podremos usar para convertir de unos ficheros a otros:</p>
<ul>
<li>Convertir ogg a mp3 (<strong>ogg2mp3/oggtomp3</strong>)</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> nombre.ogg nombre.mp3</pre></div></div>

<ul>
<li>Convertir m4a a mp3 (<strong>m4a2mp3/m4atomp3</strong>)</li>
</ul>
<p><strong>ffmpeg -i nombre.m4a nombre.mp3</strong></p>
<p>Si queremos convertir todos los ficheros que hay en un directorio podremos usar el siguiente script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span> ; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$i</span> <span style="color: #007800;">$i</span>.mp3 ; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>Luego para normalizar el nombre usaremos el comando rename:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rename <span style="color: #ff0000;">'s/.m4a//'</span> <span style="color: #000000; font-weight: bold;">*</span>.m4a.mp3</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2009/02/howto-convertir-archivos-audio-a-mp3-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Como instruir a SpamAssasin en Alojamientos basados en cPanel</title>
		<link>http://www.elsotanillo.net/2008/11/como-instruir-a-spamassasin-en-alojamientos-basados-en-cpanel-2/</link>
		<comments>http://www.elsotanillo.net/2008/11/como-instruir-a-spamassasin-en-alojamientos-basados-en-cpanel-2/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 13:01:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/wp/?p=514</guid>
		<description><![CDATA[Leyendo los foros de mi proveedor de alojamiento www.bluehost.com encontré un hilo muy interesante sobre como instruir SpamAssassin y después de darle unas cuantas vueltas hice este script para añadir la funcionalidad de que SpamAssasin aprenda de las preferencias de &#8230; <a href="http://www.elsotanillo.net/2008/11/como-instruir-a-spamassasin-en-alojamientos-basados-en-cpanel-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Leyendo los foros de mi proveedor de alojamiento <a title="www.bluehost.com" href="http://www.bluehost.com/track/elsotani/CODE22" target="_blank">www.bluehost.com</a> encontré un hilo muy interesante sobre <a title="como instruir SpamAssassin" href="http://www.bluehostforum.com/showthread.php?t=20&amp;page=3">como instruir SpamAssassin</a> y después de darle unas cuantas vueltas hice este script para añadir la funcionalidad de que <a title="spamassassin" href="http://spamassassin.apache.org/" target="_blank">SpamAssasin</a> aprenda de las preferencias de lo que los usuarios han marcado como <strong>SPAM</strong> o <strong>NO SPAM</strong>.</p>
<p>Esto significa que con un solo script se añade la funcionalidad de<strong> &#8220;Marcar como Spam&#8221;</strong>  o bien <strong>&#8220;No es Spam&#8221;</strong>  que tienen algunos de los mas famosos webmails gratuitos Gmail, Yahoo, etc . Y por supuesto que <a title="spamassassin" href="http://spamassassin.apache.org/" target="_blank">SpamAssasin</a> aprenda de ello  para todas las cuentas de todos los dominios que tengamos alojados. Eso si, siempre que la empresa de alojamiento este basada en <a title="www.cpanel.net" href="http://www.cpanel.net" target="_blank">cPanel</a>.</p>
<p><span id="more-514"></span></p>
<p>El script lo hice en la lengua de <a title="Benny Hill" href="http://es.wikipedia.org/wiki/Benny_Hill" target="_blank">Benny Hill</a> pero es auto explicativo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;"># InstruirSpamAssassin.sh</span>
<span style="color: #666666; font-style: italic;"># TEACH YOUR SPAMASSASSIN script for cpanel (www.bluehost.com in this case) hosting accounts</span>
<span style="color: #666666; font-style: italic;"># This script teach your SPAMASSASIN daemon with HAM and SPAMUNCAUGTH from all the emails accounts of all your domains</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#&quot;THE BEER-WARE LICENSE&quot; (Revision 42):</span>
<span style="color: #666666; font-style: italic;">#Juan Sierra Pons wrote this file. As long as you retain this notice you</span>
<span style="color: #666666; font-style: italic;">#can do whatever you want with this stuff. If we meet some day, and you</span>
<span style="color: #666666; font-style: italic;">#think this stuff is worth it, you can buy me a beer in return.</span>
<span style="color: #666666; font-style: italic;">#Juan Sierra Pons - juan [at} elsotanillo {dot] net</span>
<span style="color: #666666; font-style: italic;">#http://www.elsotanillo.net/</span>
<span style="color: #666666; font-style: italic;">#Original beerware license is due to Poul-Henning Kamp.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#SPAMASSASSIN CONFIGURATION</span>
<span style="color: #666666; font-style: italic;">#1.- Turn On Spamassasin: cPanel-&amp;gt;Email Manager-&amp;gt;Spam Assassin-&amp;gt; &quot;Enable Spam Assassin&quot;</span>
<span style="color: #666666; font-style: italic;">#2.- Turn on Bayes (auto learning for SA) &quot;Configure Spam Assassin&quot; -&amp;gt; check the box for &quot;use-bayes&quot;.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#HOW TO SET UP USERS' EMAIL ACCOUNT</span>
<span style="color: #666666; font-style: italic;">#### always use the same name for HAM and UnCaughtSpam for all yours users</span>
<span style="color: #666666; font-style: italic;"># 1.- Create one folder for SPAMHAM</span>
<span style="color: #666666; font-style: italic;"># 2.- Create one folder for SPAMUNCAUGTH</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#USERS' INSTRUCTIONS</span>
<span style="color: #666666; font-style: italic;"># 1.- Move all your UnCaughtSpam messages to your UnCaughtSpam folder</span>
<span style="color: #666666; font-style: italic;"># 2.- Move all your HAM messages to your HAM folder</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#HOW TO USE THIS SCRIPT:</span>
<span style="color: #666666; font-style: italic;"># 1.- Fill the LOGIN variable</span>
<span style="color: #666666; font-style: italic;"># 2.- Fill the SPAMHAMDIRECTORY variable</span>
<span style="color: #666666; font-style: italic;"># 3.- Fill the SPAMUNCAUGTH variable</span>
<span style="color: #666666; font-style: italic;"># 4.- Run this script using the crontab daemon once a day for example</span>
<span style="color: #666666; font-style: italic;"># 5.- After you check all is running ok for you, you can comment LOGSALEARN and LOGDEBUG lines</span>
&nbsp;
<span style="color: #666666; font-style: italic;">########################## Variables ###########################</span>
<span style="color: #007800;">LOGIN</span>=<span style="color: #ff0000;">&quot;logincpanel&quot;</span>
<span style="color: #007800;">SPAMHAMDIRECTORY</span>=<span style="color: #ff0000;">&quot;SpamHam&quot;</span>
<span style="color: #007800;">SPAMUNCAUGTH</span>=<span style="color: #ff0000;">&quot;SpamNoCogido&quot;</span>
<span style="color: #666666; font-style: italic;">### uncoment next line if you want to run sa-learn in verbose mode</span>
<span style="color: #666666; font-style: italic;">#LOGSALEARN=&quot;-D&quot;</span>
<span style="color: #666666; font-style: italic;">### LOGDEBUG=0 if you wan to see which accounts are being checked - only for debugging pourposes</span>
<span style="color: #007800;">LOGDEBUG</span>=<span style="color: #000000;">0</span>
<span style="color: #666666; font-style: italic;">### MOVESPAMHAMMESSAGES=0 if you want to move SPAMHAM messages to each INBOX directory after teach your spamassasin</span>
<span style="color: #007800;">MOVESPAMHAMMESSAGES</span>=<span style="color: #000000;">1</span>
<span style="color: #666666; font-style: italic;">### CLEANSPAMUNCAUGTHMESSAGES=0 if you want clean SPAMUNCAUGTH directory after teach your spamassassin</span>
<span style="color: #007800;">CLEANSPAMUNCAUGTHMESSAGES</span>=<span style="color: #000000;">1</span>
<span style="color: #666666; font-style: italic;">################################################## ##############</span>
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$LOGIN</span><span style="color: #000000; font-weight: bold;">/</span>mail<span style="color: #000000; font-weight: bold;">/*/*</span>
<span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #666666; font-style: italic;">##### Teach SpamAssassin with HAM messages from SPAMHAM directory</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$LOGDEBUG</span> = <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ;<span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> ===== Checking <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMHAMDIRECTORY</span> ========================== ; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMHAMDIRECTORY</span><span style="color: #000000; font-weight: bold;">/</span>new; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">19</span> sa-learn <span style="color: #007800;">$LOGSALEARN</span> <span style="color: #660033;">--ham</span> <span style="color: #660033;">--dir</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMHAMDIRECTORY</span><span style="color: #000000; font-weight: bold;">/</span>new; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMHAMDIRECTORY</span><span style="color: #000000; font-weight: bold;">/</span>cur; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">19</span> sa-learn <span style="color: #007800;">$LOGSALEARN</span> <span style="color: #660033;">--ham</span> <span style="color: #660033;">--dir</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMHAMDIRECTORY</span><span style="color: #000000; font-weight: bold;">/</span>cur; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #666666; font-style: italic;">##### move SPAMHAM messages to each INBOX directory</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$MOVESPAMHAMMESSAGES</span> = <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMHAMDIRECTORY</span><span style="color: #000000; font-weight: bold;">/</span>new<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>new ;<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMHAMDIRECTORY</span><span style="color: #000000; font-weight: bold;">/</span>cur<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>cur
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #666666; font-style: italic;">##### Teach SpamAssassin from SPAMUNCAUGTH directory</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$LOGDEBUG</span> = <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ;<span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> ===== Checking <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMUNCAUGTH</span> ========================== ; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMUNCAUGTH</span><span style="color: #000000; font-weight: bold;">/</span>new; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">19</span> sa-learn <span style="color: #007800;">$LOGSALEARN</span> <span style="color: #660033;">--spam</span> <span style="color: #660033;">--dir</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMUNCAUGTH</span><span style="color: #000000; font-weight: bold;">/</span>new; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMUNCAUGTH</span><span style="color: #000000; font-weight: bold;">/</span>cur; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">19</span> sa-learn <span style="color: #007800;">$LOGSALEARN</span> <span style="color: #660033;">--spam</span> <span style="color: #660033;">--dir</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMUNCAUGTH</span><span style="color: #000000; font-weight: bold;">/</span>cur; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #666666; font-style: italic;">##### Clean SPAMUNCAUGTH directory</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$CLEANSPAMUNCAUGTHMESSAGES</span> = <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMUNCAUGTH</span><span style="color: #000000; font-weight: bold;">/</span>new<span style="color: #000000; font-weight: bold;">/*</span>;<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #007800;">$SPAMUNCAUGTH</span><span style="color: #000000; font-weight: bold;">/</span>cur<span style="color: #000000; font-weight: bold;">/*</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>Si el LOGDEBUG esta activado, el script devolvera algo asi:</p>
<p><em>===== Checking /home/bluehostlogin/mail/elsotanillo.net/user1/.SpamHam ==========================<br />
===== Checking /home/bluehostlogin/mail/elsotanillo.net/user1/.SpamNoCogido ==========================<br />
===== Checking /home/bluehostlogin/mail/elsotanillo.net/user2/.SpamHam ==========================<br />
Learned tokens from 0 message(s) (0 message(s) examined)<br />
Learned tokens from 0 message(s) (0 message(s) examined)<br />
===== Checking /home/bluehostlogin/mail/elsotanillo.net/user2/.SpamNoCogido ==========================<br />
Learned tokens from 0 message(s) (0 message(s) examined)<br />
Learned tokens from 3 message(s) (3 message(s) examined)<br />
===== Checking /home/bluehostlogin/mail/elsotanillo.net/user3/.SpamHam ==========================<br />
===== Checking /home/bluehostlogin/mail/elsotanillo.net/user3/.SpamNoCogido ==========================<br />
===== Checking /home/bluehostlogin/mail/elsotanillo.net/user4/.SpamHam ==========================<br />
===== Checking /home/bluehostlogin/mail/elsotanillo.net/user4/.SpamNoCogido ==========================<br />
===== Checking /home/bluehostlogin/mail/the10thfloor.net/user1/.SpamHam ==========================<br />
===== Checking /home/bluehostlogin/mail/the10thfloor.net/user1/.SpamNoCogido ==========================</em></p>
<p>Una vez que este todo funcionando ya puedes desactivar el modo DEBUG.</p>
<p>Recuerda el tipo de licencia! <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2008/11/como-instruir-a-spamassasin-en-alojamientos-basados-en-cpanel-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cartel domestico para sala de fumadores.</title>
		<link>http://www.elsotanillo.net/2008/11/cartel-domestico-para-sala-de-fumadores-2/</link>
		<comments>http://www.elsotanillo.net/2008/11/cartel-domestico-para-sala-de-fumadores-2/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 14:29:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Cartel domestico para sala de fumadores]]></category>

		<guid isPermaLink="false">http://www.elsotanillo.net/wp/?p=523</guid>
		<description><![CDATA[Cartel domestico para sala de fumadores o como evitar tener que responder a la pregunta: ¿Te importa que fume? Cuando hice la fiesta de inauguración de la casa prepare un cartel. Se puede poner en la puerta de la galería &#8230; <a href="http://www.elsotanillo.net/2008/11/cartel-domestico-para-sala-de-fumadores-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Cartel domestico para sala de fumadores o como evitar tener que responder a la pregunta:</p>
<p><strong>¿Te importa que fume?</strong></p>
<p><span id="more-523"></span></p>
<p>Cuando hice la fiesta de inauguración de la casa prepare un cartel. Se puede poner en la puerta de la galería o del balcón y por ahora tiene un 100% de efectividad.  <img src='http://www.elsotanillo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>El modelo del cartel lo saque de <a title="www.openclipart.org" href="http://www.openclipart.org" target="_blank">www.openclipart.org</a> un fantástico repositorio de imágenes y editandolo un poco  con <a title="www.inkscape.org" href="http://www.inkscape.org/" target="_blank">inkscape</a> quedo algo así:</p>
<div id="attachment_575" class="wp-caption alignnone" style="width: 310px"><a href="http://www.elsotanillo.net/wp/wp-content/uploads/CartelDomesticoParaSalaDeFumadores.png"><img class="size-medium wp-image-575 " title="Cartel Domestico Para Sala De Fumadores" src="http://www.elsotanillo.net/wp/wp-content/uploads/CartelDomesticoParaSalaDeFumadores-300x198.png" alt="Cartel Domestico Para Sala De Fumadores" width="300" height="198" /></a><p class="wp-caption-text">Cartel domestico para sala de fumadores.</p></div>
<ul>
<li><a href="http://www.elsotanillo.net/wp-content/uploads/CartelDomesticoParaSalaDeFumadores.pdf">Cartel Domestico Para Sala De Fumadores en formato PDF</a></li>
<li><a href="http://www.elsotanillo.net/wp-content/uploads/CartelDomesticoParaSalaDeFumadores.svg_.zip">Cartel Domestico Para Sala De Fumadores en formato editable SVG.</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.elsotanillo.net/2008/11/cartel-domestico-para-sala-de-fumadores-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

