<?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>Focus the Web Tech Blog &#187; dns</title>
	<atom:link href="http://tech.focustheweb.com/tag/dns/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.focustheweb.com</link>
	<description>Programmazione, web, internet, howtos, etc.</description>
	<lastBuildDate>Sat, 24 Apr 2010 09:16:53 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Risolvere un nome host da un indirizzo IP in Ruby</title>
		<link>http://tech.focustheweb.com/programmazione/ruby-programmazione/risolvere-un-nome-host-da-un-indirizzo-ip-in-ruby/</link>
		<comments>http://tech.focustheweb.com/programmazione/ruby-programmazione/risolvere-un-nome-host-da-un-indirizzo-ip-in-ruby/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 16:19:25 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://tech.focustheweb.com/?p=327</guid>
		<description><![CDATA[







Ecco un altro promemoria: come risolvere un nome host da un indirizzo IP in Ruby.
Per eseguire l&#8217;operazione viene in nostro aiuto la class Resolv.
Esempio (usando Rails):

hostname = Resolv.new.getname&#40;request.env&#91;'REMOTE_ADDR'&#93;&#41;

Risorse utili:
 http://ruby-doc.org/stdlib/libdoc/resolv/rdoc/index.html
]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-7194529311513014";
/* 468x60, creato 21/11/09 */
google_ad_slot = "8123373738";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
<br />
Ecco un altro promemoria: come <em>risolvere un nome host da un indirizzo IP</em> in Ruby.</p>
<p>Per eseguire l&#8217;operazione viene in nostro aiuto la class <code><strong>Resolv</strong></code>.</p>
<p>Esempio (usando Rails):</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">hostname = Resolv.<span style="color:#9900CC;">new</span>.<span style="color:#9900CC;">getname</span><span style="color:#006600; font-weight:bold;">&#40;</span>request.<span style="color:#9900CC;">env</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'REMOTE_ADDR'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Risorse utili:<br />
<a title="Resolv class documentation" href="http://ruby-doc.org/stdlib/libdoc/resolv/rdoc/index.html"> http://ruby-doc.org/stdlib/libdoc/resolv/rdoc/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/ruby-programmazione/risolvere-un-nome-host-da-un-indirizzo-ip-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cancellare la cache DNS del computer (flush DNS cache)</title>
		<link>http://tech.focustheweb.com/programmazione/cancellare-la-cache-dns-del-computer-flush-dns-cache/</link>
		<comments>http://tech.focustheweb.com/programmazione/cancellare-la-cache-dns-del-computer-flush-dns-cache/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 18:04:09 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dominio]]></category>
		<category><![CDATA[flush]]></category>

		<guid isPermaLink="false">http://tech.focustheweb.com/?p=245</guid>
		<description><![CDATA[
I nomi a dominio (ad esempio il nome a dominio di questo blog è tech.focustheweb.com) vengono risolti in indirizzi IP dai server DNS. Ogni volta quindi che scriviamo tech.focustheweb.com sulla barra dell&#8217;indirizzo del nostro browser la stringa tech.focustheweb.com viene tradotta in un numero (indirizzo IP) che identifica il computer a cui il nostro browser deve [...]]]></description>
			<content:encoded><![CDATA[<p><br />
I <em>nomi a dominio</em> (ad esempio il nome a dominio di questo blog è <em>tech.focustheweb.com</em>) vengono <em>risolti</em> in <em>indirizzi IP</em> dai server DNS. Ogni volta quindi che scriviamo <em>tech.focustheweb.com</em> sulla barra dell&#8217;indirizzo del nostro browser la stringa <em>tech.focustheweb.com</em> viene tradotta in un numero (indirizzo IP) che identifica il computer a cui il nostro browser deve connettersi per ricavare le informazioni di cui ha bisogno per visualizzare la pagina web richiesta.</p>
<p>Per velocizzare questo processo i risultati delle richieste vengono registrati in una memoria tampone o <em>cache</em>.<br />
<span id="more-245"></span><br />
A volte però, per diverse ragioni, vogliamo poter ricavare risultati aggiornati e per fare questo dobbiamo, come prima cosa, cancellare la cache DNS interna del nostro computer.</p>
<p><strong>Windows</strong></p>
<ol>
<li>avviare l&#8217;applicazione &#8220;Prompt dei comandi&#8221; dal menù &#8220;Start&#8221;&gt;&#8221;Accessori&#8221;</li>
<li>eseguire il comando
<pre lang="dos" encoded="true">C:\&gt;ipconfig /flushdns</pre>
</li>
</ol>
<p><em>Nota:</em> in Windows Vista, per poter eseguire questo comando, bisogna avviare la console come amministratore cliccando sul tasto destro sull&#8217;icona dell&#8217;applicazione &#8220;Prompt dei comandi&#8221; e selezionando &#8220;Esegui come amministratore&#8221;</p>
<p><strong>Mac OS X<br />
</strong></p>
<ol>
<li>avviare l&#8217;applicazione &#8220;Terminal&#8221;</li>
<li>eseguire il comando

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

<p>oppure, per le versioni di sistema <em>maggiori della 10.5.1</em>, il comando</p>

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

</li>
</ol>
<p><strong>Linux</strong></p>
<ol>
<li>aprire un terminale</li>
<li>eseguire il comando

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

<p>per riavviare il servizio nscd responsabile del caching dei record DNS</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/cancellare-la-cache-dns-del-computer-flush-dns-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
