Linode Forum Index Linode Forum
Linode Community Forums
 


Programatically create subdomains with their own nameservers

Click here to go to the original topic
Goto page 1, 2, 3  Next
 
       Linode Forum Index -> Linux Networking
Author Message
tommedema



Joined: 03 Nov 2010
Posts: 23
Location: 55

Posted: Sat Dec 11, 2010 4:27 pm    Post subject: Programatically create subdomains with their own nameservers  

Hi there,

I'm trying to setup a little service where people can register a subdomain and use it for their server by setting the corresponding nameservers of this server.

I'm wondering, how can I programatically create these subdomains with their own nameservers in an efficient way? Such that it'd be possible to have eg. a million of these subdomains?

Any advice is appreciated.

Thanks.

- Tom
Back to top  
hoopycat



Joined: 30 Aug 2008
Posts: 1294
Location: Rochester, New York

Posted: Sat Dec 11, 2010 9:56 pm    Post subject:  

For a good look at how DNS works and some of the tricks you can (and cannot) use, especially in large-scale situations like this, you'll probably want http://oreilly.com/catalog/9780596100575 at the ready.

I haven't personally used it in awhile, but take a look at PowerDNS. It has been around awhile, and supports a number of databases on the back end, SQL and otherwise.
Back to top  
jebblue



Joined: 23 May 2010
Posts: 112

Posted: Sun Dec 12, 2010 1:06 pm    Post subject:  

hoopycat if you ask people to not redact their host name when posting, you are asking them to not post it. Is that what you intended?

tr.v., -dact·ed, -dact·ing, -dacts.

1. To draw up or frame (a proclamation, for example).
2. To make ready for publication; edit or revise.
Back to top  
pclissold



Joined: 24 Oct 2003
Posts: 877
Location: Netherlands

Posted: Sun Dec 12, 2010 2:28 pm    Post subject:  

Merriam-Webster says:
Definition of REDACT
transitive verb
to put in writing : frame
to select or adapt (as by obscuring or removing sensitive information) for publication or release; broadly : edit
to obscure or remove (text) from a document prior to publication or release
Back to top  
hoopycat



Joined: 30 Aug 2008
Posts: 1294
Location: Rochester, New York

Posted: Sun Dec 12, 2010 11:21 pm    Post subject:  

Peter's 3rd definition is the one I'm using. Get a better dictionary :-)
Back to top  
tommedema



Joined: 03 Nov 2010
Posts: 23
Location: 55

Posted: Mon Dec 13, 2010 11:56 am    Post subject:  

hoopycat wrote: For a good look at how DNS works and some of the tricks you can (and cannot) use, especially in large-scale situations like this, you'll probably want http://oreilly.com/catalog/9780596100575 at the ready.

I haven't personally used it in awhile, but take a look at PowerDNS. It has been around awhile, and supports a number of databases on the back end, SQL and otherwise.

Hi HoopyCat,

Thanks for your literature suggestion.

Before I order this book, I would like to know if managing DNS like this is possible with Linode (in an efficient enough way to create a whole lot of subdomains with their own nameservers).

- Tom
Back to top  
bryantrv



Joined: 11 Dec 2009
Posts: 126

Posted: Mon Dec 13, 2010 1:21 pm    Post subject:  

I would bet you would have to run your own name server to do what you want, rather than using the Linode ones.
It certainly should be possible, though.
Back to top  
tommedema



Joined: 03 Nov 2010
Posts: 23
Location: 55

Posted: Mon Dec 13, 2010 1:56 pm    Post subject:  

bryantrv wrote: I would bet you would have to run your own name server to do what you want, rather than using the Linode ones.
It certainly should be possible, though.

Apologies if this makes no sense, but can I run my own dns server on a linode server?

Thanks.
Back to top  
Guspaz



Joined: 26 May 2009
Posts: 1147
Location: Montreal, QC

Posted: Mon Dec 13, 2010 2:26 pm    Post subject:  

tommedema wrote: bryantrv wrote: I would bet you would have to run your own name server to do what you want, rather than using the Linode ones.
It certainly should be possible, though.

Apologies if this makes no sense, but can I run my own dns server on a linode server?

Thanks.

A linode can do anything that any other server can do, so yes, you can.

Are you sure you need to, though? I'm not entirely clear on what you're trying to do. You want to create subdomains and use *those* as name servers for customer domains? Is there a reason you can't use Linode's name servers?

Or do you just want to create subdomains for the websites themselves, and want to automatically create the subdomains for customers to access their webpages? You can do that with Linode's name servers through the API, I believe.
Back to top  
tommedema



Joined: 03 Nov 2010
Posts: 23
Location: 55

Posted: Mon Dec 13, 2010 2:32 pm    Post subject:  

Guspaz wrote: tommedema wrote: bryantrv wrote: I would bet you would have to run your own name server to do what you want, rather than using the Linode ones.
It certainly should be possible, though.

Apologies if this makes no sense, but can I run my own dns server on a linode server?

Thanks.

A linode can do anything that any other server can do, so yes, you can.

Are you sure you need to, though? I'm not entirely clear on what you're trying to do. You want to create subdomains and use *those* as name servers for customer domains? Is there a reason you can't use Linode's name servers?

Or do you just want to create subdomains for the websites themselves, and want to automatically create the subdomains for customers to access their webpages? You can do that with Linode's name servers through the API, I believe.

Hi again,

I'm not trying to do either of those.

Basically, I want to allow other people to create a subdomain and then setup their own nameservers (aka the nameservers of their servers, not mine) for the subdomains that they created.

Thus, a subdomain would function like a top level domain, where the registrant can setup his nameservers so that the domain will lead to the corresponding servers.
Back to top  
Guspaz



Joined: 26 May 2009
Posts: 1147
Location: Montreal, QC

Posted: Mon Dec 13, 2010 4:28 pm    Post subject:  

But... You can't have a name server for a subdomain...

You just want your clients to be able to create a subdomain under your domain, and point it to their own IP? That's trivial, should be able to do it with the API. You just need to add A-record CRUD support to your application for linode's DNS services.
Back to top  
tommedema



Joined: 03 Nov 2010
Posts: 23
Location: 55

Posted: Mon Dec 13, 2010 4:52 pm    Post subject:  

Guspaz wrote: But... You can't have a name server for a subdomain...

You just want your clients to be able to create a subdomain under your domain, and point it to their own IP? That's trivial, should be able to do it with the API. You just need to add A-record CRUD support to your application for linode's DNS services.

I realize that.

However, do you really think the linode DNS API is meant for bulk records? I want this to be setup correctly, so that it can (hypothetically) expand to hundred of thousands of subdomains with their own IPs.
Back to top  
Stever



Joined: 07 Dec 2007
Posts: 337
Location: NC, USA

Posted: Mon Dec 13, 2010 4:58 pm    Post subject:  

Guspaz wrote: But... You can't have a name server for a subdomain...
Ummm.... why not?

Not that it is necessarily a good idea, but AFAIK it can be done.
Back to top  
bryantrv



Joined: 11 Dec 2009
Posts: 126

Posted: Mon Dec 13, 2010 5:07 pm    Post subject:  

A side note- I'm not sure you could buy hundreds of thousand of IP addresses, and I'm near certain you couldn't in any single Linode data center.
I really cannot thing of a legit reason to need that many.
Back to top  
Guspaz



Joined: 26 May 2009
Posts: 1147
Location: Montreal, QC

Posted: Mon Dec 13, 2010 5:11 pm    Post subject:  

Stever wrote: Guspaz wrote: But... You can't have a name server for a subdomain...
Ummm.... why not?

Not that it is necessarily a good idea, but AFAIK it can be done.

Hmm, didn't realize you can do that. But it's strictly a redirect; the root server is still going to point to your name server, and only when the client queries your name server will it find out that it has to query yet another name server to get info on the subdomain.

tommedema wrote: I realize that.

However, do you really think the linode DNS API is meant for bulk records? I want this to be setup correctly, so that it can (hypothetically) expand to hundred of thousands of subdomains with their own IPs.

Well, since Linode won't give you hundreds of thousands of IPs, they might not be happy that you're using their DNS servers to host hundreds of thousands of non-linode IPs...

You should ask them directly.

EDIT: More to the point, I'm not sure anybody is going to give you hundreds of thousands of IPs, not with IPv4 exhaustion 71 days away.
Back to top  
 
       Linode Forum Index -> Linux Networking Goto page 1, 2, 3  Next
Page 1 of 3