<?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>Misadventures of a Celtic Geek &#187; DNS</title>
	<atom:link href="http://blog.guesny.net/tag/dns/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.guesny.net</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Fri, 03 Sep 2010 11:50:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>DynDNS and uptime</title>
		<link>http://blog.guesny.net/2010/03/27/dyndns-and-uptime/</link>
		<comments>http://blog.guesny.net/2010/03/27/dyndns-and-uptime/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 15:52:07 +0000</pubDate>
		<dc:creator>welsh_dwarf</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[personnel]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[dynamic dns]]></category>
		<category><![CDATA[dyndns]]></category>
		<category><![CDATA[ovh]]></category>

		<guid isPermaLink="false">http://blog.guesny.net/?p=109</guid>
		<description><![CDATA[Anyone who has tried to get into touch with me or read this blog these last few days can atest to the fact that I haven&#8217;t been reachable. My deepest apologies . To understand what happened, here&#8217;s a quick lowdown &#8230; <a href="http://blog.guesny.net/2010/03/27/dyndns-and-uptime/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Anyone who has tried to get into touch with me or read this blog these last few days can atest to the fact that I haven&#8217;t been reachable.</p>
<p>My deepest apologies <img src='http://blog.guesny.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> .</p>
<p>To understand what happened, here&#8217;s a quick lowdown on how my setup works:</p>
<p>I&#8217;m self hosting this blog as well as my mail on a converted EasyGate that I got as a beta tester. The machine is connected onto my internet router (a Trio 3D antique) and then onto the internet. My ISP provides a temporary IP address, and as such, I need to use a dynamic DNS record to be able to keep things updated.</p>
<p>Now, the Trio 3D (as with most of it&#8217;s features) has a half assed (excuse my French)  DynDNS system built in. I say half assed because it doesn&#8217;t accept any provider except the historic DynDNS and because it quite often forgets to update. Last week it completely stopped updating, and as an added bonus, I couldn&#8217;t get back into DynDNS to do things manually.</p>
<p>As a work around, I set up OVH (who are my registrar) to route my DNSes manually until I got a permanent fix. That worked until the IP changed Tuesday or Wednesday.</p>
<p>Now things are sorted out. I&#8217;m using OVH&#8217;s own DynDNS servers (much simpler) and am using a home built client to avoid all the dependancies other clients bought in.</p>
<p>The client is written in bash and depends on bash, sed and wget to work. It&#8217;s best used in a cron job, but can also be run on interface specific events if need be.</p>
<p>It uses a web based IP fetcher to work out your IP adresse, and if it&#8217;s changed since you last run the script, it updates your DynDNS records for you.</p>
<p>Without further ado, here&#8217;s the code:</p>
<pre lang="bash">#/bin/bash

USERNAME='myusername'
PASSWORD='mypassword'
HOSTS=('first_url.test.com' 'second_url.test.com')
SERVER="www.ovh.com"

#
#
#

CURRENT_IP=`wget -O - 'http://checkip.dyndns.org/' 2&gt;/dev/null | sed -e 's/.*Address: \([^&lt;]*\).*/\1/'` if [ -f /tmp/my_ip ]; then 	OLD_IP=`cat /tmp/my_ip`; fi # # Don't update unless ip has changed # if [ "x"$CURRENT_IP == "x"$OLD_IP ]; then 	exit; fi; echo "IP changed from " $OLD_IP " to " $CURRENT_IP echo "Saving new IP" echo $CURRENT_IP &gt; /tmp/my_ip

for HOST in ${HOSTS[@]};
do
	echo "Updating " $HOST " to " $CURRENT_IP
	wget -O - "http://${USERNAME}:${PASSWORD}@${SERVER}/nic/update?system=dyndns&amp;hostname=${HOST}&amp;myip=${CURRENT_IP}&amp;wildcard=NOCHG&amp;mx=NOCHG&amp;backmx=NOCHG" 2&gt;/dev/null
	echo ""
done</pre>
<p>Et voila, I hope this helps someone out there</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.guesny.net/2010/03/27/dyndns-and-uptime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS 101</title>
		<link>http://blog.guesny.net/2009/03/02/dns-101/</link>
		<comments>http://blog.guesny.net/2009/03/02/dns-101/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 11:41:42 +0000</pubDate>
		<dc:creator>welsh_dwarf</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[dot]]></category>

		<guid isPermaLink="false">http://blog.guesny.net/index.php/2009/03/02/dns-101/</guid>
		<description><![CDATA[I just thought that I&#8217;d post a quickie on DNS FQDNs (Fully qualified domain names). Go to your browser, type in www.google.com, you get the google home page. Everythings normal there. Now, change your url, ad a dot (so that &#8230; <a href="http://blog.guesny.net/2009/03/02/dns-101/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just thought that I&#8217;d post a quickie on DNS FQDNs (Fully qualified domain names).</p>
<p>Go to your browser, type in www.google.com, you get the google home page. Everythings normal there.</p>
<p>Now, change your url, ad a dot (so that it reads www.google.com.) . The page still loads.</p>
<p>This is risky, since it can lead to a duplicate content malus on google, but is perfectly normal DNS behaviour.</p>
<p>The actual FQDN is www.google.com<span style="font-weight: bold;">. </span>. It&#8217;s just that, to make our lives easier, the last dot is optional.</p>
<p>Unfortunatly, there&#8217;s no way to get rid of them (even 301s seem flaky).</p>
<p>That&#8217;s all, just so that the next time you see bizzars urls, you have a reason for them all ready for your boss <img src='http://blog.guesny.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=c42d9bfc-df53-4710-bc9a-3d7b6d2407e6" /></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.guesny.net/2009/03/02/dns-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

