Help - Search - Members - Calendar
Full Version: Yet another DNS problem
The Planet Forums > Control Panels > Plesk
afriq
This was posted at Plesk as well, but somehow that forum is not all that busy ...

Ok, here goes:

For some reason or the other I cannot get a DNS config using 2 new nameservers sorted out.

Here are the settings in Plesk:

myhost24.com NS sun.myhost24.com
myhost24.com NS moon.myhost24.com
sun.myhost24.com A xxx.xxx.xxx.xx1
moon.myhost24.com A xxx.xxx.xxx.xx2
myhost24.com A xxx.xxx.xxx.xx4
www.myhost24.com A xxx.xxx.xxx.xx4
webmail.myhost24.com A xxx.xxx.xxx.xx4
ftp.myhost24.com CNAME myhost24.com
mail.myhost24.com CNAME myhost24.com
myhost24.com MX 20 mail.myhost24.com
xxx.xxx.xxx.xx4/24 PTR myhost24.com


A "dig" on either sun.myhost24.com or moon.myhost24.com works just fine, but myhost24.com is simply not visible ...

I've also added the name server IP's to the Plesk IP aliasing section, although I'm not sure whether that is actually required.

The RaQ requires that the name servers be set up as hosting accounts as well, but I got the impression from the Plesk forum that it is not required at all for Plesk.

Any help would be appreciated icon_wink.gif

thanks,

Johan
Danimal
Johan,

You are right that the nameservers do _not_ need to be hosted accounts. Let me share with you my config which seems to work perfectly.

I have my machine named as: (names changed to protect the innocent icon_biggrin.gif )
myhost.mybox.com
with two nameservers:
ns.mybox.com
ns2.mybox.com

These three map to: IPa, IPb, IPc (where IPa is the main IP of my box, IPb is an extra IP address for nameserver 1, and IPc is another IP address for nameserver 2).

I created a name-based hosting account (you can do IP-based if you have extra, but it doesn't need to be) for mybox.com and set up it's DNS as follows:

CODE
mybox.com.          NS     ns.mybox.com.

mybox.com.          NS     ns2.mybox.com.

mybox.com.          A      IPa

ns.mybox.com        A      IPb

ns2.mybox.com       A      IPc

webmail.mybox.com   A      IPa

ftp.mybox.com.      CNAME  mybox.com.

mail.mybox.com.     CNAME  mybox.com.

www.mybox.com.      CNAME  mybox.com.

myhost.mybox.com.   CNAME  mybox.com.

mybox.com.          MX 10  mail.mybox.com.

IPb                 PTR    ns.mybox.com.

IPc                 PTR    ns2.mybox.com.

IPa                 PTR    mybox.com.


So there you go! The only other thing to do is to put in a Trouble Ticket to RackShack support requesting that they set up reverse DNS for your box name (to IPa) and your two nameservers. That way, IP->name resolution can happen.

Couple other things to note: I am using 3 IPs here, but you could do this with 2, where your main IP is also your first nameserver.

Also, I'm playing with wildcards and it looks like you could replace all the CNAMEs with one of the format:
*.mybox.com. CNAME mybox.com.
Then, in your apache configs (i.e., vhost.conf for mybox.com), you can specify specifics for subdomains or just a catch-all:
ServerAlias *.mybox.com
This will allow you to visit your site as: .mybox.com through web or ftp.
But spelling out the specific CNAME entries might be preferable just from a readability/understandability point of view.

Hope this helps!

-Danimal cool.gif
mouse
Ditto on Danimals suggestion, that is my only issue with RS is they have to rpovide the reverse ptr records, once you submit your NS IPs and the names you would like them to resolve to, within 24 to 48 hours you should be good.. Mouse
Danimal
One cool thing about wildcard DNS entries: you can then create any type of subdomain you like in the Apache configs.

For example, if you have the following line in your DNS:
*.mybox.com. CNAME mybox.com.

Then .mybox.com will resolve to your RS box. Then, just set up whatever you like in Apache. If you want a full-featured account for a subdomain, do it via Plesk. If you just want:
http://something.mybox.com/ to point to:
http://mybox.com/some/set/of/subdirs/
You can then create the apache configs either in the vhost.conf for mybox.com or in httpd.conf directly (don't use httpd.include as it gets rewritten by Plesk).

For example, I have sub.mydomain.com defined to redirect to mydomain.com/sub/ and all it took was the DNS entry (wildcard or a specific CNAME for sub.mydomain.com) and a few lines of config in apache.

Voila!

-Danimal cool.gif
mouse
and the setup to do this on a Raq is?? looks like something worth doing here.. Mouse
webbcite
http://list.cobalt.com/pipermail/cobalt-us...ust/018350.html

This is for a RAQ3, but should work the same for a RAQ4...
Danimal
I don't have a RaQ, but I imagine the setup is the same:

If you add a specific subdomain or wildcard to your DNS as specified above, then you can do a number of things with apache. Here's a couple I've done:

1) Wildcard Web Redirect
If you have mydomain.com set up as a hosted account and you want http://.mydomain.com/ to go to http://mydomain.com/ (other than specifically defined ones like webmail or whatever), then all you need is to add a ServerAlias line as follows:
ServerAlias *.mydomain.com
For Plesk folks, put this in:
/usr/local/psa/home/vhosts/mydomain.com/conf/vhost.conf
and then run:
/usr/local/psa/admin/bin/my_apci_rst to recreate your httpd.include file which will then reference this vhost.conf file
For RaQs, I'm not sure where you would put this, but it should be in the block for mydomain.com.

2) Specific Redirect
If you want to have http://.mydomain.com/ redirect to http://mydomain.com// then create a new VirtualHost directive for this.
If you are using Plesk, you can put this directive in:
/usr/local/psa/apache/conf/httpd.conf
or (better solution, IMHO) is to add a line at the end of this file:
Include conf/httpd.manual
(put this right after the line:
Include conf/httpd.include
Then, you can add your specific directives to httpd.manual
For RaQs, do something similar: put the Include line at the end of httpd.conf, or just add the directives below to httpd.conf directly.

Here's the format of the directive:


ServerName .mydomain.com
ServerAdmin "admin@mydomain.com"
RedirectPermanent / "http://www.mydomain.com/"



Just put your IP for name-based sites in place of the 123... and replace "" with your subdomain name and "" with the URL path to the directory or file you want.

And there you go! Restart apache and you should be set. If you have trouble with apache restarting, try restarting it using the apachectl [re]start command (for Plesk, this is at /usr/local/psa/apache/bin/apachectl not sure on the Raqs, but should be under .../apache/bin/)

Good luck and have fun!

-Danimal cool.gif
mouse
thnx Danimal and Webbcite, tween the 2 of ya ill figure this out.. Mouse
afriq
Thanks for all the input! The site works fine now - it might have been a delay in DNS propagation that caused all of this, or the fact that I've added the to name server IP's to the Plesk Server IP alias list ...

This forum is extremely useful, just a pity that not all of the sub forums are a well visited as the RaQ > Comments/Suggestions one, hence my post there icon_wink.gif

Maybe I should not say this here, but the Plesk forum is not visited that often. Maybe people only go there when they have a problem, whilst this forum is being visited far more frequently - it is becoming like the old Virtualis bulletin board!
Ric
QUOTE
Originally posted by Danimal

[B]myhost.mybox.com

with two nameservers:
ns.mybox.com
ns2.mybox.com

These three map to: IPa, IPb, IPc (where IPa is the main IP of my box, IPb is an extra IP address for nameserver 1, and IPc is another IP address for nameserver 2).

I created a name-based hosting account (you can do IP-based if you have extra, but it doesn't need to be) for mybox.com and set up it's DNS as follows:

CODE
mybox.com.          NS     ns.mybox.com.

mybox.com.          NS     ns2.mybox.com.

mybox.com.          A      IPa

ns.mybox.com        A      IPb

ns2.mybox.com       A      IPc

webmail.mybox.com   A      IPa

ftp.mybox.com.      CNAME  mybox.com.

mail.mybox.com.     CNAME  mybox.com.

[url]www.mybox.com.[/url]      CNAME  mybox.com.

myhost.mybox.com.   CNAME  mybox.com.

mybox.com.          MX 10  mail.mybox.com.

IPb                 PTR    ns.mybox.com.

IPc                 PTR    ns2.mybox.com.

IPa                 PTR    mybox.com.
 
[/B]



Danimal,

What does your Plesk DNS template look like? Do you set that all up on new domains by default or do you manually configure each one?

Rick
Danimal
QUOTE
Originally posted by Ric

Danimal,

What does your Plesk DNS template look like? Do you set that all up on new domains by default or do you manually configure each one?

Rick


I did all the above manually for the domain name that I'm using as my DNS server (i.e. nameservers)

My default template is really simple:
2 NS records, 2 A records, 2 CNAMEs and an MX. Like this:

CODE
<domain>.          NS   ns1.nameserver.com.

<domain>.          NS   ns2.nameserver.com.

<domain>.           A   <ip>

webmail.<domain>.   A   <ip>

ftp.<domain>.    CNAME  <domain>.

mail.<domain>.   CNAME  <domain>.

<domain>.        MX 10  mail.<domain>.


And that's it!

-Danimal cool.gif
Ric
ok, so you only have one PTR record on other domains, the default one per your example...

IPa PTR mybox.com.

... correct?

The reason I ask is because the two PTR records for the nameservers can't be created on other domains unless they are set up in the template.

Rick
Danimal
Correct.

I actually don't have any PTR records on the name-based hosting accounts. PTRs are for mapping IPs back to names. And for name-based, I don't want this.

For example, if the IP for name-based is 1.2.3.4 and my box is called mybox.com, I want the PTR for that so that lookups to 1.2.3.4 resolve to mybox.com...

BUT, I do /not/ want it for myclient.com (a name-based hosted account), otherwise lookups to 1.2.3.4 may return myclient.com instead of mybox.com

The only exception is IP-based accounts which I /do/ add the PTR record. It doesn't need to be in the template. You can add it to a specific account.

Hope this helps!

-Danimal cool.gif
Ric
Thanks Danimal, yes it does help, I was not sure how the PTR records were supposed to be configured for name based domains.

Although it seems like you would want them to point to your box IP. If you do a host or dig lookup on a name based domain, it returns the box IP. Wouldn't you want it to reverse to that as well?

Some mail and FTP servers will reject connections if the reverse fails.

Rick
Danimal
QUOTE
Originally posted by Ric

Although it seems like you would want them to point to your box IP. If you do a host or dig lookup on a name based domain, it returns the box IP. Wouldn't you want it to reverse to that as well?

Some mail and FTP servers will reject connections if the reverse fails.  

Rick


No, actually you wouldn't because it's not definitive with name-based.

For example, if I have three name-based domains:
clienta.com
clientb.net
clientc.org
and all three are name-based on top of IP 1.2.3.4,

then doing a name->ip lookup on any of them should return 1.2.3.4 (i.e. "nslookup clienta.com"), but doing an ip->name lookup on 1.2.3.4 wouldn't know what to do (i.e. "nslookup 1.2.3.4"). In my case above, nslookup on the name-based IP returns the machine name and /not/ any specific client.

If this behavior has negative effects for that client (i.e. FTP or SSH or something else they need), then make them an IP-based account.

It's the downside of name-based, but the other upside is well worth it (multiple accounts with only 1 IP used).

HTH!

-Danimal cool.gif
Ric
I see, thank you. What got me looking into this in the first place was a name based account was having problems with SMTP/IMAP through an AOL connection and it appears to be because of the reverse failing. It works fine on IP based domains so you confirmed the problem there.

Not sure if it hurts anything but another difference I had in our DNS template was the 2 A records...

ns1. . A xxx.xxx.xxx.xxx

ns2. . A xxx.xxx.xxx.xxx

I added those per a post on the Plesk forum about clients using their own nameserver settings to point their domains to from the registrar. I don't know if all registrars allow this but DirectNic does, ie., one of our clients uses ns1.hisdomain.com and ns2.hisdomain.com and it resolves fine.

Rick
dennism220
So how would you set up your DNS settings if you want to run 2 SETS of nameservers? I regisetered a second set and assigned them to 2 additional IP's on my box for resellers to use. So I have:

ns1.boxdomain.com -> IPa
ns2.boxdomain.com -> IPb

and

ns1.resellerdomain.com -> IPc
ns2.resellerdomain.com -> IPd


Thanks,

Dennis
Shehabi
hi guys am newbie with plesk
I have something to ask
is that configration above should be in a file like *.conf or in the plesk it self?

and what about the domain am using like mydomain.com
what dns I will assign to it in the registrar records like in register.com

if it's possible to help
thanks
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.