• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How Is A DNS NameServer Created In Plesk?

NeuroPsyche

Regular Pleskian
I have about 50 domains on one Plesk server and I'm starting to get really tired of maintaining
dns records.

Is it possible to setup 1 domain on a Plesk server to use it for the nameserver for all domains that are hosted?

Ex.
www.mydomain1.com > this is domain #1 on plesk server
www.mydomain2.com > ths is domain #2 on plesk server
ns1.mydomains.com > this would be the main nameserver


Ex.
ns1.mydomains.com would be nameserver for all 50 domains.
One would go into the registrau and set all the domains such as www.mydomain1.com, www.mydomain2.com, etc to use ns1.mydomains.com for the name servers.

Right now I use the domain as the nameserver.
So, ns1.mydomain1.com is the nameserver for www.mydomain1.com
... and ns1.mydomain2.com is the nameserver for www.mydomain2.com ... and so forth.

...but this gets really boring doing the same thing for all 50 or so domains.
I want to create one domain, such as www.mydomains.com to be the primary domain for being a nameserver.

I know this is possible and its probably a lot easier than I think. I'm not sure if the dns mode for the domain
would be switched to secondary instead of primary, but then, how to I make the one domain the primary for all?

I hope I don't have this too confusing... sorry.

Thanks a bunch!
 
I have about 50 domains on one Plesk server and I'm starting to get really tired of maintaining
dns records.

Is it possible to setup 1 domain on a Plesk server to use it for the nameserver for all domains that are hosted?

Ex.
www.mydomain1.com > this is domain #1 on plesk server
www.mydomain2.com > ths is domain #2 on plesk server
ns1.mydomains.com > this would be the main nameserver


Ex.
ns1.mydomains.com would be nameserver for all 50 domains.
One would go into the registrau and set all the domains such as www.mydomain1.com, www.mydomain2.com, etc to use ns1.mydomains.com for the name servers.

This is easy, but you need two nameservers per domain.


Right now I use the domain as the nameserver.
So, ns1.mydomain1.com is the nameserver for www.mydomain1.com
... and ns1.mydomain2.com is the nameserver for www.mydomain2.com ... and so forth.

This is where you will have a problem.

To start at the beginning:

1) You need to create two separate nameservers, based on any single somain you like. So, ns1.mydomain1.com and ns2.mydomain1.com.

You must do this via your registrar. Plesk has nothing to do with this.
Each nameserver should have a different IP address, with both IP addresses being ones allocated to your server.
If you only have one IP then you have several options, including pointing both nameservers to the same IP (not all registrars will allow this, and anyway it isn't a terribly good idea), or requesting an additional IP for your server.

See http://www.cymru1.net/linux-vps/vps-hints-and-tips.php and click on "Understanding and Setting up DNS" for more info.

2) In Plesk, in the DNS for mydomain1.com, you need to add A records that are effectively idential to the nameserver records you created via your registrar - i.e. ns1.mydomain1.com -> A -> first-ip-address (and similarly for ns2)

3) Here is were it all goes wrong for you. In Plesk you need to add NS records of ns1.mydomain1.com and ns2.mydomain1.com to the DNS records of all the domains you have already in Plesk. You also have to remove the NS records already added based on the domain name itself. You should also remove PTR records from all domains other than your mydomain1.com one (you also need a PTR record for the primary domain on any additional IP addresses you have - basically there should only be one domain with a PTR record for each IP address you have. Having multiple PTR records per IP - i.e. if you have one for each domain - can cause problems)

4) Change the DNS template in Plesk to automatically add the right NS records and not add the domain-based NS records to all future domains you add. Also make sure not PRT recorded are added.

5) Via your registrar, you must set all 50 domains to use ns1.mydomain1.com and ns2.mydomain1.com as nameservers. Your registrar may allow you to do mass changes (we certainly do).

Item 3 will involve manual changes for each domain, or you can possibly write a script to do it via the Plesk API from the command line.

Faris.
 
Thanks for writing back, and specially with so many details.
I'm either thinking this is harder to do or I don't understand it at all :)

I understand about name servers for domains. All my domains are setup with ns1 & ns2.domain.com

But, each domain had their own ns1 & ns2.
I wanted to only have one domain to be able to handle all the nameserver info for all domains on the server.

I'm going to re-read what you wrote and especially re-read the question I wrote, and see if I asked it correctly.

Maybe this would help narrow things down.

Server #1:
Domains:
www.domain1.com
www.domain2.com
www.domain3.com
www.domain4.com

right now, the name servers are:
ns1 & ns2.domain1.com = pointed to static IP of domain1.com
ns1 & ns2.domain2.com = pointed to static IP of domain2.com
ns1 & ns2.domain3.com = pointed to static IP of domain3.com
ns1 & ns2.domain4.com = pointed to static IP of domain4.com

... what I'd like to do is get rid of all these name servers and have a domain that handles them all.
Server #1
domains
www.domain1.com
www.domain2.com
www.domain3.com
www.domain4.com > each pointed to their own static IP

Nameserver:
ns1 & ns2.domain1.com > pointed to the static IP of all these domains. This can be done on the registrau setup.

then, each domain, www.domain1.com, www.domain2.com, www.domain3.com, www.domain4.com all use ns1 & ns2.domain1.dom nameserver....

I think its transparent to the Plesk server just as you said because all the IP's that the nameserver ns1 & ns2.domain1.com point to are programmed in the setup of the registrau's...

if this is the case, is their a limit to how many IPs a nameserver point to? Would 50 be too much?
and also, if this is how it would work, wouldn't it put an extreme load on the ns1 & ns2.domain1.com nameserver to manage all these IPs? I'm confused because it doesn't seem to be a very efficient way to do things because the nameserver would go to all these IPs before it got to the one that it needed...

Oh, I may be totally confused. I think I'm following you, but what I don't understand is that I think their is a better way to do this, and I think I can do it using primary and secondary name server setup on Plesk Control panel. But, I'm not sure how to setup a Primary Name server. I know how to make domains switch to Secondary name server setup, but again, I don't know how to create a Primary Name server... One that would be used, that would have only 1 static IP setup with a registrau, instead of the example 50, and all the ip's would be managed on the Plesk server, instead of having the nameserver bombarded with requests from 50 ips, when it wouldn't have to be.

Thanks for helping! I hope I kinda explained this a bit better.
Happy Holidays!
 
Ah. I see the confusion.

You don't need nameservers pointing to ALL the IPs of ALL the domains in Plesk.
Each of your two nameserver only points to ONE IP (a different IP for each nameserver).

On your Plesk server, the bind DNS server (aka "named") listens on ALL IPs allocated to the server automatically. So you have ns1.yourdomain.com pointing to one IP on your Plesk server and ns2.yourdomain.com pointing to another IP on your server. It doesn't matter which IPs they are really.

Faris.
 
Oh, the other thing -- primary and secondary.....

Your Plesk server will act a a DNS server. You don't need to worry about the difference between Primary and Secondary. The Plesk server will effectively be a Primary nameserver but you do not need a Secondary one. All that is required is to have two nameservers (ns1 and ns2) associated with each of your domains. The first (ns1) is technically the Primary and the second (ns2) is technically the Secondary. But both point to IPs on the same server.

In the future you might consider having a real Secondary nameserver, on a separate machine. This would be set up slightly differently but that's not important now.

You would only ever fiddle with the Primary/Secondary settings in Plesk if you Plesk was not the Primary nameserver (e.g. DNS was handled elsewhere and Plesk was supposed to just mirror it).

Faris.
 
Hello! Thanks for the info you gave, and sorry for the late response.
I did what you said, successfully... But, I found that an Intel QuadCore 3.2 Zeon PE 2950 w/Win2k8 and Plesk 9 w/Sitebuilder didn't seem like it had enough guts to keep running.

I did a test initally. I setup 1 or 2 domains dns at the regisrau to point the ns1.domain.com and ns2.domain.com to the IP address of the server of that IP. It worked perfect... for about a week... After time went by, it seemed that I/O bandwidth kept on increasing, the server seemed like it was busy all the time working, and often I found that it was crashed and not responding. I kept on rebooting the machine. The OS was respondant when it wasn't responding to I/O www requests.
I don't know what was going on, but in setting the registrau up pointing the primary/secondary dns to the IP the respective IP of the domain on the server seemed like it would work, but then often became unresponsive and would not respond to any www/external web request for domain/hosting or even the dns... the server just sat there... I was able to use the GUI, but services would see like they'd shut down.
To fix this I simply went into the registrau again and manually coded all the IPs for the www, mail, pop3, etc.
It, the server has not been down for over a month now, probably longer, since it needed a reboot and that reboot was probably because of an MS patch :)

If you have any ideas on what might cause something like this I'd greatly appreciate any info you can give.
As it stands right now, the 1 or 2 domains I setup to point to the server as the DNS server to pull IP info for www, mail, pop3, smtp, etc seems like it'll crash the server over time.

I'm running IIS7(win2k8), MS DNS, and well, MS everything except for the FTP server. I use Gene6FTP server to keep things more secure, but I think MS win2k8 has this built into their ftp server now....but thats a story/question for another topic.

Thanks!

Dave.
 
So to get this straight:

Changing the domains name servers at the registry to the name servers you created cause your server to crash
Pointing the domains zone file to the IP of your server at your registrar works fine

Is that right?

If that is the case it would seem that your servers DNS may not be configured correctly, not sure how it wouldnt be at this point, but if sending the dns queries to your box is casuing it to break dns may not be confugured correctly, there may be a firewall that is casuing the outbound udp requests to not be sent out so that the clients have to flood the server, it could also be forwarders, or any number of things.
 
Hello Again, thanks for writing and helping me on this. I'll answer your answers and questions to my questions one at a time...

>
So to get this straight:

>Changing the domains name servers at the registry to the name servers you created cause your server to crash
>Pointing the domains zone file to the IP of your server at your registrar works fine

Yes, I beleive so. If I configure my registrau to point to hardcoded IPs and subdomains, it'll work. But, if I simply NOT use the registrau at all for DNS, and let my server running Plesk 8.x w/MS DNS, it'll work crazy, I get a lot of i/o talking from the www external, and it seems to crash over time.

Ex: Lets say I set my www.domain.com at the registrau to point to 10.0.0.1. I also set mail.domain.com to 10.0.0.1. And pop3.domain.com to 10.0.0.1, and so forth...

In doing it this way, my server wont crash.

...But, if I set my www.domain.com at the registrau to simply point to 10.0.0.1 and also DNS to point to 10.0.0.1, it'll
send DNS requests to the www.domain.com at that IP(10.0.0.1) and cause the server to work really hard, have a
lot of bandwidth useage and then crash in about a day or two.


>Is that right?

Yes, I beleive so.


>If that is the case it would seem that your servers DNS may not be configured correctly, not sure how it wouldnt be >at this point, but if sending the dns queries to your box is casuing it to break dns may not be confugured correctly, >there may be a firewall that is casuing the outbound udp requests to not be sent out so that the clients have to flood >the server, it could also be forwarders, or any number of things.

yes, it sure does seem like the DNS isn't working correctly so I reimaged the OS onto the server(win2k8 w/all updates). Installed SQL2008. Installed Plesk 8.x(last 8.x release) without Sitebuilder. It'll do the same thing.
This is with using MS DNS.

I'm about ready to pull this server and reimage it with Win2k8 w/Plesk 9. I'll see what happens then.
I think it might have something to do with the hardware firewall blocking i/o for DNS. When I'm on another IP
and try to go to the actual www.domain.com site, it'll seem like it thinks and thinks, and thinks some more...then
if finally comes up. Using the registrau for the DNS it's quick like it should be. So, possibly the firewall is blocking
the dns content. Do you know what port? You mentioned UDP, would I also have to do anything with TCP osi?

Thanks for all your ideas, you made me think of the firewall and thats probably whats causing the problem. Hopefully its that simple.

Dave.
 
DNS operates over TCP & UDP port 53
A full list of the ports that you need

I dont see a list of the ports that are needed for windows, but these are the ones for linux, minus out 22 for ssh and add in 3389 for RDP and 1433 for SQL and it should be mostly the same I would imagine.

#20 ftp-data
#21 ftp
#22 ssh
#25 smtp
#53 dns (TCP and UDP)
#80 http (web server and Plesk updater)
#106 poppassd (for localhost only)
#110 pop3
#113 auth
#143 imap
#443 https
#465 smtps
#587 mail message submission
#990 ftps
#993 imaps
#995 pop3s
#3306 mysql
#5224 (outgoing connections only) plesk-license-update
#5432 postgres
#8443 plesk-https
#8880 plesk-http
#9080 tomcat
 
Thanks again for the info! This is great stuff! Your very helpful, more than you possibly can imagine.

>
Ah. I see the confusion.

>You don't need nameservers pointing to ALL the IPs of ALL the domains in Plesk.
>Each of your two nameserver only points to ONE IP (a different IP for each nameserver).

This probably sounds a bit dumb, but the IP that it points to... Does it even have to have a domain
registered at the registrau? Could it be a totally unused IP, with no setup/config at all in Plesk, except that
its identified as an available IP?

>On your Plesk server, the bind DNS server (aka "named") listens on ALL IPs allocated to the server automatically. So >you have ns1.yourdomain.com pointing to one IP on your Plesk server and ns2.yourdomain.com pointing to another IP >on your server. It doesn't matter which IPs they are really.

Back to my idea that I'm having, if it'll work... If what you say works, and I'm sure it will, the best way that I know
that I can setup this thing is to have an unused IP setup for the ns1 & ns2. That way all requests for dns lookup info on the servers is going to a particular server(oh, what about if you have more than 1 plesk server hosting, ok, I'll get
back to this question)... Ok, with the same server that the domains are hosted on, but an IP that no domain uses? This should cut down on i/o to the domain?

I'm also going to check out the firewalls and make sure that the dns isn't blocked. I don't think it is or it wouldn't have
worked at all. I don't know what would have caused the excessive bandwidth useage when I was using Plesk/Bind as the registraus dns setup config for the domain...

Thanks again for all your help. I'm gonna go through the port list you sent and make sure everything is setup correctly.

>Faris.

Dave.
 
Back
Top