update DNS via batch file?

fabioq

New Member
Is there a way to update a domain via batch file? I'm a karaoke host and my laptop hosts a page that allows people in the bar to search via their phones for songs in my catalog and they can submit their songs from ther as well they get auto added to a queue on my karaoke hosting program. Because this is a speciallized apprication I can't host this page on a static page online (it's built into the hosting software). I do have a basic informational page which let's people see what other bars I host and what days and that page is my "off" url below.

I have the following the domain karaoke-book.com and I have the TTL set to 5 minutes so the two below hosts act as Dynamic DNS.

@ host(a) 192.253.245.154
off host(a) 72.41.61.60
www URL Redirect http://karaoke-book.com

The "@" and the "off" get swapped manually (by me) every night before I start hosting via the zoneedit page. so they end up like this (below) and they at the end of the night I swap them again back to the settings above.

off host(a) 192.253.245.154
@ host(a) 72.41.61.60

The problem is that I sometimes have to have someone else host for me and I prefer the person run a batch that makes the change before and then a 2nd batch that switches it back at the end of the night. Except I haven't found how to create this batch or command line. Is there such a thing?

Thank you in advance!
Fabio
 

sandy

Administrator
Staff member
hi there

sorry.. not that I am aware of... not pre-timed zone file changes.

thanks
sandy
 

fabioq

New Member
It's no so much as pre-timed it's more like a manual update via a command line.

Aren't there scripts that update DDNS via a command line after detecting an IP change?...the only difference is that I wouldn't need to check the IP as I would know it ahead of time. I could use a DDNS client (like Directupdate) to update my local current IP from the laptop, the problem is that when I go offline I'd need to set it to a remote IP from my hosted site instead of my local IP.
 

sandy

Administrator
Staff member
hi there.

hmmm.. we do offer failover DNS but both IP addresses would need to be static... it wold not work if one of the IP addresses was dynamically assigned.

thanks
sandy
 

fabioq

New Member
Actually both are static...I'm using PureVPN with a static IP (with port 80 open). Is there a way to make one the main IP (the one on the laptop)? I remember trying this a few months ago and it didn't seem to work completely. It would switch to the hosted server but when my laptop was turned on with the static IP it would not switch back to it...but I'm not 100% that at that time the one on the hosted server was static (I changed hosting recently). Since the hosted one was online 80% percent of the time, it seem to assume that was the main one. I guess I should try again to see if with the recent changes it will work.

I did find a Python script last night that does seem to work but in my testing it seems to work once then the 2nd time around it give me an error. I'm thinking it could be related to the frequency of the update...since I was testing changing the IP back and forth, it may be due how zoneedit handles multiple updates within a certain time. I'm thinking it might work if I run it once at the beginning of the night and again 4 hours later. Here's where I got that script:

http://zoneclient.sourceforge.net/

But if Failover DNS works now that is much better since I will only have to set it once and then I can forget about it.
 

fabioq

New Member
I'm currently testing the failover DNS, and so far it's working. I guess having both static ips helps.

:D
 

fabioq

New Member
well, I spoke too soon...it seems to stay stuck on the hosted IP which is similar with the problem I was having before. When I first set it up a few hours ago the status said "NORMAL" in green letters when my laptop IP was active my site was being served through it and it would display "DOWN" with red letters when it wasn't and the site was being served from the hosted IP.
 

sandy

Administrator
Staff member
the host monitoring would not work unless you used the add ons link on the domain settings page to purchase fail over services

thanks
sandy
 

fabioq

New Member
I did use it, but after it started failing I removed it. I'm assuming you went to checked and it's no longer showing I'm using it. I didn't mind paying the $1 a month if it worked consistently. To be truthful the fail over seem to switch the IPs as I was testing but for some reason the sites would not switch over, even when I ping it and would show the correct ips were already being seen by the devices (smartphone, tablet and PC), somehow they seemed to cache the page within the browser and no amount of refreshing seemed to make it display the correct page....they eventually did but usually after 15 to 20 minutes of trying different ways to refresh. Sometimes it would display "karaoke-book.com didn't send any data" and below it it would display "ERR_EMPTY_RESPONSE" which sounds like it was seeing the page but couldn't display it. Which doesn't make any sense because if the device was seeing the old ip it should continue to display the same page, but if it's seeing the new IP, it should display the new page...there should not be a "page not found" or a "server not found" or any similar error.

It should work by all appearances but it didn't. But if I manually change the IPs via zoneedit, the caching doesn't seem to occur, no errors occur, it just switches and it works...I can't explain it because there is no change in the pages, only the DNS changes.
 

kinjo214

New Member
Here’s the mail I got recently for my problem
I was not able to get to these sites at the time of my first post but now for the last day I have been able to access them. Also, there were times during the prior 2-3 weeks that I was able to get to "problem" sites but it definitely was infrequently.


The error message, in addition to the ERROR 324 said the "server did not send any data." I'm sorry I didn't "snip" the exact error message. I will when I see it again.


I will now proceed until the "problem" resurfaces. Then I will go through Methods 1-3 and see what I find. I have my fingers crossed but since I was only able to go back to a restore point from one week ago, it was still in the middle of the "problem" time period, so I believe there still is potential for the issue to resurface.

Or otherwise try this:
 

sandy

Administrator
Staff member
sorry... not sure what the concern is here or the domain name,
can you please be more explicit with what is happening?

thanks
sandy
 
Top