Possible nameserver cheat

8 posts / 0 new
Last post
#1 Wed, 04/15/2009 - 09:06
paul.kelly

Possible nameserver cheat

I want to create a couple nameservers, but do not want to dedicate server space/ip addresses.

My VPS host suggested this as a solution.

1 The host supplies nameservers that I can use. 2 if I setup ns1.mydomain.com and ns2.mydomain.com with minimal features, is there a way in VM to pass/forward all traffic straight through to the true nameservers, via url or IP address.

This, on paper, would allow me to supply my nameservers to clients, however, utilise my hosts.

A Would this work B How would I do this on WM/VM

Paul

Wed, 04/15/2009 - 10:57
Joe
Joe's picture

BIND has an option called "forwarders" which forwards requests that it doesn't know how to answer for to one or more additional name servers. But, I think you're going about things in the wrong way...see below for why.

Nothing to really do in Virtualmin...just set it up in the Webmin BIND module in the Forwarding and Transfers page (just add the IP addresses of the other servers).

You'd then disable DNS in Virtualmin, since there's nothing useful to be done on your server. Note that this means that Virtualmin can no longer manage your DNS records for you (they're on a system that Virtualmin has no access to).

But, if you're going to not locally host DNS, I would suggest you just disable BIND entirely and use their servers for everything. No forwarding involved at all.

Assuming they allow you to create arbitrary records in their DNS servers, you can just add ns1 and ns2 in your zone, and use those for your glue records and such. I don't see any benefit to having a forwarding server that does nothing but forward...you don't get any control over your zones and Virtualmin can't manage your records, but you still give up some memory and CPU for the BIND process.

--

Check out the forum guidelines!

Wed, 04/15/2009 - 11:31 (Reply to #2)
paul.kelly

Joe,

thanks for the quick response.

The purpose of doing this is to give the impression I have my own dns servers, which is more for marketing than practicality!

As for setting up in BIND, do I add the 2 IP's to 'Servers to forward queries to' area?

As for disabling DNS in Virtualmin and not managing my own DNS records, what are the ramifications of this/what does it actually mean?

Looking at e'xisting dns zones' in bind, i do have ns1&ns2.mydomain as type 'master' - is this right?

Wed, 04/15/2009 - 11:51 (Reply to #3)
Joe
Joe's picture

<div class='quote'>The purpose of doing this is to give the impression I have my own dns servers, which is more for marketing than practicality!</div>

I'm not sure how forwarding is any more effective at that than simply setting up A records for your hosts DNS servers. Either way you get nameservers called ns1.yourdomain.com and ns2.yourdomain.com (assuming you have the ability to create arbitrary records with your host...and if you don't, you probably can't use their servers anyway). And, of course, either way you don't actually have any control over your zones other than what the hosting provider permits.

If you're going to run BIND, you should use it for name service for your zones (though you can choose to forward, so that it doesn't have to work as a recursive name server). A handful of zones is not going to make a big difference in resource usage (but recursive service could). If you're not going to use the local BIND and are instead going to host your zones in your hosting providers DNS server you should not run BIND at all. There is no sensible middle ground.

<div class='quote'>As for setting up in BIND, do I add the 2 IP's to 'Servers to forward queries to' area? </div>

Yes.

<div class='quote'>Looking at e'xisting dns zones' in bind, i do have ns1&amp;ns2.mydomain as type 'master' - is this right?</div>

No. Those should not be zones (a zone is where names live; ns1.mydomain.com should be a name). The zone would be &quot;mydomain.com&quot;, and you'd want an A record for ns1 and ns2 within that zone. You'd also want an NS record for each in the same zone.

But, I think you're misunderstanding what's going on here, and the various pieces of advice you're getting.

You've just explained that you don't want any zones on your DNS server, right? And now you're asking how zones ought to be setup. If you're going to have zones on your server, you can use your server for DNS, and won't need the hosting providers servers. If you're not going to have any zones on your server, then you don't need to have BIND running.

--

Check out the forum guidelines!

Wed, 04/15/2009 - 11:53 (Reply to #4)
Joe
Joe's picture

Oh, yeah, if you do decide to host your own DNS, you don't want to create the mydomain.com zone yourself. Let Virtualmin do it when you create that virtual server, and then you can add ns1 and ns2 using the BIND module, and edit the configuration of Virtualmin (in Server Templates) to use those two names for NS records.

--

Check out the forum guidelines!

Wed, 04/15/2009 - 12:06 (Reply to #5)
paul.kelly

Joe,

do you meant that, on my VPS, I could run my own DNS servers off of one IP address? I didnt think that was possible.

I am getting confused, though!

Getting back to basics, when you say 'set up an A record for your hosts DNS servers' how is this done? If I went to the domain registrar (who is not my host), for the master domain, do you suggest setting it up as DNS forwarding, not changing the nameservers (to my hosts ones) or is it a WM process?

Wed, 04/15/2009 - 19:16 (Reply to #6)
andreychek

Well, the problem right around now is usually that the problem sounds more complicated than it is :-)

If you're not too familiar with DNS though, I really enjoyed O'Reilly's &quot;DNS and BIND&quot; book, it was quite helpful for leaning the ins and outs of all this.

So, we're talking about running DNS elsewhere. That's fine -- you can disable DNS management in Virtualmin, and perhaps disable BIND altogether. Just setup your /etc/resolv.conf with some external nameservers.

The only problem here is that you'll end up needing to manually manage DNS records, Virtualmin won't be able to do it for you.

Outside of that, it's just a matter of setting up the DNS records that Virtualmin would normally be doing for you -- &quot;A&quot; records, &quot;CNAME&quot; records, and all the other core DNS stuff.

If you want your domain name to be what your customers use for nameservers, that's fine, you'll just need to setup an &quot;A&quot; record in the DNS -- associating the IP address with the name you wish to use. How to do this depends on your DNS provider.

Lastly, if you want your customers to be using your domain name as their nameserver, you'll probably need to register &quot;ns1.YOUR_DOMAIN.com&quot; and &quot;ns2.YOUR_DOMAIN.com&quot; with your registrar, so that they point to the IP addresses hosting your DNS.

I hope that helps clear things up a bit! :-)
-Eric

Sun, 04/19/2009 - 02:30
paul.kelly

I have now sorted it out.

my VPS utilises HyperVM. There is a DNS part to this, which creates a full set of records for a domain, including ns1, ns2 etc.

Using this, I have now been able to set up my 'servers'.

Topic locked