<?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>fabiolagana.net &#187; Fabio Laganà</title>
	<atom:link href="http://blog.fabiolagana.net/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fabiolagana.net</link>
	<description>640 Kb should be enough memory for anybody</description>
	<lastBuildDate>Mon, 26 Oct 2009 13:17:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spamhaus droplist</title>
		<link>http://blog.fabiolagana.net/spamhaus-droplist/</link>
		<comments>http://blog.fabiolagana.net/spamhaus-droplist/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 07:55:39 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[droplist]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamhaus]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=148</guid>
		<description><![CDATA[


&#160;Powered by Max Banner Ads&#160;
#!/bin/bash
&#160;
#Script to add firewall rules to a linux system to completely block
#all traffic to and from networks in the spamhaus drop list.
&#160;
#Copyright 2009, William Stearns, wstearns@pobox.com
#Released under the GPL.  This and other tools can be found at
#http://www.stearns.org/
&#160;
#Sole (optional) command line parameter is the file location of the
#drop list, such as:
&#160;
#cd [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p1482"><td class="code" id="p148code2"><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;">#Script to add firewall rules to a linux system to completely block</span>
<span style="color: #666666; font-style: italic;">#all traffic to and from networks in the spamhaus drop list.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Copyright 2009, William Stearns, wstearns@pobox.com</span>
<span style="color: #666666; font-style: italic;">#Released under the GPL.  This and other tools can be found at</span>
<span style="color: #666666; font-style: italic;">#http://www.stearns.org/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Sole (optional) command line parameter is the file location of the</span>
<span style="color: #666666; font-style: italic;">#drop list, such as:</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#cd /var/lib/</span>
<span style="color: #666666; font-style: italic;">#wget http://www.spamhaus.org/drop/drop.lasso</span>
<span style="color: #666666; font-style: italic;"># ./spamhaus-drop /var/lib/drop.lasso</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#While the DROP file should be regularly updated, this should</span>
<span style="color: #666666; font-style: italic;">#probably be about once per day or less frequently; do _not_</span>
<span style="color: #666666; font-style: italic;">#download DROP more than once an hour.</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">DropList</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #007800;">DropList</span>=<span style="color: #ff0000;">&quot;./drop.lasso&quot;</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;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DropList</span>&quot;</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;Unable to find drop list file <span style="color: #007800;">$DropList</span> .  Perhaps do:&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>2
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;wget http://www.spamhaus.org/drop/drop.lasso -O <span style="color: #007800;">$DropList</span>&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;exiting.&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>2
	<span style="color: #7a0874; font-weight: bold;">exit</span> 1
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <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;Missing iptables command line tool, exiting.&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>2
	<span style="color: #7a0874; font-weight: bold;">exit</span> 1
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DropList</span>&quot;</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/;.*//'</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #ff0000;">'^ *$'</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> OneNetBlock ; <span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> INPUT <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> OUTPUT <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> FORWARD <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> FORWARD <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/spamhaus-droplist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eseguire il backup delle directory di un server</title>
		<link>http://blog.fabiolagana.net/eseguire-backup-directory-server/</link>
		<comments>http://blog.fabiolagana.net/eseguire-backup-directory-server/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 08:01:22 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[ip]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=129</guid>
		<description><![CDATA[nome script: /usr/local/sbin/backup_dir.sh

descrizione: Con questo script viene fatto il backup delle directory importanti server

Inserendo una riga simile nel cron scheduliamo il backup tutte le notti]]></description>
			<content:encoded><![CDATA[<p>nome script: /usr/local/sbin/backup_dir.sh</p>
<p>descrizione: Con questo script viene fatto il backup delle directory importanti  server</p>
<p>Inserendo una riga simile nel cron scheduliamo il backup tutte le notti</p>
<pre id="area">cat /etc/cron.d/backup
MAILTO="postmaster@yourdomain.com"
00 21 * * * root test -x /usr/local/sbin/backup_dir.sh &#038;&#038; /usr/local/sbin/backup_dir.sh</pre>

<div class="wp_codebox"><table><tr id="p1293"><td class="code" id="p129code3"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># backup_dir.sh</span>
<span style="color: #666666; font-style: italic;"># Con questo script viene fatto il backup delle directory importanti  server</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #007800;">hosts_internal</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> your_host <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> host <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${hosts_internal[@]}</span>
<span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Download of /etc/ /usr/local/sbin/ /root/ /home/ directory from &quot;</span><span style="color: #007800;">$host</span><span style="color: #ff0000;">&quot; &quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Starting ------&gt;&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">date</span>
  <span style="color: #666666; font-style: italic;"># bakup file for hosts</span>
  <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zcvf</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span> ;
  <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span>;
  <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Stopping ------&gt;&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">date</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/eseguire-backup-directory-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Count domain in mail.log (Qmail)</title>
		<link>http://blog.fabiolagana.net/count-domain-maillog-qmail/</link>
		<comments>http://blog.fabiolagana.net/count-domain-maillog-qmail/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 05:34:56 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Mailserver]]></category>
		<category><![CDATA[Qmail]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[mail.log]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=116</guid>
		<description><![CDATA[
# cat /usr/local/sbin/count_mail_per_domain.sh
#!/bin/bash
logfile=$2
domain=$3
&#160;
case &#34;$1&#34; in
        -t&#41;
	cat $logfile &#124;grep &#34;to remote&#34; &#124; awk '{print $14}'
					&#124; awk -F@ '{ field = $2 }; {print &#34;domain: &#34; field }'
					&#124; sort &#124;uniq -c &#124;sort -nr
					&#124; awk -v totale=0 '{totale=totale+$1; print ;} END {print &#34;Totale giorno domini: &#34;totale;}'
      [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p1165"><td class="code" id="p116code5"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cat /usr/local/sbin/count_mail_per_domain.sh</span>
<span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #007800;">logfile</span>=$2
<span style="color: #007800;">domain</span>=$3
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
        -t<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$logfile</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;to remote&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $14}'</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F<span style="color: #000000; font-weight: bold;">@</span> <span style="color: #ff0000;">'{ field = $2 }; {print &quot;domain: &quot; field }'</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-nr</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-v</span> <span style="color: #007800;">totale</span>=<span style="color: #000000;">0</span> <span style="color: #ff0000;">'{totale=totale+$1; print ;} END {print &quot;Totale giorno domini: &quot;totale;}'</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
        -su<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$logfile</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;to remote&quot;</span>  <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$domain</span>&quot;</span>
					<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">' { field = $14 }; {print &quot;to remote: &quot; field }'</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> -c<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-nr</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-v</span> <span style="color: #007800;">totale</span>=<span style="color: #000000;">0</span> <span style="color: #ff0000;">'{totale=totale+$1; print ;} END {print &quot;Totale giorno domini per utente: &quot;totale;}'</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
	-s<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$logfile</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;to remote&quot;</span>  <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$domain</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $14}'</span>
                                        <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F<span style="color: #000000; font-weight: bold;">@</span> <span style="color: #ff0000;">'{ field = $2 }; {print &quot;to remote domain: &quot; field }'</span>
                                        <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> -c<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-nr</span>
                                        <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-v</span> <span style="color: #007800;">totale</span>=<span style="color: #000000;">0</span> <span style="color: #ff0000;">'{totale=totale+$1; print ;} END {print &quot;Totale giorno domini: &quot;totale;}'</span>
&nbsp;
         <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
            <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: $0 { -t /var/log/mail.log.0 }  for print total mail for domain &quot;</span>
            <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: $0 { -su /var/log/mail.log.0 domain.com } for print total mail for single domain per user&quot;</span>
            <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: $0 { -s /var/log/mail.log.0 domain.com } for print total mail for single domain&quot;</span>
            <span style="color: #7a0874; font-weight: bold;">exit</span> 1
&nbsp;
<span style="color: #000000; font-weight: bold;">esac</span></pre></td></tr></table></div>

<p>for more tips visit <a title="qmail relay to smarthost" href="http://www.nixtips.net/qmail-relay-to-smarthost/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.nixtips.net/qmail-relay-to-smarthost/?referer=');">qmail relay to smarthost</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/count-domain-maillog-qmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add and Remove ip alias into OpenBSD System</title>
		<link>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/</link>
		<comments>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 08:26:42 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[remove]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=111</guid>
		<description><![CDATA[
Set an IP Alias
To put a second IP address to the same interface, just enter on the commandline as root:
 OpenBSD# ifconfig re0 inet alias 192.168.10.199 netmask 255.255.255.0
This sets an IP address 192.168.10.199 to vr0. Check again with ifconfig:
 OpenBSD# ifconfig -A
 lo0: flags=8049 mtu 33208
         groups: [...]]]></description>
			<content:encoded><![CDATA[<p><a name="D02"></a></p>
<h2><a name="D02">Set an IP Alias</a></h2>
<p>To put a second IP address to the same interface, just enter on the commandline as root:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig re0 inet alias 192.168.10.199 netmask 255.255.255.0</strong></pre>
<p>This sets an IP address <strong>192.168.10.199</strong> to <tt>vr0</tt>. Check again with ifconfig:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig -A</strong>
 lo0: flags=8049 mtu 33208
         groups: lo
         inet 127.0.0.1 netmask 0xff000000
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
 re0: flags=8843 mtu 1500
         lladdr 00:40:45:28:89:37
         groups: egress
         media: Ethernet autoselect (100baseTX full-duplex)
         status: active
         inet <strong>192.168.1.199</strong> netmask 0xffffff00 broadcast 192.168.1.255
         inet6 fe80::240:45ff:fe28:8937%vr0 prefixlen 64 scopeid 0x2
         inet <strong>192.168.10.199</strong> netmask 0xffffff00 broadcast 192.168.100.255</pre>
<p>Now we see two IP addresses on <tt>vr0</tt>. If you want to set an IP address within the same network you would have to set a fake netmask of <strong>255.255.255.255</strong>.<a name="C03"> </a><a name="D03"></a></p>
<h2><a name="D03">Make the IP Alias Permanent</a></h2>
<p>If you use <tt>ifconfig</tt> to set an IP alias, the alias won&#8217;t be present after the next reboot. To make the setting permanent, add a line to <tt>/etc/hostname.<em>&lt;INTERFACE&gt;</em></tt>:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>vi /etc/hostname.vr0</strong>
 inet 192.168.1.199 255.255.255.0 NONE
         <strong>inet alias 192.168.10.199 255.255.255.0</strong></pre>
<p><a name="C04"></a></p>
<h2><a name="C04">Remove an IP Alias</a></h2>
<p>You can remove an IP alias with a comand like this:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig re0 192.168.10.199 delete</strong></pre>
<p>This deletes the second IP address from the interface keeping the first.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCon 2008</title>
		<link>http://blog.fabiolagana.net/opencon-2008/</link>
		<comments>http://blog.fabiolagana.net/opencon-2008/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 01:56:11 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[bsd]]></category>
		<category><![CDATA[OpenCon 2008]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=109</guid>
		<description><![CDATA[

Day 1 &#8211; 29 November



.
Conference




09:30am
Registration


10:15am
OpenBEER/BSD Team Welcome
OpenBEER/BSD staff


.


11:15am
The OpenBSD Foundation
Ken Westerback 


.


12:00pm
Lunch


02:00pm
OpenBSD Network Stack Internals
Claudio Jeker


.


03:00pm
Mediawiki Installation on Your OpenBSD Machine
Enrico Cherubini


03:45pm
Break


04:30pm
How to Manage Large-Scale OpenBSD Installations
Felix Kronlage


05:30pm
Stupid Tricks with Install Scripts
Ken Westerback 


06:00pm
RELAX TIME


07:30pm
OpenCON/BSD Party


Day 2 &#8211;  30 November



.
Conference




09:00am
Registration


.


10:00am
Porting TeX Live to OpenBSD
Edd Barrett


11:00am
Routine using RIPd
Enrico Cherubini


11:45am
Lunch


02:00pm
1 Ox or a Thousand Chickens Parallelism [...]]]></description>
			<content:encoded><![CDATA[<table class="timetable" border="0" cellspacing="0">
<caption>
<h2>Day 1 &#8211; 29 November<sup><a style="text-decoration: none;" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/help?referer=');window.open(this.href, 'Time Table Help', 'height=500,width=400,resizable=yes,scrollbars=yes').focus(); return false;" name="help" href="http://2008.opencon.org/2008/schedule/help" target="_new"><img title="help" src="http://2008.opencon.org/media/img/admin/icon-unknown.gif" alt="help" /></a></sup></h2>
</caption>
<thead>
<tr>
<th class="room"><span class="hidden">.</span></th>
<th class="room">Conference</th>
</tr>
</thead>
<tbody>
<tr>
<td class="time">09:30am</td>
<td id="E012" class="break"><a id="TT12" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/12/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/12/?referer=');">Registration</a></td>
</tr>
<tr>
<td class="time" rowspan="2">10:15am</td>
<td id="E001" class="event30" onclick="mouseclick(this);"><a id="TT1" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/1/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/1/?referer=');">OpenBEER/BSD Team Welcome</a><br />
<span style="font-size: smaller; font-style: italic;">OpenBEER/BSD staff</span></td>
</tr>
<tr>
<td class="empty"><span class="hidden">.</span></td>
</tr>
<tr>
<td class="time" rowspan="2">11:15am</td>
<td id="E002" class="event30" onclick="mouseclick(this);"><a id="TT2" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/2/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/2/?referer=');">The OpenBSD Foundation</a><br />
<span style="font-size: smaller; font-style: italic;">Ken Westerback </span></td>
</tr>
<tr>
<td class="empty"><span class="hidden">.</span></td>
</tr>
<tr>
<td class="time">12:00pm</td>
<td id="E004" class="break"><a id="TT4" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/4/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/4/?referer=');">Lunch</a></td>
</tr>
<tr>
<td class="time" rowspan="2">02:00pm</td>
<td id="E005" class="event45" onclick="mouseclick(this);"><a id="TT5" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/5/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/5/?referer=');">OpenBSD Network Stack Internals</a><br />
<span style="font-size: smaller; font-style: italic;">Claudio Jeker</span></td>
</tr>
<tr>
<td class="empty"><span class="hidden">.</span></td>
</tr>
<tr>
<td class="time">03:00pm</td>
<td id="E006" class="event45" onclick="mouseclick(this);"><a id="TT6" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/6/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/6/?referer=');">Mediawiki Installation on Your OpenBSD Machine</a><br />
<span style="font-size: smaller; font-style: italic;">Enrico Cherubini</span></td>
</tr>
<tr>
<td class="time">03:45pm</td>
<td id="E007" class="break"><a id="TT7" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/7/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/7/?referer=');">Break</a></td>
</tr>
<tr>
<td class="time">04:30pm</td>
<td id="E008" class="event45" onclick="mouseclick(this);"><a id="TT8" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/8/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/8/?referer=');">How to Manage Large-Scale OpenBSD Installations</a><br />
<span style="font-size: smaller; font-style: italic;">Felix Kronlage</span></td>
</tr>
<tr>
<td class="time">05:30pm</td>
<td id="E009" class="event30" onclick="mouseclick(this);"><a id="TT9" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/9/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/9/?referer=');">Stupid Tricks with Install Scripts</a><br />
<span style="font-size: smaller; font-style: italic;">Ken Westerback </span></td>
</tr>
<tr>
<td class="time">06:00pm</td>
<td id="E010" class="opensp" onclick="mouseclick(this);"><a id="TT10" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/10/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/10/?referer=');">RELAX TIME</a></td>
</tr>
<tr>
<td class="time" rowspan="2">07:30pm</td>
<td id="E011" class="social" onclick="mouseclick(this);"><a id="TT11" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/11/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/11/?referer=');">OpenCON/BSD Party</a></p>
<table class="timetable" border="0" cellspacing="0">
<caption>
<h2>Day 2 &#8211;  30 November<sup><a style="text-decoration: none;" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/help?referer=');window.open(this.href, 'Time Table Help', 'height=500,width=400,resizable=yes,scrollbars=yes').focus(); return false;" name="help" href="http://2008.opencon.org/2008/schedule/help" target="_new"><img title="help" src="http://2008.opencon.org/media/img/admin/icon-unknown.gif" alt="help" /></a></sup></h2>
</caption>
<thead>
<tr>
<th class="room"><span class="hidden">.</span></th>
<th class="room">Conference</th>
</tr>
</thead>
<tbody>
<tr>
<td class="time" rowspan="2">09:00am</td>
<td id="E013" class="break"><a id="TT13" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/13/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/13/?referer=');">Registration</a></td>
</tr>
<tr>
<td class="empty"><span class="hidden">.</span></td>
</tr>
<tr>
<td class="time">10:00am</td>
<td id="E014" class="event45" onclick="mouseclick(this);"><a id="TT14" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/14/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/14/?referer=');">Porting TeX Live to OpenBSD</a><br />
<span style="font-size: smaller; font-style: italic;">Edd Barrett</span></td>
</tr>
<tr>
<td class="time">11:00am</td>
<td id="E015" class="event45" onclick="mouseclick(this);"><a id="TT15" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/15/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/15/?referer=');">Routine using RIPd</a><br />
<span style="font-size: smaller; font-style: italic;">Enrico Cherubini</span></td>
</tr>
<tr>
<td class="time">11:45am</td>
<td id="E016" class="break"><a id="TT16" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/16/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/16/?referer=');">Lunch</a></td>
</tr>
<tr>
<td class="time" rowspan="2">02:00pm</td>
<td id="E017" class="event45" onclick="mouseclick(this);"><a id="TT17" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/17/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/17/?referer=');">1 Ox or a Thousand Chickens Parallelism in OpenBSD</a><br />
<span style="font-size: smaller; font-style: italic;">Gordon W. Klok</span></td>
</tr>
<tr>
<td class="empty"><span class="hidden">.</span></td>
</tr>
<tr>
<td class="time">03:00pm</td>
<td id="E018" class="event45" onclick="mouseclick(this);"><a id="TT18" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/18/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/18/?referer=');">OpenBSynth Making Music With OpenBSD</a><br />
<span style="font-size: smaller; font-style: italic;">guly</span></td>
</tr>
<tr>
<td class="time">03:45pm</td>
<td id="E019" class="break"><a id="TT19" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/19/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/19/?referer=');">Break</a></td>
</tr>
<tr>
<td class="time">04:30pm</td>
<td id="E020" class="event45" onclick="mouseclick(this);"><a id="TT20" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/20/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/20/?referer=');">Bakeca.it DDos How evil forces have been defeated!</a><br />
<span style="font-size: smaller; font-style: italic;">Alessio L.R. Pennasilico</span></td>
</tr>
<tr>
<td class="time" rowspan="2">05:30pm</td>
<td id="E021" class="event30" onclick="mouseclick(this);"><a id="TT21" class="eventinfo" href="http://2008.opencon.org/2008/schedule/event/21/" onclick="pageTracker._trackPageview('/outgoing/2008.opencon.org/2008/schedule/event/21/?referer=');">THE END TALK</a><br />
<span style="font-size: smaller; font-style: italic;">OpenBEER/BSD staff</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/opencon-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating an SSL-certificate for my webserver</title>
		<link>http://blog.fabiolagana.net/creating-ssl-certificate-webserver/</link>
		<comments>http://blog.fabiolagana.net/creating-ssl-certificate-webserver/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 10:13:39 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[certificates]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=107</guid>
		<description><![CDATA[
#!/bin/sh
SERVER=ssl.mioserverweb.dominio
PRIVATE_KEY=$SERVER.private.key
CERTIFICATE_FILE=$SERVER.crt
VALID_DAYS=365
&#160;
echo Delete old private key
rm $PRIVATE_KEY
echo Create new private/public-keys without passphrase for server
openssl genrsa -out $PRIVATE_KEY 2048
&#160;
echo Create selfsigned certificate
rm $CERTIFICATE_FILE
# From man req:
#  -x509
#    this option outputs a self signed certificate instead
#    of a certificate request. This is typically used to
#    generate a test [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p1077"><td class="code" id="p107code7"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">SERVER</span>=ssl.mioserverweb.dominio
<span style="color: #007800;">PRIVATE_KEY</span>=<span style="color: #007800;">$SERVER</span>.private.key
<span style="color: #007800;">CERTIFICATE_FILE</span>=<span style="color: #007800;">$SERVER</span>.crt
<span style="color: #007800;">VALID_DAYS</span>=365
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> Delete old private key
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$PRIVATE_KEY</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> Create new private<span style="color: #000000; font-weight: bold;">/</span>public-keys without passphrase <span style="color: #000000; font-weight: bold;">for</span> server
openssl genrsa <span style="color: #660033;">-out</span> <span style="color: #007800;">$PRIVATE_KEY</span> 2048
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> Create selfsigned certificate
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$CERTIFICATE_FILE</span>
<span style="color: #666666; font-style: italic;"># From man req:</span>
<span style="color: #666666; font-style: italic;">#  -x509</span>
<span style="color: #666666; font-style: italic;">#    this option outputs a self signed certificate instead</span>
<span style="color: #666666; font-style: italic;">#    of a certificate request. This is typically used to</span>
<span style="color: #666666; font-style: italic;">#    generate a test certificate or a self signed root CA.</span>
<span style="color: #666666; font-style: italic;">#    The extensions added to the certificate (if any) are</span>
<span style="color: #666666; font-style: italic;">#    specified in the configuration file.</span>
&nbsp;
openssl req <span style="color: #660033;">-new</span> 
        <span style="color: #660033;">-days</span> <span style="color: #007800;">$VALID_DAYS</span> 
        <span style="color: #660033;">-key</span> <span style="color: #007800;">$PRIVATE_KEY</span> 
        <span style="color: #660033;">-x509</span> 
        <span style="color: #660033;">-out</span> <span style="color: #007800;">$CERTIFICATE_FILE</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> private-keyfile is <span style="color: #007800;">$PRIVATE_KEY</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> server-certificate-file is <span style="color: #007800;">$CERTIFICATE_FILE</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #007800;">$PRIVATE_KEY</span> <span style="color: #007800;">$CERTIFICATE_FILE</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/creating-ssl-certificate-webserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update Expired SSL Certs</title>
		<link>http://blog.fabiolagana.net/update-expired-ssl-certs/</link>
		<comments>http://blog.fabiolagana.net/update-expired-ssl-certs/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 11:17:06 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[SSL]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[certificats]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=98</guid>
		<description><![CDATA[
- Farsi una copia del vecchio certificato
cd /etc/ssl/certs
cp -ap pop3ss.pem pop3s.pem.scaduto
&#160;
- Ricreazione nuovo certificato
cd /etc/ssl
openssl req -new -x509 -nodes -days 3650 -newkey rsa:1024 -keyout private/pop3s.key -out pop3s.cert
touch certs/pop3s-new.pem
chmod 600 certs/pop3s-new.pem
cat private/pop3s.key pop3s.cert &#62; certs/pop3s-new.pem
dd if=/dev/urandom count=2 &#124; openssl dhparam -rand - 512
pico certs/pop3s-new.pem
chown vpopmail certs/pop3s-new.pem
cd certs
mv pop3s-new.pem pop3s.pem
&#160;
-- rollback in caso qualcosa andasse storto --
mv [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p989"><td class="code" id="p98code9"><pre class="bash" style="font-family:monospace;">- Farsi una copia del vecchio certificato
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>certs
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-ap</span> pop3ss.pem pop3s.pem.scaduto
&nbsp;
- Ricreazione nuovo certificato
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl
openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-x509</span> <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-days</span> 3650 <span style="color: #660033;">-newkey</span> rsa:1024 <span style="color: #660033;">-keyout</span> private<span style="color: #000000; font-weight: bold;">/</span>pop3s.key <span style="color: #660033;">-out</span> pop3s.cert
<span style="color: #c20cb9; font-weight: bold;">touch</span> certs<span style="color: #000000; font-weight: bold;">/</span>pop3s-new.pem
<span style="color: #c20cb9; font-weight: bold;">chmod</span> 600 certs<span style="color: #000000; font-weight: bold;">/</span>pop3s-new.pem
<span style="color: #c20cb9; font-weight: bold;">cat</span> private<span style="color: #000000; font-weight: bold;">/</span>pop3s.key pop3s.cert <span style="color: #000000; font-weight: bold;">&gt;</span> certs<span style="color: #000000; font-weight: bold;">/</span>pop3s-new.pem
<span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #000000; font-weight: bold;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>urandom <span style="color: #007800;">count</span>=2 <span style="color: #000000; font-weight: bold;">|</span> openssl dhparam <span style="color: #660033;">-rand</span> - 512
pico certs<span style="color: #000000; font-weight: bold;">/</span>pop3s-new.pem
<span style="color: #c20cb9; font-weight: bold;">chown</span> vpopmail certs<span style="color: #000000; font-weight: bold;">/</span>pop3s-new.pem
<span style="color: #7a0874; font-weight: bold;">cd</span> certs
<span style="color: #c20cb9; font-weight: bold;">mv</span> pop3s-new.pem pop3s.pem
&nbsp;
<span style="color: #660033;">--</span> rollback <span style="color: #000000; font-weight: bold;">in</span> caso qualcosa andasse storto <span style="color: #660033;">--</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> pop3s.pem.scaduto pop3s.pem</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/update-expired-ssl-certs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using dd to create disk images</title>
		<link>http://blog.fabiolagana.net/using-dd-create-disk-images/</link>
		<comments>http://blog.fabiolagana.net/using-dd-create-disk-images/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 14:23:57 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[cloning]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[hard disk]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=83</guid>
		<description><![CDATA[
Create a hard disk image:
&#160;
 dd if=/dev/hda1 of=/home/hda1.bin
&#160;
Create a compressed disk image
&#160;
dd if=/dev/hda1 &#124; gzip  &#38;gt; /home/hda1.bin.gz
&#160;
Back up the MBR
&#160;
 dd if=/dev/hda of=/home/hda.boot.mbr bs=512 count=1
&#160;
Restore MBR &#40;from a Live CD&#41;
&#160;
dd if=/mnt/hda1/home/hda.boot.mbr of=/dev/hda bs=512 count=1
&#160;
Backup a drive to another drive
&#160;
 dd if=/dev/hda of=/dev/hdb conv=noerror,sync bs=4k

]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p8311"><td class="code" id="p83code11"><pre class="bash" style="font-family:monospace;">Create a hard disk image:
&nbsp;
 <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #000000; font-weight: bold;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hda1 <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>hda1.bin
&nbsp;
Create a compressed disk image
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #000000; font-weight: bold;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hda1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">gzip</span>  <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>hda1.bin.gz
&nbsp;
Back up the MBR
&nbsp;
 <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #000000; font-weight: bold;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hda <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>hda.boot.mbr <span style="color: #007800;">bs</span>=512 <span style="color: #007800;">count</span>=1
&nbsp;
Restore MBR <span style="color: #7a0874; font-weight: bold;">&#40;</span>from a Live CD<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #000000; font-weight: bold;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>hda1<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>hda.boot.mbr <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hda <span style="color: #007800;">bs</span>=512 <span style="color: #007800;">count</span>=1
&nbsp;
Backup a drive to another drive
&nbsp;
 <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #000000; font-weight: bold;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hda <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hdb <span style="color: #007800;">conv</span>=noerror,<span style="color: #c20cb9; font-weight: bold;">sync</span> <span style="color: #007800;">bs</span>=4k</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/using-dd-create-disk-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BackTrack 3 Tips</title>
		<link>http://blog.fabiolagana.net/backtrack-3-tips/</link>
		<comments>http://blog.fabiolagana.net/backtrack-3-tips/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 13:00:10 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[BackTrack 3]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshd]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=80</guid>
		<description><![CDATA[1) Enable secure shell daemon to start automatically
chmod 755 /etc/rc.d/rc.sshd
2) Configure adapter for static IP rather than DHCP
vi /etc/rc.d/rc.inet1
Added this:
ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.255.0
route add default gateway xxx.xxx.xxx.x
echo “nameserver xxx.xxx.xxx.xxx” &#62;&#62; /etc/resolv.conf
]]></description>
			<content:encoded><![CDATA[<p><strong>1) Enable secure shell daemon to start automatically</strong></p>
<p>chmod 755 /etc/rc.d/rc.sshd</p>
<p><strong>2) Configure adapter for static IP rather than DHCP</strong></p>
<p>vi /etc/rc.d/rc.inet1</p>
<p>Added this:</p>
<p>ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.255.0<br />
route add default gateway xxx.xxx.xxx.x<br />
echo “nameserver xxx.xxx.xxx.xxx” &gt;&gt; /etc/resolv.conf</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/backtrack-3-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Da immagine a disco via rete con netcat</title>
		<link>http://blog.fabiolagana.net/immagine-disc-from-network-netcat/</link>
		<comments>http://blog.fabiolagana.net/immagine-disc-from-network-netcat/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 07:42:33 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[zcat]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=60</guid>
		<description><![CDATA[sul target host partire con una LIVE linux e mettere netcat in ascolto in questo modo&#8230;

  netcat -l -p 1234 &#124; dd of=/dev/sda bs=16065b

sul master (dove risiede l&#8217;immagine gzippata)

  zcat immagine.gz &#124; netcat 192.168.1.1 1234

]]></description>
			<content:encoded><![CDATA[<p>sul target host partire con una LIVE linux e mettere netcat in ascolto in questo modo&#8230;</p>

<div class="wp_codebox"><table><tr id="p6014"><td class="code" id="p60code14"><pre class="bash" style="font-family:monospace;">  netcat <span style="color: #660033;">-l</span> <span style="color: #660033;">-p</span> 1234 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda <span style="color: #007800;">bs</span>=16065b</pre></td></tr></table></div>

<p>sul master (dove risiede l&#8217;immagine gzippata)</p>

<div class="wp_codebox"><table><tr id="p6015"><td class="code" id="p60code15"><pre class="bash" style="font-family:monospace;">  <span style="color: #c20cb9; font-weight: bold;">zcat</span> immagine.gz <span style="color: #000000; font-weight: bold;">|</span> netcat 192.168.1.1 <span style="color: #000000;">1234</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/immagine-disc-from-network-netcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->