<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Share XP</title>
	<atom:link href="http://benigni.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://benigni.wordpress.com</link>
	<description>appunti di programmazione LAMP</description>
	<lastBuildDate>Fri, 06 Aug 2010 12:52:02 +0000</lastBuildDate>
	<language>it</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='benigni.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Share XP</title>
		<link>http://benigni.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://benigni.wordpress.com/osd.xml" title="Share XP" />
	<atom:link rel='hub' href='http://benigni.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Formattare le date in java</title>
		<link>http://benigni.wordpress.com/2010/08/06/formattare-le-date-in-java/</link>
		<comments>http://benigni.wordpress.com/2010/08/06/formattare-le-date-in-java/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 12:52:02 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[DateFormat]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/?p=75</guid>
		<description><![CDATA[Formattare le date come stringa in java: String format = DateFormat.DAY + " dd MMMM yyyy  hh:mm"; String data_formattata = DateFormat.format(format, timestamp) ; Tabella di riferimento: Symbol Meaning Type Example G Era Text “GG” -&#62; “AD” y Year Number “yy” -&#62; “03″ “yyyy” -&#62; “2003″ M Month Text or Number “M” -&#62; “7″ “M” -&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=75&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Formattare le date come stringa in java:</p>
<p><code>String format = DateFormat.DAY + " dd MMMM yyyy  hh:mm";<br />
String data_formattata = DateFormat.format(format, timestamp) ;</code></p>
<p>Tabella di riferimento:</p>
<table>
<tbody>
<tr>
<td><strong>Symbol</strong></td>
<td><strong>Meaning</strong></td>
<td><strong>Type</strong></td>
<td><strong>Example</strong></td>
</tr>
<tr bgcolor="lightgrey">
<td>G</td>
<td>Era</td>
<td>Text</td>
<td>“GG” -&gt; “AD”</td>
</tr>
<tr>
<td>y</td>
<td>Year</td>
<td>Number</td>
<td>“yy” -&gt; “03″</p>
<p>“yyyy” -&gt; “2003″</td>
</tr>
<tr bgcolor="lightgrey">
<td>M</td>
<td>Month</td>
<td>Text or Number</td>
<td>“M” -&gt; “7″</p>
<p>“M” -&gt; “12″</p>
<p>“MM” -&gt; “07″</p>
<p>“MMM” -&gt; “Jul”</p>
<p>“MMMM” -&gt; “December”</td>
</tr>
<tr>
<td>d</td>
<td>Day in month</td>
<td>Number</td>
<td>“d” -&gt; “3″</p>
<p>“dd” -&gt; “03″</td>
</tr>
<tr bgcolor="lightgrey">
<td>h</td>
<td>Hour (1-12, AM/PM)</td>
<td>Number</td>
<td>“h” -&gt; “3″</p>
<p>“hh” -&gt; “03″</td>
</tr>
<tr>
<td>H</td>
<td>Hour (0-23)</td>
<td>Number</td>
<td>“H” -&gt; “15″</p>
<p>“HH” -&gt; “15″</td>
</tr>
<tr bgcolor="lightgrey">
<td>k</td>
<td>Hour (1-24)</td>
<td>Number</td>
<td>“k” -&gt; “3″</p>
<p>“kk” -&gt; “03″</td>
</tr>
<tr>
<td>K</td>
<td>Hour (0-11 AM/PM)</td>
<td>Number</td>
<td>“K” -&gt; “15″</p>
<p>“KK” -&gt; “15″</td>
</tr>
<tr bgcolor="lightgrey">
<td>m</td>
<td>Minute</td>
<td>Number</td>
<td>“m” -&gt; “7″</p>
<p>“m” -&gt; “15″</p>
<p>“mm” -&gt; “15″</td>
</tr>
<tr>
<td>s</td>
<td>Second</td>
<td>Number</td>
<td>“s” -&gt; “15″</p>
<p>“ss” -&gt; “15″</td>
</tr>
<tr bgcolor="lightgrey">
<td>S</td>
<td>Millisecond (0-999)</td>
<td>Number</td>
<td>“SSS” -&gt; “007″</td>
</tr>
<tr>
<td>E</td>
<td>Day in week</td>
<td>Text</td>
<td>“EEE” -&gt; “Tue”</p>
<p>“EEEE” -&gt; “Tuesday”</td>
</tr>
<tr bgcolor="lightgrey">
<td>D</td>
<td>Day in year (1-365 or 1-364)</td>
<td>Number</td>
<td>“D” -&gt; “65″</p>
<p>“DDD” -&gt; “065″</td>
</tr>
<tr>
<td>F</td>
<td>Day of week in month (1-5)</td>
<td>Number</td>
<td>“F” -&gt; “1″</td>
</tr>
<tr bgcolor="lightgrey">
<td>w</td>
<td>Week in year (1-53)</td>
<td>Number</td>
<td>“w” -&gt; “7″</td>
</tr>
<tr>
<td>W</td>
<td>Week in month (1-5)</td>
<td>Number</td>
<td>“W” -&gt; “3″</td>
</tr>
<tr bgcolor="lightgrey">
<td>a</td>
<td>AM/PM</td>
<td>Text</td>
<td>“a” -&gt; “AM”</p>
<p>“aa” -&gt; “AM”</td>
</tr>
<tr>
<td>z</td>
<td>Time zone</td>
<td>Text</td>
<td>“z” -&gt; “EST”</p>
<p>“zzz” -&gt; “EST”</p>
<p>“zzzz” -&gt; “Eastern Standard Time”</td>
</tr>
<tr bgcolor="lightgrey">
<td>‘</td>
<td>Excape for text</td>
<td>Delimiter</td>
<td>“‘hour’ h” -&gt; “hour 9″</td>
</tr>
<tr>
<td>”</td>
<td>Single quote</td>
<td>Literal</td>
<td>“ss”SSS” -&gt; “45′876″</td>
</tr>
</tbody>
</table>
<br /> Tagged: <a href='http://benigni.wordpress.com/tag/android/'>android</a>, <a href='http://benigni.wordpress.com/tag/dateformat/'>DateFormat</a>, <a href='http://benigni.wordpress.com/tag/java/'>java</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=75&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2010/08/06/formattare-le-date-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>Android SMS Uri</title>
		<link>http://benigni.wordpress.com/2010/08/02/android-sms-uri/</link>
		<comments>http://benigni.wordpress.com/2010/08/02/android-sms-uri/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 08:14:21 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[uri]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/?p=71</guid>
		<description><![CDATA[String strUriInbox = &#8220;content://sms/inbox&#8221;;//SMS_INBOX:1 String strUriFailed = &#8220;content://sms/failed&#8221;;//SMS_FAILED:2 String strUriQueued = &#8220;content://sms/queued&#8221;;//SMS_QUEUED:3 String strUriSent = &#8220;content://sms/sent&#8221;;//SMS_SENT:4 String strUriDraft = &#8220;content://sms/draft&#8221;;//SMS_DRAFT:5 String strUriOutbox = &#8220;content://sms/outbox&#8221;;//SMS_OUTBOX:6 String strUriUndelivered = &#8220;content://sms/undelivered&#8221;;//SMS_UNDELIVERED String strUriAll = &#8220;content://sms/all&#8221;;//SMS_ALL String strUriConversations = &#8220;content://sms/conversations&#8221;;//you can delete all messages which have the same thread_id(i.e. to delete all messages which thread_id is 2, the uri [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=71&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>  String strUriInbox = &#8220;content://sms/inbox&#8221;;//SMS_INBOX:1<br />
  String strUriFailed = &#8220;content://sms/failed&#8221;;//SMS_FAILED:2<br />
  String strUriQueued = &#8220;content://sms/queued&#8221;;//SMS_QUEUED:3<br />
  String strUriSent = &#8220;content://sms/sent&#8221;;//SMS_SENT:4<br />
  String strUriDraft = &#8220;content://sms/draft&#8221;;//SMS_DRAFT:5<br />
  String strUriOutbox = &#8220;content://sms/outbox&#8221;;//SMS_OUTBOX:6<br />
  String strUriUndelivered = &#8220;content://sms/undelivered&#8221;;//SMS_UNDELIVERED<br />
  String strUriAll = &#8220;content://sms/all&#8221;;//SMS_ALL<br />
  String strUriConversations = &#8220;content://sms/conversations&#8221;;//you can delete all messages which have the same thread_id(i.e. to delete all messages which thread_id is 2, the uri string is &#8220;content://sms/conversations/2&#8243;)<br />
  String strUriAll = &#8220;content://sms&#8221;;//you can delete single message by _id (i.e. to delete a message which _id is 20, the uri string is &#8220;content://sms/20&#8243;)<br />
//SMS in content provider are grouped by thread_id, and each message has unique _id;</p>
<br /> Tagged: <a href='http://benigni.wordpress.com/tag/android/'>android</a>, <a href='http://benigni.wordpress.com/tag/java/'>java</a>, <a href='http://benigni.wordpress.com/tag/sms/'>sms</a>, <a href='http://benigni.wordpress.com/tag/uri/'>uri</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=71&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2010/08/02/android-sms-uri/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>sendmail NOQUEUE: SYSERR(root): hash map &#8220;access&#8221;: unsafe map file /etc/mail/access.db: Group writable directory</title>
		<link>http://benigni.wordpress.com/2009/12/24/sendmail-noqueue-syserrroot-hash-map-access-unsafe-map-file-etcmailaccess-db-group-writable-directory/</link>
		<comments>http://benigni.wordpress.com/2009/12/24/sendmail-noqueue-syserrroot-hash-map-access-unsafe-map-file-etcmailaccess-db-group-writable-directory/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 21:16:57 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[console]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/?p=64</guid>
		<description><![CDATA[Inviando una mail da PHP da un server con sendmail mi trovo in # cat /var/log/mail.log NOQUEUE: SYSERR(root): hash map "access": unsafe map file /etc/mail/access.db: Group writable directory Si risolve con queste due operazioni: # chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue # chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue Tagged: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=64&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Inviando una mail da PHP da un server con sendmail mi trovo in</p>
<pre style="padding-left:30px;">
# cat /var/log/mail.log
NOQUEUE: SYSERR(root): hash map "access": unsafe map file /etc/mail/access.db: Group writable directory
</pre>
<p>Si risolve con queste due operazioni:</p>
<pre style="padding-left:30px;">
# chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
# chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
</pre>
<br /> Tagged: linux, mail, php, sendmail <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=64&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2009/12/24/sendmail-noqueue-syserrroot-hash-map-access-unsafe-map-file-etcmailaccess-db-group-writable-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>fuser, conoscere processi che usano una porta o un file</title>
		<link>http://benigni.wordpress.com/2009/12/09/fuser-conoscere-processi-che-usano-una-porta-o-un-file/</link>
		<comments>http://benigni.wordpress.com/2009/12/09/fuser-conoscere-processi-che-usano-una-porta-o-un-file/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 15:15:28 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[Appunti di programmazione]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[fuser]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/?p=59</guid>
		<description><![CDATA[Il comando fuser permette di conoscere quali processi stanno loccando ad esempio una porta sul server: # fuser -k -n tcp 80 80/tcp:               4642  4643  4644  4645  4646  4647 Tagged: console, fuser, linux, shell<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=59&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Il comando fuser permette di conoscere quali processi stanno loccando ad esempio una porta sul server:</p>
<pre># fuser -k -n tcp 80
80/tcp:               4642  4643  4644  4645  4646  4647
</pre>
<br /> Tagged: console, fuser, linux, shell <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=59&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2009/12/09/fuser-conoscere-processi-che-usano-una-porta-o-un-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>Gmail con Telecom Alice Gate 2 Plus su Vista</title>
		<link>http://benigni.wordpress.com/2009/10/23/gmail-con-telecom-alice-gate-2-plus-su-vista/</link>
		<comments>http://benigni.wordpress.com/2009/10/23/gmail-con-telecom-alice-gate-2-plus-su-vista/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 17:21:53 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[Appunti di programmazione]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/?p=33</guid>
		<description><![CDATA[Negli ultimi giorni abbiamo visto i problemi generati da parte di alcuni modem Telecom Alice Gate 2 Plus su computer Vista. La soluzione è sempre la stessa: disabilitare il window scaling e all’occorrenza anche l’ECN. http://www.lemiefrequenze.org/blog/archives/225<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=33&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Negli ultimi giorni abbiamo visto i problemi generati da parte di alcuni modem Telecom Alice Gate 2 Plus su computer Vista. La soluzione è sempre la stessa: disabilitare il window scaling e all’occorrenza anche l’ECN.</p>
<p><span id="more-33"></span></p>
<p><a href="http://www.lemiefrequenze.org/blog/archives/225" target="_blank">http://www.lemiefrequenze.org/blog/archives/225</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=33&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2009/10/23/gmail-con-telecom-alice-gate-2-plus-su-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>Aprire una porta a un&#8217;applicazione in Vista</title>
		<link>http://benigni.wordpress.com/2009/08/25/aprire-una-porta-a-unapplicazione-in-vista/</link>
		<comments>http://benigni.wordpress.com/2009/08/25/aprire-una-porta-a-unapplicazione-in-vista/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 21:00:00 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/2009/08/25/aprire-una-porta-a-unapplicazione-in-vista</guid>
		<description><![CDATA[Per aprire una porta TCP o UDP a un&#8217;applicazione manualmente da prompt dei comandi in Windows Vista. Start &#62; esegui &#62; netsh netsh&#62; Scrivi &#8220;firewall&#8221; netsh&#62;firewall&#62; Scrivi: add portopening TCP 4242 Nodezilla Invio Fatto. Ora l&#8217;applicazione Nodezilla sarà in grado di ricevere chiamate sulla porta TCP 4242.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=28&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Per aprire una porta TCP o UDP a un&#8217;applicazione manualmente da prompt dei comandi in Windows Vista.<br />
Start &gt; esegui &gt; netsh<span id="more-28"></span></p>
<blockquote>
<pre>netsh&gt;</pre>
</blockquote>
<p>Scrivi &#8220;firewall&#8221;</p>
<blockquote>
<pre>netsh&gt;firewall&gt;</pre>
</blockquote>
<p>Scrivi:</p>
<blockquote>
<pre>add portopening TCP 4242 Nodezilla</pre>
</blockquote>
<p>Invio</p>
<p>Fatto. Ora l&#8217;applicazione Nodezilla sarà in grado di ricevere chiamate sulla porta TCP 4242.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=28&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2009/08/25/aprire-una-porta-a-unapplicazione-in-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>Bannare IP da un server con iptables</title>
		<link>http://benigni.wordpress.com/2009/07/21/bannare-ip-da-un-server-con-iptables/</link>
		<comments>http://benigni.wordpress.com/2009/07/21/bannare-ip-da-un-server-con-iptables/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 08:45:00 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[Appunti di programmazione]]></category>
		<category><![CDATA[bannare ip]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/2009/07/21/bannare-ip-da-un-server-con-iptables</guid>
		<description><![CDATA[Un breviario su come impedire e ripristinare l&#8217;accesso alla macchina da uno specifico indirizzo IP. Per mettere la regola: iptables -I INPUT -s 82.191.232.139 -j DROP per togliere la regola: iptables -D INPUT -s 82.191.232.139 -j DROP per vedere tutto iptables -L -n -v<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=27&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Un breviario su come impedire e ripristinare l&#8217;accesso alla macchina da uno specifico indirizzo IP.<span id="more-27"></span></p>
<p>Per mettere la regola:</p>
<blockquote>
<pre>iptables -I INPUT -s 82.191.232.139 -j DROP</pre>
</blockquote>
<p>per togliere la regola:</p>
<blockquote>
<pre>iptables -D INPUT -s 82.191.232.139 -j DROP</pre>
</blockquote>
<p>per vedere tutto</p>
<blockquote>
<pre>iptables -L -n -v</pre>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=27&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2009/07/21/bannare-ip-da-un-server-con-iptables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>Mostrare operazioni in corso in mysql</title>
		<link>http://benigni.wordpress.com/2009/05/27/mostrare-operazioni-in-corso-in-mysql/</link>
		<comments>http://benigni.wordpress.com/2009/05/27/mostrare-operazioni-in-corso-in-mysql/#comments</comments>
		<pubDate>Wed, 27 May 2009 16:26:00 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[db]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/2009/05/27/mostrare-operazioni-in-corso-in-mysql</guid>
		<description><![CDATA[# mysql -e &#8220;SHOW FULL PROCESSLIST&#8221; &#124; grep &#8220;INSERT&#8221;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=26&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p># mysql -e &#8220;SHOW FULL PROCESSLIST&#8221; | grep &#8220;INSERT&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=26&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2009/05/27/mostrare-operazioni-in-corso-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>Configurare OpenVPN</title>
		<link>http://benigni.wordpress.com/2009/05/06/configurare-openvpn/</link>
		<comments>http://benigni.wordpress.com/2009/05/06/configurare-openvpn/#comments</comments>
		<pubDate>Wed, 06 May 2009 11:24:00 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[Appunti di programmazione]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/2009/05/06/configurare-openvpn</guid>
		<description><![CDATA[http://www.sysack.org/home/index.php/cat-tutorial/44-configurare-openvpn-parte-i?start=1 Il primo passo per realizzare il nostro progetto è installare OpenVPN, sia nel pc3 che nel pc5. Nelle distribuzioni derivate da Debian possiamo installarlo facilmente con apt-get, facendo un update e poi installando: # apt-get update # apt-get install openvpn Alla fine dell&#8217;installazione sarà chiesto se OpenVPN deve essere disattivato prima di essere aggiornato [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=25&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sysack.org/home/index.php/cat-tutorial/44-configurare-openvpn-parte-i?start=1">http://www.sysack.org/home/index.php/cat-tutorial/44-configurare-openvpn-parte-i?start=1</a></p>
<p>Il primo passo per realizzare il nostro progetto è installare OpenVPN, sia nel pc3 che nel pc5. Nelle distribuzioni derivate da Debian possiamo installarlo facilmente con apt-get, facendo un update e poi installando:</p>
<p># apt-get update</p>
<p># apt-get install openvpn<span id="more-25"></span></p>
<p>Alla fine dell&#8217;installazione sarà chiesto se OpenVPN deve essere disattivato prima di essere aggiornato (&#8220;Would you like to stop openvpn before it gets upgraded?&#8221;); la risposta giusta è sí.</p>
<p><strong>Configurando server e client</strong></p>
<p>Terminata l&#8217;installazione il prossimo passo è caricare il modulo tun del Kernel, che è utilizzato da OpenVPN per creare le interfacce virtuali. Ciascuna VPN creata utilizza infatti una nuova interfaccia di rete virtuale che si connette alla rete stessa, come se ci fosse un cavo che collega l&#8217;interfaccia virtuale all&#8217;altro capo del tunnel.</p>
<p>Procediamo quindi dando il comando:</p>
<p><em><strong> # modprobe tun </strong></em></p>
<p>e aggiungendo la linea “tun” alla fine del file “/etc/modules”, in modo che il modulo sia caricato automaticamente durante la fase di boot.</p>
<p><em><strong> # echo tun &gt;&gt; /etc/modules </strong></em></p>
<p>Questi tre passaggi, cioè l&#8217;installazione di OpenVPN, il caricamento del modulo e l&#8217;aggiunta di “tun” alla fine del file, devono essere eseguiti tanto nel server quanto nel client, cioè, seguendo lo schema, tanto in pc3 e quanto in pc5.</p>
<p>Configuriamo ora il collegamento fra le due macchine. La macchina pc5, il server, sara&#8217; quella in ascolto. Andiamo quindi nel pc5, in particolare nella directory /etc/openvpn e creiamo una chiave statica che ci permetterà di codificare e decodificare le informazioni scambiate tra pc5 e pc3. Diamo il seguente comando:</p>
<p><em><strong> # openvpn &#8211;genkey &#8211;secret static.key<br />
</strong></em></p>
<p>Una volta creata dovremmo poterla copiare nella stessa dir del client. Questo passaggio dovrebbe essere fatto nel piu&#8217; sicuro dei modi ad esempio tramite mail crittografate, o utilizzando scp (dalla suite Openssh). Utilizzando queste chiavi su tutti gli host (crittografia simmetrica) otteniamo una notevole cifratura del nostro canale in maniera davvero rapida.</p>
<p>Procediamo ora con la configurazione delle due macchine. Sempre nel pc5, procediamo ora creando in /etc/openvpn il file server.conf editandolo così:</p>
<p>dev tap0</p>
<p>port 1194</p>
<p>ifconfig 1.0.0.1 1.0.0.2</p>
<p>secret /etc/openvpn/static.key</p>
<p>verb 9</p>
<p>il cui significato spieghiamo qui di seguito: <strong><br />
dev </strong>identifica la device utilizzata per il tunnel. Le possibili device utilizzabili da openvpn sono tun e tap. La differenza tra queste due tipologie di device e&#8217; fondamentale, in quanto tun si adopera per la trasmissione di pacchetti IP (una specie di ppp) e tap invece per la trasmissione di frame ethernet (una specie di eth). Per la creazione di lan virtuali o per la condivisione di risorse come file-server, ftp-server, dobbiamo usare tap.</p>
<p><strong>port </strong>è il socket dell&#8217;applicazione, il default a partire dalle versioni di OpenVPN 2.x è la 1194, per cui avremmo potuto tralasciare questa informazione, l&#8217;importante è che la porta sia la stessa in ogni nodo della vpn. E&#8217; da sottolineare che il protocollo usato è l&#8217;udp.<br />
<strong>ifconfig </strong>determina l&#8217;ip dell&#8217;interfaccia virtuale (tun o tap) e del client.</p>
<p><strong>secret </strong>a questa stringa diamo il path della key creata in precedenza con openvpn. Se il comando di configurazione che vedremo è eseguito nella directory dove si trova la chiave (nel caso /etc/openvpn) non è necessario scrivere il path, ma sarà sufficiente indicare il file della chiave.<br />
<strong>verb </strong>definisce il grado di verbosità stampato a video in output durante l&#8217;esecuzione (da 0 a 11 sono spiegati dando openvpn –help).</p>
<p>Prima di proseguire dovremo assicurarci che nel Router 1 tutte le connessioni in entrata sulla porta 1194 siano redirezionate alla porta 1194 del pc5 che ha indirizzo 10.0.0.1, e che il firewall del pc5 permetta queste entrate. Vedremo più avanti come usare iptables per risolvere questo problema.</p>
<p>Andiamo ora sulla macchina pc3, il client del nostro ufficio e creiamo il file /etc/openvpn/client.conf così:</p>
<p>remote 209.82.135.18</p>
<p>dev tap0</p>
<p>port 1194</p>
<p>ifconfig 1.0.0.2 1.0.0.1</p>
<p>secret /etc/openvpn/static.key</p>
<p>verb 9</p>
<p>L&#8217;unica differenza con la configurazione del server è che con <strong>remote</strong> definiamo l&#8217;ip pubblico della macchina alla quale ci connetteremo. Ovviamente se il server si trova in una macchina dietro l&#8217;ip pubblico, il gateway dovrà incaricarsi di redirezionare le connessioni sollecitate sulla porta 1194 alla porta 1194 del server, nel nostro caso al pc5 con  l&#8217;indirizzo 10.0.0.5.</p>
<p>A questo punto lanciamo il collegamento su entrambe le macchine, indicando al programma di attenersi alle regole appena definite nei rispettivi server.conf e client.conf:</p>
<p><em><strong># openvpn &#8211;config /etc/openvpn/server.conf</strong></em> (nel pc5)</p>
<p><em><strong># openvpn &#8211;config /etc/openvpn/client.conf</strong></em> (nel pc3)</p>
<p>Tra le righe di output del client dovrebbero apparire tra le altre queste due stringhe:</p>
<p>Wed Sep 7 15:45:28 2005 Peer Connection Initiated with 209.82.135.18</p>
<p>Wed Sep 7 15:45:29 2005 Initialization Sequence Completed</p>
<p>In sostituzione di questi comandi possiamo reiniziare il servizio openvpn tanto nel server quanto nel client con il seguente comando:</p>
<p><em><strong> # /etc/init.d/openvpn restart</strong></em></p>
<p>Dopo aver aperto la connessione, il client pc3 avrà una nuova interfaccia, la tap0, con l&#8217;indirizzo IP 1.0.0.2, che potrà connettersi al server 1.0.0.1 del pc5.</p>
<p>Andiamo sul server pc5 e diamo:</p>
<p><em><strong># ifconfig tap</strong></em></p>
<p>tap0 Link encap:Ethernet HWaddr 01:F0:EF:27:41:4C</p>
<p>inet addr:1.0.0.1 Bcast:1.0.0.255 Mask:255.255.255.0</p>
<p>UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</p>
<p>RX packets:0 errors:0 dropped:0 overruns:0 frame:0</p>
<p>TX packets:0 errors:0 dropped:0 overruns:0 carrier:0</p>
<p>collisions:0 txqueuelen:100</p>
<p>RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)</p>
<p>Nella riga inet addr vengono indicati ip, broadcast e netmask.</p>
<p>Proviamo a pingare l&#8217;host che sappiamo connesso:</p>
<p><em><strong># ping 1.0.0.2</strong></em></p>
<p>PING 1.0.0.2 (1.0.0.2) 56(84) bytes of data.</p>
<p>64 bytes from 1.0.0.2: icmp_seq=1 ttl=64 time=258 ms</p>
<p>64 bytes from 1.0.0.2: icmp_seq=2 ttl=64 time=135 ms</p>
<p>Lo stesso potremmo fare nel pc3, cambiando opportunamente gli gli indirizzi IP.</p>
<p>In questo modo abbiamo già a disposizione un canale cifrato relativamente sicuro, per lo scambio di dati privati.</p>
<br /> Tagged: linux, openvpn, shell, vpn <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=25&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2009/05/06/configurare-openvpn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
		<item>
		<title>Trovare files contenenti una stringa</title>
		<link>http://benigni.wordpress.com/2009/04/24/trovare-files-contenenti-una-stringa/</link>
		<comments>http://benigni.wordpress.com/2009/04/24/trovare-files-contenenti-una-stringa/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 14:59:00 +0000</pubDate>
		<dc:creator>benigni</dc:creator>
				<category><![CDATA[linux shell grep]]></category>

		<guid isPermaLink="false">http://benigni.wordpress.com/2009/04/24/trovare-files-contenenti-una-stringa</guid>
		<description><![CDATA[Il comando trova un file contenente una stringa da shell find . -exec grep -il "stringa da cercare" {} \; oppure: grep -R 'stringa da cercare'<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=24&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Il comando trova un file contenente una stringa da shell</p>
<pre>
find . -exec grep -il "stringa da cercare" {} \;
</pre>
<p>oppure:</p>
<pre>
grep -R 'stringa da cercare'
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benigni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benigni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benigni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benigni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benigni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benigni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benigni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benigni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benigni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benigni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benigni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benigni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benigni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benigni.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benigni.wordpress.com&amp;blog=10078306&amp;post=24&amp;subd=benigni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benigni.wordpress.com/2009/04/24/trovare-files-contenenti-una-stringa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b100621b789d5623a9e110d942f0afa4?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">benigni</media:title>
		</media:content>
	</item>
	</channel>
</rss>
