Afraid Dynamic DNS client in Fedora with Email indicating the changed to original IP.

2010-04-12 0 words 0 mins read

\"Image
Image via CrunchBase

If you have your domain in the Dynamic DNS located at : <a href="http://freedns.afraid.org">Freedns then you know how difficult it is to get the Dynamic DNS client to work with Fedora. Not that it does not work, but you need to configure it properly and there are lot of parameters. But not any more. Now you can install the afraid Dynamic DNS client and just put your Account Hash in the config file and you are ready with the setup to update the DNS entry whenever your IP changes. So lets get started:

sudo yum install afraid-dyndns

Once installed, go to the website and get your account hash and configure the same in the config file located in /etc. File name is /etc/afraid-dyndns.conf

All&#8217;s well till now**,** but when the Email comes indicating that the IP has been refreshed, there is no other information other than the fact that the IP is refreshed. The previous and the new IP are not there in the mail. So lets fix that so that the same are included.

sudo vi `which afraid-dyndns`

You will get the file that actually updates the Dynamic DNS entry. This is a perl script so should be simple to modify. In my case on Line 117 onwards is the one that we want to modify.

To => $ARGV{Notify},
Subject => &#8221;IP address change<span style="color: #ff00ff;"> from $intip => $extip&#8221;,
Data => &#8221;Dynamic DNS has been refreshed <span style="color: #ff00ff;">$intip => $extip&#8221;

We will add the part in Fuchisia to add the Previous and current IP in the subject and the body of the mail. So you are done.

Note: You would need the perl MIME lite module for the email to work. The package is not in the requires list and thus will not be automatically installed, so you need to install the module so that mails work for you.<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.crunchgear.com/2009/11/06/whats-your-favorite-protocol/">What&#8217;s YOUR favorite protocol? (crunchgear.com) <li class="zemanta-article-ul-li"><a href="http://jeremy.zawodny.com/blog/archives/011421.html">Fixing Poor MySQL Default Configuration Values (jeremy.zawodny.com) <li class="zemanta-article-ul-li"><a href="http://www.tvsquad.com/2009/10/25/worst-commercial-of-the-year-nominee-chris-farley-and-directv/">Worst commercial of the year nominee: Chris Farley and DirecTV (tvsquad.com) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/d20ed3ce-d54a-4a23-886c-e2fd2eb0cb84/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e27.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related pretty-attribution">


author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it