OpenVZ Forum


Home » General » Support » Nameservers (Which IP addresses to use.)  () 1 Vote
Nameservers [message #42442] Mon, 18 April 2011 16:23 Go to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
There seems to be a little confusion amongst us newbies when it comes to things DNS. Am I wrong in assuming that when one creates a new container, as described in the wiki under Basic_operations_in_OpenVZ_environment, one is entering the domain's IP address, and the domain's own nameserver's address?

The question comes up when a host inserts two public DNS nameservers (such as one might use with their browser) for the domain's nameservers. It seems to me that the domain must connect with the whole DNS system of the Internet for its proper operation, and that this point in creating the container for the customer's set of servers is the customer domain's own nameservers and not someone elses.

Am I off base with this?

Thanks.
Re: Nameservers [message #42785 is a reply to message #42442] Fri, 27 May 2011 01:11 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
A real stumper, eh?
Re: Nameservers [message #42787 is a reply to message #42442] Fri, 27 May 2011 23:46 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
I've tried reading your question twice and still cannot understand it. Perhaps it's the terminology used? What do you mean by "domain"? Surely not a TLD or cTLD?

It would probably be the easiest if you tell us exactly what are you trying to do, with what resources (IP addresses, your network topology), what you did and what error(s) you have encountered...
Re: Nameservers [message #42788 is a reply to message #42442] Sat, 28 May 2011 03:32 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
I'm sorry for being unclear. I should have been more precise.

First, a scenario. Say you want to start a VPS hosting service. You rent some server space and begin installing the Open VZ virtualization. You are ready to setup some containers, and so begin advertising for customers.

Part of the container setup process is to define the nameservers and addresses for it.

The question becomes "Whose are those"? Obviously, it appears they should be the customer's, including the customers purchased domain name. So if the domain the customer owns is business.com and the IP is 192.168.19.x, then the nameservers could be ns1.business.com and ns2.business.com.

Therefore, it seems that you should not assign DNS addresses or names that do not belong to the customer. An example would be using those from OpenDNS. Nor should you use those that you use for your own hosting servers.

Isn't that correct?
Re: Nameservers [message #42796 is a reply to message #42788] Sun, 29 May 2011 23:36 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
KitchM wrote on Fri, 27 May 2011 23:32
Part of the container setup process is to define the nameservers and addresses for it.

The question becomes "Whose are those"? Obviously, it appears they should be the customer's, including the customers purchased domain name.


No, IP address of a container is the IP that you set aside for it and it's DNS IPs are either from your DNS (if you decide to run your own), your server provider's (same IP's as you'll see in the /etc/resolv.conf on your server) or even OpenDNS or Google's public DNS.

Your customer's domain names and their DNS have nothing to with it. Your customer might even use his VPS without his own domain - he might use a hostname you set for him or only the IP you give him. Or he might have a single domain hosted, or 200 of them. Or thousands. They might use a single or many different DNS's to point these domains to their VPS. It doesn't make any difference.

Hope this clears things a bit.

[Updated on: Sun, 29 May 2011 23:37]

Report message to a moderator

Re: Nameservers [message #42797 is a reply to message #42796] Mon, 30 May 2011 00:28 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
So, to put it another way. The containers IP address and the nameservers it is assigned are for the benefit of the container provider. However, the customer who is rented the container is able to set their own IP addresse(s) and nameserver(s) as they desire for their own domain.

What I don't understand is how those two sets of specifications are kept separate. The customers nameservers can continually be overwritten by the ones used by the service provider, as I've seen it happen with resolv.conf.
Re: Nameservers [message #42798 is a reply to message #42797] Mon, 30 May 2011 01:57 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
KitchM wrote on Sun, 29 May 2011 20:28
So, to put it another way. The containers IP address and the nameservers it is assigned are for the benefit of the container provider.

Container won't work without them.

Quote:
However, the customer who is rented the container is able to set their own IP addresse(s) and nameserver(s) as they desire for their own domain.

Yes.

Quote:
What I don't understand is how those two sets of specifications are kept separate.

You don't need a domain in order to have a container. You don't even need a domain in order to reach a container. The DNS for a domain and the DNS for a container are set in different places, they are completely different things.

Quote:
The customers nameservers can continually be overwritten by the ones used by the service provider, as I've seen it happen with resolv.conf.

The contents of the resolv.conf can change, yes. As long as the entries are valid, the change shouldn't affect the container much. If the customer happens to have a domain registered somewhere, this change won't affect the domain in any way. The equivalent of this would be changing the resolv.conf from OpenDNS public DNS to Google's public DNS. Both entries should work pretty much the same.


Try to imagine a few different scenarios:

1) try to think of a situation where a container customer owns no domains. Eliminate the existance of a domain from this scenario alltogether. Assume that the customer will only use an IP to reach his container. How should the container be set up? You'll understand faster if you start this way...

2) after the previous imaginary container is set up and after the customer has started using it, imagine that the customer suddenly remembers he has registered a domain some years ago at some third party registrar. This registrar offers the customer to use registrar's DNS for the domain. What does he need to do in order to point this domain to his existing and fully operational container? You'll see that he shouldn't need to change the resolv.conf at all.

3) then a third scenario - customer decides he wants to run his own DNS inside the container, he wants ns1.hisolddomain.com and ns2.hisolddomain.com to be used for hisolddomain.com. What does he need to do? You'll see that he still doesn't need to change the resolv.conf.

4) the last scenario - customer decides he wants to use his own DNS inside his resolv.conf within his container. What does he need to do?

Once you can imagine all four scenarios, you're pretty much set to go as far as the basic DNS is concerned. It would be best if you could try this out on some test server or a virtual machine at home...

Hope this helps.
Re: Nameservers [message #42799 is a reply to message #42798] Mon, 30 May 2011 06:57 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
Thanks very much. I appreciate the instruction. I will spend some time in thinking that thru and get back to you.
Re: Nameservers [message #42810 is a reply to message #42798] Mon, 30 May 2011 22:19 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
After a little thought, a couple questions come to mind.

1. Can't the VPS provider access any container right from their root account? If so, they don't need any DNS nameservers or addresses. Therefore, the only valid reason for having them is for the customer to reach their rented container.

2. If the provider enters the customer's domain info and the customer's nameservers into the container setup instead of any others, everyone could still access the container.

Is that not correct?

[Updated on: Mon, 30 May 2011 22:19]

Report message to a moderator

Re: Nameservers [message #42818 is a reply to message #42442] Tue, 31 May 2011 11:58 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
KitchM wrote on Mon, 30 May 2011 18:19
After a little thought, a couple questions come to mind.

1. Can't the VPS provider access any container right from their root account? If so, they don't need any DNS nameservers or addresses. Therefore, the only valid reason for having them is for the customer to reach their rented container.

Also, networking within a container won't work without a properly set up resolv.conf. Ie. the provider could use vzctl to enter the container but he wouldn't be able to use yum, wget or any other similar tool within a container. Simply said - container would have no internet access.

Quote:
2. If the provider enters the customer's domain info and the customer's nameservers into the container setup instead of any others, everyone could still access the container.

Is that not correct?

I still dont't understand where would you enter the customers domain, what would you use it for? You could use it for a host name I suppose, but only if the domain already has a working DNS, and the customer has already set up a new A record.

If you use customer domain's DNS's IPs to resolve DNS within a container, what will you do in case if:
- customer doesn't have a domain at all
- customer's domain doesn't have a DNS (ie. he plans to run his own or he hasn't activated the domain yet)
- customer domain's DNS provider doesn't allow recursive DNS queries.

That's from the top of my head, I'm sure there are other scenarios where this would fail to work completely too.

Perhaps someone could provide a better answer if you tell us why wouldn't you want to use your own DNS (or your server's providers) or ie. OpenDNS or Google's public DNS to resolve DNS within a container..?
Re: Nameservers [message #42821 is a reply to message #42818] Tue, 31 May 2011 17:14 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
Perhaps the easiest way to understand this problem is to see it after the fact. Let us say that a customer rents a container and then sets up his own domain with his own nameservers, etc.. At that point, the providers DNS settings become irrelavant and the continual use of them will continually mess up the customer's resolv.conf for no good reason.

The provider should ask certain questions prior to setting up the container anyway:
1. What OS do you want to use?
2. Which control panel do you want?
3. Do you need any servers setup?
4. Do you have your own domain?
5. Did the customer have their own nameservers listed?

I think I understand that the process may become too complex for the provider to handle. But at the very least, there needs to be a way for the provider to change the settings of the container to match the customer's wishes after all is set up.

[Updated on: Tue, 31 May 2011 17:15]

Report message to a moderator

Re: Nameservers [message #42822 is a reply to message #42442] Wed, 01 June 2011 01:26 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
The customer should have control over it (without getting overwritten), that's for sure, since there can be cache and timing differences, etc.

But basically, unless the customer is spoofing his own DNS, either provider's or customer's resolv.conf settings should work just the same.

I guess many providers don't have the means to provide such fine grained control without throwing their own user support in the raging fit. Control panels seldom provide that much detail.

I'm glad ours does Cool
Re: Nameservers [message #42826 is a reply to message #42822] Wed, 01 June 2011 21:37 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
Do you have a special control panel?
Re: Nameservers [message #42827 is a reply to message #42442] Wed, 01 June 2011 23:17 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
Yes, an in-house solution. It's a limited public beta right now.

We are actually considering branching the development into a separate department and offering it to the public. I'm just not sure how much space is there on the market for another control panel.
Re: Nameservers [message #42828 is a reply to message #42827] Thu, 02 June 2011 00:18 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
When I was wanting to venture into the hosted VPS arena with my small need for domain hosting, I looked for a good control panel. I checked out close to a dozen and tried a few of the better ones.

Believe me when I say, there is always room for improvement. Especially in that category. Even the ones for commercial sale are not that good.

As most coders are clueless about what the user needs, this category is no different. I say "Go for it"; maybe you folks will have a more intuitive view of things.
Re: Nameservers [message #42829 is a reply to message #42442] Thu, 02 June 2011 02:02 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
That's the angle I have been thinking off. I think we can give the public a really good control panel, for both admins and users, but the market is harsh when it comes down to money. We'll see Smile

[Updated on: Thu, 02 June 2011 02:03]

Report message to a moderator

Re: Nameservers [message #42830 is a reply to message #42829] Thu, 02 June 2011 22:09 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
If OpenVZ is free, would the control panel be free as well?
Re: Nameservers [message #42831 is a reply to message #42442] Fri, 03 June 2011 04:18 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
Nothing has been decided on the pricing as of yet, but I doubt we can find a business model that would enable us to offer it for free. OpenVZ has Parallels and Virtuozzo behind the scenes, we don't.
Re: Nameservers [message #42839 is a reply to message #42442] Sun, 05 June 2011 19:19 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
Here is the specific error that is created by the problems of the DNS settings as entered by the container creator. It continually comes back. This is from Virtualmin:


Checking Configuration

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..

Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page.

.. your system is not ready for use by Virtualmin.


What a pain in the neck! That's why the container creation should have nothing to do with the files that the customer puts in the container.
Re: Nameservers [message #42841 is a reply to message #42442] Mon, 06 June 2011 18:25 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
Technically speaking, Virtualmin should work without this. You could either file it as a bug with Virtualmin's developers and/or add a short script to your /etc/rc.d/rc.local to overwrite your resolv.conf at container startup. This, if I'm not mistaken, comes after openvz container startup does it's magic.
Re: Nameservers [message #42842 is a reply to message #42841] Mon, 06 June 2011 19:59 Go to previous messageGo to next message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
I actually know that this happens repeatatively, well after the container has been filled with servers and such, else the Virtualmin program would not continually see this change being made. Therefore, the change to the file is caused by some part of the OpenVZ code.
Re: Nameservers [message #42843 is a reply to message #42442] Mon, 06 June 2011 20:28 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
Yes, openvz does this. It should happen after a container reboot, that's why I'm suggesting creating a script inside a /etc/rc.d/rc.local file, within a container.
Re: Nameservers [message #42844 is a reply to message #42843] Mon, 06 June 2011 20:41 Go to previous message
KitchM is currently offline  KitchM
Messages: 13
Registered: April 2011
Junior Member
Instead of having to create a script, can't the user just turn off this annoying and unwanted behavior?
Previous Topic: enter failed: unable to exec sh: No such file or directory
Next Topic: Install on SL6/RHEL6
Goto Forum:
  


Current Time: Mon Jul 21 15:47:25 GMT 2025

Total time taken to generate the page: 0.23199 seconds