Dynamic DNS Client as a DNS Server to the internet

I do not have access to a static IP address... so I can not setup bind as a Dynamic DNS server with a static IP address to the internet...

However, I would still like to setup bind as a DNS server to the internet.

Dynamic DNS sites often host 1 free dynamic DNS client such as:
my-ddns-client.site.com

I can point the nameservers for my websites to:
my-ddns-client.site.com

However, the part that I get stuck on... is when my IP address changes... my-ddns-client.site.com server's bind will need to update all the IP addresses of the sites I am hosting.  I suppose this could be done with a script somehow to update all the corresponding files and then restart bind real quick.

My question is then:
How do I setup a Dynamic DNS Client as a DNS Server to the internet?  Is there another way?
razorwireAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fosiul01Commented:
have a look this one about how to seutp Dynmic Dns clinet

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch19_:_Dynamic_DNS

0
razorwireAuthor Commented:
I already have a Dynamic DNS client setup on [my_server]
I wanted to be the nameserver for serveral domain names from [my_server] even though it is a Dynamic DNS client.  In other words my_server could be the internet host for:
site1.com
site2.com
site3.com
even though [my_server] could ONLY be identified on the internet through the free Dynamic DNS name of:
my-ddns-client.site.com
In this way I would only have to pay for DNS registration for my domains and I would NOT have to pay the premium for Enhanced Dynamic DNS services.
0
razorwireAuthor Commented:
Actually "intenet host" is ambiguous.  It should mean that [my_server] ( my-ddns-client.site.com the nameserver ) is the one that computers look to on how to resolve:
site1.com
site2.com
site3.com
etc.
0
MSSPs - Are you paying too much?

WEBINAR: Managed security service providers often deploy & manage products from a variety of solution vendors. But is this really the best approach when it comes to saving time AND money? Join us on Aug. 15th to learn how you can improve your total cost of ownership today!

fosiul01Commented:
ok so like the way we define name server

ns1.mydomain.com   and ns2.mydomain.com

you want to do :yourdomain.dyndns.com
                           yourdomain1.dyndns.com

am i right ???
0
razorwireAuthor Commented:
Can tell bind to resolve:
site1.com

To:
my-ddns-client.site.com

Instead of using an IP address like:
X.X.X.X

???

@foiul01
Yes, I want my DNS server to be referred to as something like yourdomain.dyndns.com (in your example) but the confusion for me comes when setting up bind.

ns1.mydomain.com will NOT be an option for a free Dynamic DNS service under no-ip.com or dyndns.com
0
fosiul01Commented:
Ok let me explain you what i have understood from your questions
then you can correct me

Ok suppose you have 2 Dynamic ip
and you have registered them as myddns1.dyndns.com   -> 89.44.55.44
                                                      mydnsn2.dyndns.com   -> 89.44.55.45

so , from domain control panel of abc.com -> you will have to change the primary name server to myddns1.dyndns.com  and secondary name server to myddns2.dyndns.com


now you have to create zone file for abc.com so for A record, mx record and others

do you want something like this is not it ?? if yes, then as theory it can be done

                                 
0
razorwireAuthor Commented:
That sounds correct...

The other part to this is that I only have 1 server...  so the DNS server and the Web Server will both be on the same machine.

This means that the following will all be dynamic from your example:
myddns1.dyndns.com
abc.com

I can specify a zone file for these sites... however, as I understand a zone file needs a specific IP address... so when the IP address changes I don't know how to tell bind to update the IP address...

ie) On an IP change

The corresponding IP address for the following should be updated automatically:
myddns1.dyndns.com

The problem I have is I don't know how the corresponding IP address for the following would be updated:
abc.com

I realize now my question should be:
How do I setup a Dynamic DNS client as a DNS Server for the same domain names it is using for web hosting?
0
fosiul01Commented:
Ok the purpose of dyndns is if you dont have static ip then use dyndns service and dyndns server will update your ip address automatically.

i have done this on windows, i used to have software install from dyndns server, and this one used to update dyndns if my ip has been changed , another way was, from any pc of the network just goto dyndns web site and logon to the web site it would of update the ip address automatically.

but i guess you setup dyndns client so your ip should be updated by dyndns automatically.  

about your this comments " I can specify a zone file for these sites... however, as I understand a zone file needs a specific IP address... so when the IP address changes I don't know how to tell bind to update the IP address "

omm yes problem is when you will define A record, you will have to define IP, now if your ip changed ommm you are stuck ,

let me check something on the web ..




0
fosiul01Commented:
if there is any way we could of deine A record like this

IN A mydns1.dyndns.com

problem is solved!!! but bind will not allow you to do this...... you need an IP to define A record


0
razorwireAuthor Commented:
@fosiul01
Looks like you have pinpointed my dilemma...

Perhaps there is a script or something that can:
- sense an IP address change
- update all corresponding bind files with the new IP address
- restart bind

Seems easy enough... And this would suit my needs.

I am going to try and setup bind as a dynamic dns server and client...  looks like this is already possible...
http://dag.wieers.com/howto/bits/bind-ddns.php

As long as I can make things update by a domain name like mydyndns1.dyndns.com and NOT an IP address I should be fine...

Has anyone ever setup bind as a dynamic dns server?  Will this work? There may still be hope...
0
razorwireAuthor Commented:
I am looking at using the following utility to do what I need:
nsupdate

See:
http://en.wikipedia.org/wiki/Nsupdate

See also:
http://en.wikipedia.org/wiki/Nsupdate#External_links

I am still confused as to how I can instantly sense an IP address change and send out an nsupdate request immediately...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fosiul01Commented:
Hi yah
sorry due to night i was off!!

if there is any script which will sense the ip changes and will edit the A record that would be the best solution, i know its possible becase one if my Ex manager he told me that you can edit bind file and change the record
ok i will check those artile see if i can learn something!!!

give me some time,
0
fosiul01Commented:
ok let me give you another idea, which i guess is easy

if you have router , your Dsl cable is connected to that router  [ i have used linksys]

now your Dns server is behind that router.
from router you will have to port forward all dns query to go to server 192.168.1.2  

so in that Dns server you will setup bind and A record would be the internal IP which never be chnaged  [ so initial problem is solved]

Now problem is,  you need to tell dyndns that your ip has changed , normally , if you browse dyndns web site from any internal pc of your network it will update automaticaly. or if you have any windows pc then  you can download the software from dyndns web site, and if you keep it run , it will update automaticaly, or there is another options , i think linkys as ability to update ip with dyndns [ but i will have to check]

Or you need to setup a llinux pc to update public dynamic ip with dyndns web site

let me k now if this make sense!!!
then we can work on that

0
razorwireAuthor Commented:
@fosiul01
What you are saying makes sense for sure...  But everything you are describing is not a problem for me to setup...

The problem for me comes when I have to actually update a dynamic site to a dynamic dns server for free. (only paying for domain registration)
ie)
mydns1.dyndns.com changes its ip
- Handled because of the free dynamic dns abilities of dyndns.com (external not really part of my setup)
abc.com also changes its ip
- Theoretically can be handled by nsupdate (internal to my my setup)

Also, since my dynamic DNS server and my Web Hosts will be on the same machine (or at least will have static IPs in my internal network)... I can refer to the machine  by ip address (127.0.0.1) or by domain name (mydns1.dyndns.com) when using nsupdate so think this will be possible...It is now just a matter of impementation.

As it stands right now I am still wondering:
how I can instantly sense an IP address change (likely on my router) and send out an nsupdate request immediately...

Once I find that I am ready to close this question.

Perhaps the ddclient application can be used to update my own personal and custom setup too?
http://ddclient.wiki.sourceforge.net/
0
fosiul01Commented:
ok read this article

http://www.linux.com/articles/55541

this section Update clients and what they do
it should explain you how dynclients will upate the ip , and this is what we want, right ??

0
fosiul01Commented:
what happenning is

your dyndns client pc will update the ip with dyndns web site,

you problem is, how dyndns site will know that your ip has been changed,

so with dyndns clients will do this job so your ip would be always updated with dyndns website,
0
razorwireAuthor Commented:
Ehhh... explaining things can be difficult...

There are 2 parts to this...
1. Setting my computer up as a Dynamic DNS Client.  This is done.  It is not an issue.  
2. Setting that same computer up as a Dynamic DNS Server.  This is the part I don't fully understand.

In order to differentiate these 2 Dynamic DNS servers in the future...
Lets call 1 from above [dyndns.com's DDNS Client] and maybe we also need [dyndns.com's DDNS Server]
Lets call 2 from above [My DDNS Client] and [My DDNS server]

So there are 4 separte things going on here...

[dyndns's DDNS client] the free one updates [dyndns's DDNS server] fine, resulting in the correct name resolution for my server.  On my server I will be attempting to setup [My DDNS server] using bind and nsupdate to resolve any number of domain names without having to pay for ANY services from dyndns.com.  My server will also be running [My DDNS client] using nsupdate to udate the dynamic web hosts it is hosting.  The question I have is how do I know how to launch nsupdate from [My DDNS client]?  Other than that I think the solution I proposed should work.

There is good information in your link:
Ddclient checks for changes to the local IP address upon several circumstances: on system startup, upon renewal of a local DHCP lease, upon initialization of a PPP session, and at regular intervals during normal system operation.

If I can use ddclient to launch nsupdate I think I should be fine.
0
fosiul01Commented:
Your main problem was, you were unable to set A record as Ip because the Ip you will have to provide this can be changed , is not it ??

this problem has been solved as we discussed that, place the web server and dns server behind the router so you would be able to setup A record with a static ip which 192.....

Now main problem of Dyndns is, how will you change your ip time to time if it changed ??

this problem has been solved with the solution that you have stup dyndns client and this client pc will talk with dyndns server and will update the ip .

so i am realy not seeing any problem .
now i dont understand why you are after nsupdate ??


from google , the defination of nsupdate is : nsupdate is a computer network maintenance utility used by network administrators to request the name server of a DNS zone to update its database. ...

now since you are using Static ip in your nameserver then why you have to use nsupdate to update your dns zone ??
0
razorwireAuthor Commented:
I will be keeping consistent with the naming conventions in my previous post:
[dyndns.com's DDNS Server]
[dyndns.com's DDNS Client]
[my DDNS Server]
[my DDNS Client]

If it makes it simpler to conceptualize... just forget about the following all together:
[dyndns.com's DDNS Sever]
[dyndns.com's DDNS Client]
And instead pretend like I am manually changing the EXTERNAL address on my router... and I need bind to compensate for this change automatically.

fosiul01:
Your main problem was, you were unable to set A record as Ip because the Ip you will have to provide this can be changed , is not it ??
razorwire:
Yes and this still is the problem... I need to set the A record with a static IP address in bind and update it on [my DDNS server] when it changes.

fosiul01:
this problem has been solved as we discussed that, place the web server and dns server behind the router so you would be able to setup A record with a static ip which 192.....
razorwire:
If [my DNS server] responds with an internal IP address it won't be resolvable on the internet... Only on my internal network.

fosiul01:
Now main problem of Dyndns is, how will you change your ip time to time if it changed ??
razorwire:
It is not necessarily how to change the IP... Looks like nsupdate will handle this.  The question is how to sense the ip address change and launch nsupdate immediately.

fosiul01:
this problem has been solved with the solution that you have stup dyndns client and this client pc will talk with dyndns server and will update the ip .
razorwire:
My original issue was:
"when my IP address changes... my-ddns-client.site.com server's bind will need to update all the IP addresses of the sites I am hosting."
I am still not clear on how to do this...
The problem of setting up  a DDNS client to talk to a DDNS server with a service like dyndns.com was never an issue.

fosiul01:
so i am realy not seeing any problem .
now i dont understand why you are after nsupdate ??
razorwire:
I am after nsupdate because I have to update the A record on [My DDNS Server] every time my ip address changes. If this does not happen anyone outside my internal network will still be able to request things from [My DDNS Server] but without nsupdate happening they will get the previous IP address, which will be wrong.

fosiul01:
from google , the defination of nsupdate is : nsupdate is a computer network maintenance utility used by network administrators to request the name server of a DNS zone to update its database. ...
now since you are using Static ip in your nameserver then why you have to use nsupdate to update your dns zone ??
razorwire:
[My DDNS Server] is not static neither are the websites I will be hosting.  This is why I have to update my dns zones.

If a random computer on the internet asks my DNS server, which is In this case [dyndns.com's DDNS Client] and [My DDNS Server], on how to resolve a site I am hosting on that same server after the ip address on it has changed from X.X.X.X to Y.Y.Y.Y ie) site.com... Then how does [My DDNS Server] know how to reply?  It can't just reply with an internatl IP address like 192.168.1.2 because that is wrong... And it cant reply with the old A record of X.X.X.X because that is wrong too...  [dyndns.com's DDNS client] still resolves correctly because it updated the IP address on [dyndns.com's DDNS Server]... However, all that does is point correctly to [My DDNS Server] which has to answer the DNS request.  On my server, site.com still has to have it's IP address updated to Y.Y.Y.Y.  This is where nsupdate comes in... Once nsupdate is sent to [My DDNS Server] then site.com can now be resolved correctly because it now responds with the changed IP address Y.Y.Y.Y instead of X.X.X.X or whatever the old IP address was...

Problem still is... I don't know how to get the correct IP address and use nsupdate to send an update immediately when my router changes an IP address...
0
fosiul01Commented:
ok!!!!
your this comments
fosiul01:
this problem has been solved as we discussed that, place the web server and dns server behind the router so you would be able to setup A record with a static ip which 192.....
razorwire:
If [my DNS server] responds with an internal IP address it won't be resolvable on the internet... Only on my internal network.

here you are wrong!!! DAMM wrong!!!!


suppose you have domain abc.com

and you have change the nameserver as ns1.dyndns.com  
        and ns2.dyndns.com

so when i am requesting for web site abc.com
my request will go to ns1.dyndns.com  which will resolve the IP of 44.55.44.33 , which is your dynamic ip address.
so the request will come to your router.

from router you will have to porforward all dns query to your dnsserver 192.168.1.2
so all dnsquery will go to your dns server.
now from dns record it will now which one is your web server because A record will say its 192.168.1.2

now you will have to portforward again from your router to web server which is 192.168.1.2 with port 80

your job done!!!

i have done this before.
0
fosiul01Commented:
what i said , does it make sense ??

0
razorwireAuthor Commented:
What you said makes sense... but you said for abc.com.... "A record will say its 192.168.1.2"

Thus using your example I get the following:
nslookup abc.com 44.55.44.33
Server:            44.55.44.33
Address:      44.55.44.33#53

Non-authoritative answer:
Name:      abc.com
Address: 192.168.2.1

The actual resolution should be 44.55.44.33 not 192.168.2.1.
0
fosiul01Commented:

"The actual resolution should be 44.55.44.33 not 192.168.2.1."  -> yes because from your dns record its getting the internet addrss

but i am not seeing the problem of them!! if its solved your puspose what problem ?

but i will try to do this setup again at home today , let see how it goes
0
razorwireAuthor Commented:
The following statements seem to conflict:
1. "A record will say its 192.168.1.2"
2. "The actual resolution WILL be 44.55.44.33"

Anyway...

The following A record in bind doesn't work because it will result in the nslookup I just descriibed:
IN A 192.168.1.2

The following A record in bind works but since abc.com is not on a static IP address it will not work after an IP change:
IN A 44.55.44.33

........  So forgetting everything that was said previously and starting over ........

I have the following:
[MY router]
[MY server] running [MY bind]

Lets pretend [MY bind] currently is on [MY server] with IP X.X.X.X and I have:
IN A X.X.X.X

Then [MY router]'s IP changes to Y.Y.Y.Y... So I want to automatically update [MY bind]'s corresponding record to:
IN A Y.Y.Y.Y

How do I do that to [MY bind]?  That is my question...  

More specifically... how do I trigger nsupdate to run immediately and update MY bind with the new IP address when my router IP changes?

Answer that and points will be awarded.

Reasoning:
When I wrote the original question I said: "The part that I get stuck on... is when my IP address changes... my-ddns-client.site.com server's bind will need to update all the IP addresses of the sites I am hosting."
0
fosiul01Commented:
ok i will check some documentation and will come back to you as i didnot use nupadate before.
0
fosiul01Commented:
if you want you can delete this question
only i can say is i tried to help you as much as information  i can and with my time!!!!

and I relay dont think all those information was useless toward your problem!!!

anyway good luck!!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DNS

From novice to tech pro — start learning today.