<?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>game, game. repeat. &#187; dyndns</title>
	<atom:link href="http://ggr.com/tag/dyndns/feed" rel="self" type="application/rss+xml" />
	<link>http://ggr.com</link>
	<description>if Scott Bonds had a home on the interwebs, this would be it</description>
	<lastBuildDate>Tue, 09 Feb 2010 00:59:33 +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>How To Post Your Dynamic Internal IP To DynDNS From Your Windows Machine</title>
		<link>http://ggr.com/how-to-post-your-dynamic-internal-ip-to-dyndns-from-your-windows-machine.html</link>
		<comments>http://ggr.com/how-to-post-your-dynamic-internal-ip-to-dyndns-from-your-windows-machine.html#comments</comments>
		<pubDate>Fri, 09 Oct 2009 19:37:49 +0000</pubDate>
		<dc:creator>Scott Bonds</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dynamic ip]]></category>
		<category><![CDATA[dyndns]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://ggr.com/?p=429</guid>
		<description><![CDATA[I looked around for an easier way to post an internal IP to DynDNS, but I didn&#8217;t find one. Scripting to the rescue. If you have a paid account at DynDNS (may work for free ones too, I&#8217;m not sure), you can update a DNS entry by hitting a URL like this: http://login:password@members.dyndns.org/nic/update?hostname=host.domain.com&#38;myip=10.0.0.1&#38;wildcard=NOCHG&#38;mx=NOCHG&#38;backmx=NOCHG So, to [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://ggr.com/how-to-post-your-dynamic-internal-ip-to-dyndns-from-your-windows-machine.html"><img class="size-full wp-image-441 aligncenter" title="UpdateIP.bat screenshot" src="http://ggr.com/wp-content/uploads/UpdateIP.bat-screenshot.jpg" alt="UpdateIP.bat screenshot" width="580" height="286" /></a></p>
<p>I looked around for an easier way to post an <strong>internal</strong> IP to DynDNS, but I didn&#8217;t find one. Scripting to the rescue.</p>
<p><span id="more-429"></span></p>
<p>If you have a paid account at DynDNS (may work for free ones too, I&#8217;m not sure), you can update a DNS entry by hitting a URL like this:</p>
<p><code>http://login:password@members.dyndns.org/nic/update?hostname=host.domain.com&amp;myip=10.0.0.1&amp;wildcard=NOCHG&amp;mx=NOCHG&amp;backmx=NOCHG</code></p>
<p>So, to update your DNS entry, you just need to <a href="http://ggr.com/how-to-get-your-ip-and-only-your-ip-in-windows.html">get your IP alone in a variable</a> that a batch file can use, then setup a task to request that URL every so often.  In more detail, the steps are:</p>
<ol>
<li>Install Cygwin including the &#8216;curl&#8217; package.  Curl allows you to make web requests from the command line.</li>
<li>Create a batch file that gets your IP then makes the DynDNS update request (see below).</li>
<li>Create a new scheduled task through the Windows Control Panel: setup multiple schedules so it runs the batch file you created in step #2 at startup, login, and when the machine is idle 60 minutes.</li>
</ol>
<p>The batch file is like so, be sure to update the curl location, DynDNS login, password, and hostname info before you use it:</p>
<p><code> :: Script from: http://www.ericphelps.com/batch/samples/ip.txt<br />
@echo off<br />
cd %temp%<br />
:: Make a line fragment "temp.txt"<br />
echo e 100 "call temp2.bat "&gt; script<br />
echo rcx&gt;&gt; script<br />
echo f&gt;&gt; script<br />
echo n temp.txt&gt;&gt; script<br />
echo w&gt;&gt; script<br />
echo q&gt;&gt;script<br />
debug &lt; script &gt; junk<br />
del script<br />
:: Make the working file "temp2.bat"<br />
echo shift&gt; temp2.bat<br />
echo shift&gt;&gt; temp2.bat<br />
echo shift&gt;&gt; temp2.bat<br />
echo shift&gt;&gt; temp2.bat<br />
echo shift&gt;&gt; temp2.bat<br />
echo shift&gt;&gt; temp2.bat<br />
echo set IP=%%9&gt;&gt; temp2.bat<br />
:: Run the command that finds the IP and create "temp1.bat"<br />
copy temp.txt temp1.bat &gt; junk<br />
ipconfig.exe | find "IP Address" | find /v " 0.0.0.0" &gt;&gt; temp1.bat<br />
:: Run the temp1.bat, which runs temp2.bat, which sets the IP variable<br />
call temp1.bat<br />
:: Remove temporary files<br />
del temp1.bat<br />
del temp2.bat<br />
del temp.txt<br />
del junk<br />
:: Display the result<br />
echo Your IP is %IP%<br />
:: Send to DynDNS<br />
c:\cygwin\bin\curl "http://login:password@members.dyndns.org/nic/update?hostname=host.domain.com&amp;myip=10.0.0.1&amp;wildcard=NOCHG&amp;mx=NOCHG&amp;backmx=NOCHG"<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ggr.com/how-to-post-your-dynamic-internal-ip-to-dyndns-from-your-windows-machine.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
