<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>EC2 on Random Ramblings</title><link>https://blog.foundev.pro/tags/EC2.html</link><description>Recent content in EC2 on Random Ramblings</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 06 Jun 2010 18:02:32 +0000</lastBuildDate><atom:link href="https://blog.foundev.pro/tags/EC2/index.xml" rel="self" type="application/rss+xml"/><item><title>Dynamic DNS with Amazon EC2 Linux and EveryDNS</title><link>https://blog.foundev.pro/2010/06/06/dynamic-dns-with-amazon-ec2-linux-and-everydns.html</link><pubDate>Sun, 06 Jun 2010 18:02:32 +0000</pubDate><guid>https://blog.foundev.pro/2010/06/06/dynamic-dns-with-amazon-ec2-linux-and-everydns.html</guid><description>&lt;h1&gt;Dynamic DNS with Amazon EC2 Linux and EveryDNS&lt;/h1&gt;&#10;So I finally sat down and did the math and found out Amazon EC2 was quite a bit cheaper than what I’d been paying for hosting as long as I was willing to prepay for at least a year.&amp;#160; However, with EC2 you are getting a dynamic ip’s so what to do? Well I’ve been using EveryDNS for years for my dns hosting and despite it’s recent acquisition by Dyn, Inc it’s still works the same. The scripts that are described below can be downloaded &lt;a href="http://unstabletransit.com/blogfiles/dyndns.tgz" target="_blank"&gt;here&lt;/a&gt;, what follows is a brief walkthrough.&#10;&lt;ol&gt;&#10;&lt;li&gt;Download EveryDns update script from &lt;a href="http://www.everydns.com/dynamic.php"&gt;http://www.everydns.com/dynamic.php&lt;/a&gt;  and place it in something like /usr/local/bin.&lt;/li&gt;&#10;&lt;li&gt;Create a convenience script in /usr/local/bin that will get your external ip and have it contain the following lines and call it &lt;strong&gt;external-ip.sh .&lt;/strong&gt; This is using Amazon’s suggested curl command to find out your EC2 instance Ip address.&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;a href="https://lostechies.com/content/ryansvihla/uploads/2011/03/externalip_03406163.png"&gt;&lt;img style="border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px" border="0" alt="external-ip" src="https://lostechies.com/content/ryansvihla/uploads/2011/03/externalip_thumb_7E5DADA6.png" width="670" height="168" /&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;Then create a script for the actual dynamic DNS update in /usr/local/bin/ and call it updatedns-sh. This is using the set command to grab the output of external ip and storing it in the variable $1, and then passing that value to the update command. &lt;strong&gt;NOTE: this will update the dns record of ALL your domains with everydns set to dynamic&lt;/strong&gt;. If you need to use specific domain names there is a –d flag for the eDNS client.&lt;a href="https://lostechies.com/content/ryansvihla/uploads/2011/03/update_3944E070.png"&gt;&lt;img style="border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px" border="0" alt="update" src="https://lostechies.com/content/ryansvihla/uploads/2011/03/update_thumb_547D3971.png" width="677" height="169" /&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;create a cron job on your linux distro of choice but the cron job line should look like the following.&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;a href="https://lostechies.com/content/ryansvihla/uploads/2011/03/cron_791157A6.png"&gt;&lt;img style="border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px" border="0" alt="cron" src="https://lostechies.com/content/ryansvihla/uploads/2011/03/cron_thumb_51D70E71.png" width="754" height="38" /&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;For those wishing to comment I’ve cross posted to my blogger account.&lt;/p&gt;</description></item></channel></rss>