BIND DNS and Nameservers

8 posts / 0 new
Last post
#1 Wed, 05/03/2017 - 18:54

BIND DNS and Nameservers

HI guys, I dont actually know how to ask this question i will muddle my way through it. As i may have already stated somewhere else, I build wordpress websites and have been a reseller in the past. I have played around quite a bit with LAMP servers on my home network, however, my understanding of dns is limited by my innability to properly visualise the working model.

I note that we are supposed to have more than one name server for dns. Can this be achieved from a single server with multiple virtual servers on, for example, Google Cloud Compute? So the single Google Cloud Compute instance would be the only external ip address...all of the other ones would be internal ones i create myself on my own little network contained within this instance. So the model would be:

1 GCC instance (A single external/public ip address, Google internal network ip address) a. webhosting server (create my own internal network ip address.3) b. name server 1 (create my own internal network ip address.1) c. name server 2 ( create my own internal network ip address.2) d. mail server (create my own internal network ip address.4)

I am asking this because i am really unsure about nameservers and am trying to understand exactly how they may be configured from a networking point of view.

My assumption is that I register a "nameserver domain" with a registrar then point 2 A records at my own GCC name servers for that domain (ie,

What i want to do, is instead of using multiple GCC instances, i want all of the above to be on a single GCC instance, however, have my own individual virtual machines on that instance to perform the above tasks (ie shared webhosting clients, mail, nameservers etc). These virtual servers (2 of which would be my nameservers) would only have unique internal ip addresses as their external ip address is the Google Cloud Instance IP.

Can i create my own internal ip addresses for my network for all of the above tasks and then access them via a registrar?

IF the above is yes, can this all be done using webmin/virtualmin or do i need to use cloudmin too?

At present i am finding a lot of information about all of this, however, it a large amount of separate articles that i am having to piece together to form the model i am after. Because I am having trouble visualising if anyone could create a visual image showing how this works (with webmin) that would be really appreciated (post a link to dropbox or something for me to download..or point me in the direction of a youtube video that explains it all)

EDIT I guess what i am also asking is, are nameservers that are used by registrars machines with ip addresses that are sold to them by an international allocation of ip addresses? If so, does this mean that i have to use my registrars 3 nameservers to point at my own 3 nameservers, or do i need just 1 nameserver record at my registrar pointing to my domain name that is split up into 2 or three name servers with ip addresses on my own network? (hope this is making sense)

I had thought that perhaps a domain, could be the basis for any dns and nameserver searches...and that once the domain registrar is found and the clients browser is pointed at the external domain ip address, any of the internal domain namservers and webhosting accounts contained on that Google Cloud instance internal virtual servers network could then be resolved...oh goodness im lost already!!!

kind regards, Adam.

Wed, 05/03/2017 - 20:06
Diabolico's picture

To be honest i have hard time to understand your post but i can give you some general tips about nameservers:
1. Each nameserver can be "connected" with one IP.
2. Some registrars allow more than one nameserver per IP, e.g. two nameservers share same IP. Honestly this doesnt help anything. For redundancy each nameserver should have a separate IP and preferably from different subnets. This means each IP should be from different datacenter or even different geo location. If you cant achieve such scenario then one nameserver or two sharing same IP its basically the same thing.
3. IP must be public and usually is "given" to you by your hosting company when you rent a server. Other case would be if you have your own IP block(s), but then you must find a datacenter who is willing to publish your AS number/IPs and of course you will have to pay for this service.

If you think to have a "hosting" from your home just forget about that. This is recipe for disaster, your ISP is probably blocking quite some ports and if someone else isnt paying the electricity bill (like parents) it will cost you more than renting decent VPS or dedicated server.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Thu, 05/04/2017 - 06:02
unborn's picture

simple short and sweet:

  • your server should be named
  • your ns1 should be
  • your ns2 should be

you can use single ip for all of them (it worked for me for many years) also those you need to setup for control panel with your regstar and then you need to tell virtualmin to use that right after installation process (like continue install from within virtualmin cp)

@diabolico - I did not understand whole post of the user however I do host all my sites from home and it works for me since 2012... I did actually done research on my own and also done watt readings and calculations..

Edit : I removed the link to my blog as I wont be accused from selling etc..

Configuring/troubleshooting Debian servers is always great fun

Thu, 05/04/2017 - 06:56 (Reply to #3)

i think you guys have managed to simplify my confused mess of a a lot less words too.

  1. I am not hosting from home

  2. I do have access to as many ip addresses as i need however, they come as a result of adding new instances on my Google Cloud Platform.

  3. I was considering using a single nameserver, however, i am concerned that clients are likely to have problems at some point with this choice...particularly as they would be setting up their service with me using WHMCS

  4. My WHMCS subscription is to be installed on its own production server (considering having this elsewhere) and used to control my virtualmin, synergywholesale registrations for clients (thats the wholesaler/registrar I am currently reselling for), mail service deployments etc. Essentially i will just install the relevant modules for WHMCS on my production servers (which i have had no problem doing in the past with Vestacp for example)

  5. Uborn...I will try for the single IP address for now and see how it goes. In the meantime, i currently have setup another Google Cloud instance with a unique ip address and it has webmin installed on it for running a primary and secondary ns service. It is currently on my webmin servers network as a DNS slave. I havent really got a handle on what i am doing with it yet however.

  6. On my main system, i have used virtualmin to setup another virtual server and installed wordpress on this server using built in script. Whilst this part i understand, the BIND dns part im struggling with at this stage. Instead of adding ns records at the domain registrar for the wordpress website i installed, i was hoping that for now i could simply point A records at the server and it would still resolve (as it did when i did this whilst not running BIND yesterday), however, what has happened is a bit of a fail.

I used "Virtualmin website previewer" to go to the wordress website. The following is the soon as i saw the url, i wondered what may happen.

https://<"my webmin server external ip address">:10000/virtual-server/link.cgi/<"mywebminserver internal ip address">/http://<" website">/

"Connections to IP addresses not on this system are not allowed :" (the ip here is the internal one for my webmin instance)

Do i need to edit "Existing DNS Zones" from Servers>BIND DNS Server? (i see that there is an entry "127 Master"...should this be changed?), or is this just a result of me not having added my nameservers at the registrar for the new installed website i just installed using virtualmin?

Am i right that if BIND is turned on, the hosts file is not used?

Zone Type Root zone Root 0 Master 127 Master

Zone Type 255 Master localhost Master

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

Thu, 05/04/2017 - 07:03
unborn's picture


We all have as many IPs we want in internal network and your ip is just internal network which will never work - what is your external IP? - perhaps you do your own google research about this. YOU SHOULD DO THE SAME FOR BIND SETTINGS - 127 and other zones man.. sorry are you understand the dns and such bind settings????

Configuring/troubleshooting Debian servers is always great fun

Sat, 05/06/2017 - 18:44

Hi Unborn, thanks for your reply...Virtualmin allocated the internal ip address in the URL.

As i said, when i saw this i wondered what may happen as it didnt seem right to me when the internal network ip address appeared.

I havent used BIND before, and my exposure to control panels is only as a reseller using cpanel. Are you saying that in order to use BIND, all of the virtualmin>virtual servers must have their own external ip address? (doesnt BIND also map an external ip address to an internal website?)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

Fri, 05/12/2017 - 04:35
Joe's picture

For preview (and some other features) to work, you'll need to tell Virtualmin that your external IP is different from your internal IP. The Validation feature should detect this problem.

You can fix it in the Virtualmin Configuration in the "Default IP address for DNS records" option.


Check out the forum guidelines!

Fri, 05/12/2017 - 04:37
Joe's picture

And, about your question about hosts...hosts is used first, DNS is queried second. At least, that's usually the default search order in nsswitch.conf. It is configurable, but there's no reason to change it.

You're just seeing weird behavior because you've got a different internal and external IP address, and Virtualmin doesn't know about it.


Check out the forum guidelines!

Topic locked