<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: dyndns code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Mon, 08 Sep 2008 05:52:32 GMT</pubDate>
    <description>DZone Snippets: dyndns code</description>
    <item>
      <title>Finding your WAN IP address</title>
      <link>http://snippets.dzone.com/posts/show/5346</link>
      <description>My server sits behind a NAT router, so finding out my public IP address is a non-trivial task. I can use curl to poll checkip.dyndns.org for my current address:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;curl -s checkip.dyndns.org&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The current IP check returns the information in this format: &lt;html&gt;&lt;head&gt;&lt;title&gt;Current IP Check&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Current IP Address: 216.239.39.99&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;&lt;br /&gt;Using cut, I can extract just the information that I need:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;curl -s checkip.dyndns.org|cut -d ":" -f2|cut -d "&lt;" -f1&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;That produces something a bit more readable: 216.239.39.99&lt;br /&gt;&lt;br /&gt;-------------------------&lt;br /&gt;This article snippet was copied from &lt;a href="http://www.linux.com/articles/52552"&gt;My sysadmin toolbox&lt;/a&gt; [linux.com] while I was googling for 'apt-cache search dyndns'.</description>
      <pubDate>Fri, 11 Apr 2008 09:14:36 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5346</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
  </channel>
</rss>
