|
From: Tim v. d. H. <ti...@vd...> - 2002-11-25 14:31:18
|
Hello Everybody, I'm trying to accomplish this: I have a subdomain made in the regular DNS manager from win2k: clients.domain.com and I want all of my clients to get a hostname based on their IPs. So I get their IPs, replace some characters and append the string till I get: xxx-xxx-xxx-xxx.clients.domain.com Now, I want to add this hostname with the corresponding IP address to the zone. Basically this is just adding an A record, but somehow the component or the dnscmd executable won't process it. I feared it might be because the component lacks support for subdomains.... Anybody, clue? hint? solution *hopes*? Regards, Tim van den Hoff |
|
From: Ricardo P. <ric...@em...> - 2002-11-25 16:33:55
|
hey tim, i've been able to create a DNS record of the format: xxxx.domain.com the way to do this is to add a new "host" to an existing "zone". so, if you have the zone "mydomain.com", and you want something like "customer1234.mydomain.com", then you would add a new host to "mydomain.com" by doing the following: dns.AddHost("mydomain.com", "customer1234" , "xxx.xxx.xxx.xxx", "yyy.yyy.yyy.yyy", vRes2) the "x's" IP address would be the IP of the domain "customer1234.mydomain.com" and the "y's" IP address would be the IP of the DNS server machine, usually localhost (or maybe it's vice versa - please check the docs to make sure). my problem is that i want to dynamically create a DNS record of the format: "www.customer1234.mydomain.com" because there's an extra level of "dot's", i ran into the problem. if you do this manually using the DNS manager in Win2K, you would add a "domain" under the "zone". so, if my "zone" is "mydomain.com", i would have to add a "domain" under that "zone" and NOT a "host". the domain i would create would be called "customer1234" under the zone "mydomain.com". finally, under that domain, i would create the host "www". in the end, it would effectively create the url: "http://www.customer1234.mydomain.com" unfortunately, i have tried many ways to do this dynamically and have run into roadblocks each time. you should be able to do what you want Tim, as long as you're not going beyond that second "dot". if anyone can figure THIS one out, please let me know. ricky -----Original Message----- From: asp...@li... [mailto:asp...@li...]On Behalf Of Tim van den Hoff Sent: Monday, November 25, 2002 8:31 AM To: asp...@li... Subject: [Aspdns-users] Adding A records to a subdomain... Hello Everybody, I'm trying to accomplish this: I have a subdomain made in the regular DNS manager from win2k: clients.domain.com and I want all of my clients to get a hostname based on their IPs. So I get their IPs, replace some characters and append the string till I get: xxx-xxx-xxx-xxx.clients.domain.com Now, I want to add this hostname with the corresponding IP address to the zone. Basically this is just adding an A record, but somehow the component or the dnscmd executable won't process it. I feared it might be because the component lacks support for subdomains.... Anybody, clue? hint? solution *hopes*? Regards, Tim van den Hoff ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Aspdns-users mailing list Asp...@li... https://lists.sourceforge.net/lists/listinfo/aspdns-users |
|
From: Tim v. d. H. <ti...@vd...> - 2002-11-26 13:53:15
|
Hey, Well, maybe I didn't explain my question properly, but I want to do the same thing as you. I want to add a host to zone subdomain.domain.com, so it would be: clientID.subdomain.domain.com I get "Hostname error or Zone name syntax error or IP address error" as result. Probably the dnscmd.exe tool doesn't support this function. Using DNS Manager in win2k, you would indeed as you said add a host to a certain domain in a zone. I've been looking at another .dll from Microsoft, DnsProvider (dnsprov.dll). An article about this free component can be found at www.iisfaq.com . I think this one does the trick, only disadvantage is that supplied with the component are .vbs files, which have to be executed using cscript. Since they are capable of every function the regular DNS manager has, they are very powerfull scripts and thus potentially dangerous. Maybe we could take a closer look at the required function to add hosts to a subdomain and isolate it from the .vbs and put it into an ASP file? Let me know. Greets, Tim > -----Oorspronkelijk bericht----- > Van: asp...@li... > [mailto:asp...@li...] Namens Ricardo Pena > Verzonden: November 25, 2002 5:31 PM > Aan: Tim van den Hoff; asp...@li... > Onderwerp: RE: [Aspdns-users] Adding A records to a subdomain... > > > hey tim, > > i've been able to create a DNS record of the format: > > xxxx.domain.com > > the way to do this is to add a new "host" to an existing > "zone". so, if you have the zone "mydomain.com", and you > want something like "customer1234.mydomain.com", then you > would add a new host to "mydomain.com" by doing the following: > > dns.AddHost("mydomain.com", "customer1234" , > "xxx.xxx.xxx.xxx", "yyy.yyy.yyy.yyy", vRes2) > > the "x's" IP address would be the IP of the domain > "customer1234.mydomain.com" and the "y's" IP address would be > the IP of the DNS server machine, usually localhost (or maybe > it's vice versa - please check the docs to make sure). > > my problem is that i want to dynamically create a DNS record > of the format: > > "www.customer1234.mydomain.com" > > because there's an extra level of "dot's", i ran into the > problem. if you do this manually using the DNS manager in > Win2K, you would add a "domain" under the "zone". so, if my > "zone" is "mydomain.com", i would have to add a "domain" > under that "zone" and NOT a "host". the domain i would > create would be called "customer1234" under the zone > "mydomain.com". finally, under that domain, i would create > the host "www". in the end, it would effectively create the url: > > "http://www.customer1234.mydomain.com" > > unfortunately, i have tried many ways to do this dynamically > and have run into roadblocks each time. you should be able > to do what you want Tim, as long as you're not going beyond > that second "dot". if anyone can figure THIS one out, please > let me know. > > ricky > > > > -----Original Message----- > From: asp...@li... > [mailto:asp...@li...]On Behalf Of > Tim van den Hoff > Sent: Monday, November 25, 2002 8:31 AM > To: asp...@li... > Subject: [Aspdns-users] Adding A records to a subdomain... > > > Hello Everybody, > > I'm trying to accomplish this: > > I have a subdomain made in the regular DNS manager from > win2k: clients.domain.com and I want all of my clients to get > a hostname based on their IPs. So I get their IPs, replace > some characters and append the string till I get: > xxx-xxx-xxx-xxx.clients.domain.com > Now, I want to add this hostname with the corresponding IP > address to the zone. Basically this is just adding an A > record, but somehow the component or the dnscmd executable > won't process it. > > I feared it might be because the > component lacks support for subdomains.... > > Anybody, clue? hint? solution *hopes*? > > Regards, > Tim van den Hoff > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Aspdns-users mailing list > Asp...@li... > https://lists.sourceforge.net/lists/listinfo/aspdns-users > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Aspdns-users mailing list > Asp...@li... > https://lists.sourceforge.net/lists/listinfo/aspdns-users > |