Name server setting, hostname and DNS

6 posts / 0 new
Last post
#1 Sat, 05/05/2012 - 03:11
adrian.alecu

Name server setting, hostname and DNS

I have searh on forum but i did't find, i want to setup a DNS i want to put in my WebMin with Virtualmin my own name servers, ns1.mydomain.com and ns2.mydomain.com and i need to know where i need to setup these so to be default when i add domains name to have this name server.

How to do this?To add a domain name as virtual server to Virtualmin and then edit on BindDNS the name servers and A record and other , or to add in BindDNS as master and then slave this name server?

I have try to add as master then slave and its wont working because i can add the same domain name.

So please help me with this so i can know where i can start and also how i can setup my name server so when i add a new domain to have the default name server that i have setup ns1 and ns2 from mydomain.

From my Server Template default settings i cannot add this name server settings.

I must say that from the start my operating system get the name of the server and alos name server other then i need so after i setup these things when i startup Virtualmin then i cannot setup my own name server, so where i can fiind this? and what is the step for that.

If you can explain me what for Master and Slave in BindDNS server? and also Root zone if i need or not these? i only need to have 2 name server so i can have my default name server ns1.mydomain.com and ns2.mydomain.com so if i need also of these if anybody can explain me becuase i have try and is not working as they do in CPanel and i need to know the basic and how to setup these.

I have search all over the internet and i did;t fiind a tutorial where to say exactly or how to add or sett my dns and create my own name server and what is the step .

So if you can help me please in that problem.

Thanks very much!

Sat, 05/05/2012 - 03:20
Locutus

First of all, "ns1.mydomain.com" and "ns2.mydomain.com" need to be names that are already resolvable and point to the correct IP addresses of your two servers.

Then it's merely a matter of a) putting "ns1.mydomain.com" in the server template, section "BIND DNS Domain", field "Master DNS Server Hostname: Hostname" (not automatic), and b) setting up BIND cluster replication.

For the latter, you need Virtualmin on the master and at least Webmin (Virtualmin works too) on the slave. Enter the slave in the master's Webmin, section "Webmin / Webmin Servers Index", then you can add it as a cluster slave in "Servers / BIND DNS Server / Cluster Slave Servers".

Once you've properly done that, the slave will be automatically added as NS entry in newly created zones, be allowed zone transfers, and new zones created on the master will automatically be created on the slave too.

For further information, Eric will certainly point you to some FAQs here on the Virtualmin page. If you need further background information on operating BIND, which is not trivial, you should check for tutorials on that on the web.

Sat, 05/05/2012 - 03:34
adrian.alecu

The other things i know how to do it but i dont understand how i will do and where i can find this? how to set Bind cluster replication? And where i will ad first VIrtualmin as the master?because in WebMin menu i have at the Cluster menu only these:

Cluster Change Passwords Cluster Copy Files Cluster Cron Jobs Cluster Shell Commands Cluster Software Packages Cluster Usermin Servers Cluster Users and Groups Cluster Webmin Servers

So where i will add Virtualmin? i will create and ad a domain name for that in Virtualmin?

Sat, 05/05/2012 - 04:19
ronald
ronald's picture

Locatus explained it very well however Ill try to do the step by step guide

By default, Virtualmin will use the system's hostname in the primary NS and SOA records for new DNS domains it creates. So if your machine is called ns1.domain.com it will use this as your primary nameserver and you only need to add your 2nd NS or DNS server.

Is your machine is called "server.domain.com" then you need to change that.
Go to Virtualmin - System Settings - Server Templates - click on Default Settings - In the drop down choose BIND DNS domain - Find on that page "Master DNS server hostname" - and instead of Automatic, choose Hostname and fill in your primary NS record: ns1.domain.com

If you do not have a second server as slave DNS then on that same page, find: Additional manually configured nameservers and in that box add the ns2.domain.com

If you do have a second server as your slave DNS server then go to Webmin - Webmin - Webmin Servers Index - click on Register a new server and fill in the information.(Note: Make fast RPC calls? Set this to Yes just in case)
Once Webmin can connect then go to Webmin - Servers - BIND DNS Server - In the right pane, click Cluster Slave Servers and fill in the Cluster slave server options
Create secondary on slave when creating locally? Yes
Create all existing master zones on slave? Yes
Name for NS record: ns2.domain.com

Your slave DNS server's hostname should be set to ns2.domain.com of at least be configured to use that as NS record like explained above, e.g same procedure..

Before all this your ns1 and ns2 records must be registered as nameservers at your ISP. If you bought this domain at godaddy then log in to your godaddy's panel and register your nameservers. IF you bought your domain somewhere else and your ISP does not offer this option, ask them to do it or move your domain to godaddy or namecheap.

Not necessary but I do this anyways is to go to webmin - Networking - Network Configuration - Host Addresses - Add a new host address - Fill in your IP and Hostname: ns1.domain.com, ns1 and click create. Then leave that section/page and however you do this do NOT click on Apply configuration on the main page as you will loose access to your machine.

Sat, 05/05/2012 - 06:43
Locutus

ronald explained it even better. ;)

Just one comment from my end, about something that might be unclear. At least I found it a bit ambiguous and I understood it only because I know what he meant. ;) ronald said "If you do not have a second server as slave DNS. then..."

With that he meant like "if your secondary DNS server is NOT operated directly by you, so you cannot install Webmin to use the cluster slave feature, then...".

Sun, 06/24/2018 - 13:36
penravis

Hi Ronald,

New to Virtualmin / Webmin.... but working on it got to know somethings little better.

Have installed virtualmin /webmin and stuck at post installation setup. I have registered my NS at domain registrar site and tried to use the nameservers but get that virtualmin system could not resolve this nameservers kind of a message. I have keyed in the domain name at intoDNS and could see the nameserves reflected there...

My doubt or question is : is reflection of nameservers meant nameservers have been properly propogated or is it only a listing ? Or should i wait for some further process till actual propogation takes place ? It has taken more than 40 hours and i could not install virtualmin with NS updation.

Is there any way to check the propgation of Nameservers other than than this ?

Ravi Pendyala

Topic locked