Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th August 2005, 00:30
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
Default DNS client update IP thru cron or other?

I've search here and didn't find any hit that pertains to my question. So i'm sorry if this has been covered. I know this should be posted in the proper site, but I figured this post can be useful to other n00bs like myself.

How do I add the fallowing to cron every 15min?

Code:
wget -O - --http-user=username --http-passwd=password "https://dynamic.zoneedit.com/auth/dynamic.html?host=domain.com"
I have webmin installed and I am in the cron section. I'm guessing I paste the code above in the "Input to command" box. But what do I type in the "Command" box? Should I run this job as root? What if I need to update 3 other domains? Do I create 3 other cron jobs?

Can anyone recomend a n00b friendly DNS client with gui? What about ez-ipupdate? I have the RPM version for RedHat, but will it work properly with Fedora?

Greets!
Reply With Quote
Sponsored Links
  #2  
Old 17th August 2005, 11:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

You can run

Code:
crontab -e
to edit your cronjobs. There you enter

Code:
*/15 * * * * wget -O - --http-user=username --http-passwd=password "https://dynamic.zoneedit.com/auth/dynamic.html?host=domain.com"
and save the file.

Code:
Should I run this job as root?
At least you won't have any permissions problem then... If you know the cron job is working and doesn't destroy anything, then you can run it as root.

Quote:
What if I need to update 3 other domains? Do I create 3 other cron jobs?
Yes.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 17th August 2005, 11:03
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,502
Thanks: 813
Thanked 5,264 Times in 4,128 Posts
Default

Quote:
Originally Posted by domino
I've search here and didn't find any hit that pertains to my question. So i'm sorry if this has been covered. I know this should be posted in the proper site, but I figured this post can be useful to other n00bs like myself.

How do I add the fallowing to cron every 15min?

Code:
wget -O - --http-user=username --http-passwd=password "https://dynamic.zoneedit.com/auth/dynamic.html?host=domain.com"
I have webmin installed and I am in the cron section. I'm guessing I paste the code above in the "Input to command" box. But what do I type in the "Command" box? Should I run this job as root? What if I need to update 3 other domains? Do I create 3 other cron jobs?

Can anyone recomend a n00b friendly DNS client with gui? What about ez-ipupdate? I have the RPM version for RedHat, but will it work properly with Fedora?

Greets!
I would solve it like this:

1) Write a small shell script that contains the code for the zoneupdates, lets call it zoneupdate.sh, we store it for example in the /root folder.

Contents of /root/zoneupdate.sh

Code:
#!/bin/bash

wget -O - --http-user=username --http-passwd=password "https://dynamic.zoneedit.com/auth/dynamic.html?host=domain.com"
In this shellscript you can add a line for each domain.

To make the script executable, run this comand:

Code:
chmod +x /root/zoneupdate.sh
Now we add the cronjob. Run this command on the shell as root user to open the root crontab in an editor:

Code:
crontab -e
Then we insert this line at the end and save the file:

Code:
0,15,30,45 * * * * /root/zoneupdate.sh &> /dev/null
(This is untested and may contain errors )
Reply With Quote
  #4  
Old 17th August 2005, 11:41
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
Default

Hmm, I had wanted to do the cron job at first. Then I read about the script but couldn't understand it until till explained it. Since I will be adding 5 of my own domains, and a handfull of hosted subdomains from dynDNS, I think the script will be the best way to go. As long as there are no errors :P. Will post back the results.

Thank you both!!
Reply With Quote
  #5  
Old 18th August 2005, 02:04
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
Default

Ok, I read that running a cron job for 10 domains every 15min. on the same DNS server was not a very nice thing to do to a free DNS service, so no cron . I tried the script that till mentioned and when I tried to run the script manually, the script froze .

I looked and search for half the day. Then finally ran accross ddclient-3.6.6. It says anyone with brains can run and install it, so I guess I must lack brains because it took me another 4hrs to get it installed and running. Well, I think I have it running as I don't know if my ISP changed my IP the last 24hrs. I will now in the next 2 days though.
Reply With Quote
  #6  
Old 18th August 2005, 05:16
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
Default

I feel like kicking myself in the ass for not thinking about this. I guees the exicement of running everything in linux caught me offgaurd. Anyway sorry for making this my personal blog thread . So here it goes.

I ran win/apache + DynSite client before I installed VMWare and Fedora as a guest OS. I removed apache for win32 but kept DynSite installed. When trying to clean the system and deciding whether or not to remove DynSite, it suddenly occured to me that I can still use DynSite to update my IP! Since Fedora and Widnows + DynSite are on the same network, the AP/Router will take care of the site requests.

So there it is! A newbie guide to updating your Dynamic IP. If you have a windows unit set up on your network, installing a DNS client on it will reduce the headaches. I would like to add that linux has 1 less thing to run every 3 minutes.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Empty mails after update to 2.0.7 maxx Installation/Configuration 12 28th March 2008 14:14
email client configuration davidg General 3 22nd August 2005 16:40
Install different webmail Client Horde jernis Installation/Configuration 2 31st July 2005 07:43
format Package for the update function. jernis Feature Requests 1 30th July 2005 22:38
Update: Apt-For-RPM-Howto falko HOWTO-Related Questions 0 15th June 2005 10:29


All times are GMT +2. The time now is 14:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.