Koozali.org: home of the SME Server

Website Hosting DNS problem...

Offline joshAU

  • ***
  • 70
  • +0/-0
Website Hosting DNS problem...
« on: October 07, 2007, 02:43:42 PM »
Hello, long time user, first time poster.  I am trying to host my own
website on my sme server 7 rc1.  I cannot access the website. It is obviously a DNS issue, as i can access the website externally and internally using my external ip address, but not externally via domainname. 
I can access the website using the domainname only if i am internal and the sme server is set to "resolve locally".

I use an router in bridge mode direct to the sme server, which is in server and gateway mode. The server is set to provide DHCP and DNS. I have configured the server so that the primary domain is the same as my registered domainname, and checked the server review config. panel to confirm web, ftp, etc also point to the correct webaddress.

I have the domain content set in the sme server manage domain panel to primary, and have played with setting the domainname servers to both "resolve locally" and to "Internet DNS servers", to no avail.

I have a registered domain name with melbourneIT, and have a static IP.
I have contacted my ISP and they say everythings rosy on their end. My account is a business account that supports website hosting. 

My problem I guess lies with the registrar. On MelbourneITs website domain configuration page, I get the option to put in the hostname and IP addresses of the name servers, stating I only need two. By default two of MelbourneIITs nameservers are selected.  I have tried adding my sme server host name and external static ip address to the registrars site, along with first 1 and then both of melbourneits dns servers.

I guess my questions are these

1.  should i:
(A)be putting my smeservers hostname(smeserverhostname.websitename.com.au) and ext. IP address (58.x.xx.xx)(fictitious examples used) in the melbourneITs domain config page as my DNS server..., plus another 1 of my dns servers (that I dont have!) as secondary

or

(B) should I leave the registrars dns servers in as the primary and secondary DNS servers and be adding my ext. IP to one of their DNS server's DNS records.... through some other method... unknown to me....

2.  Could it be a permissions issue.  I run a fairly uncustomised install of sme, im using the primary ibay, i can access it externally via external ip address, so i don't think that this is likely.

3. when i do a "ping -a website.com.au" from a command prompt, i get host not found errors.  if i do the same to my external ip address, it still shows it  resolves to a domain in the fomat of dsl-58-x-xx-xx.location.myISP'sname.com.au, rather than pointing to my website...

so i guess my real question is this - should i by using my sme server as the primary DNS server and therefore put its hostname and ipaddress in my registrars domain config page for my website?, and if so, do i need to  have another one of my own dns servers?, 
or should i not use the sme for ext DNS and be adding my website address and ip address to one of their, or one of my isps dns servers....

and, for either way, which way should i put the settings in the SME "manage domain" panel?

Apologies for the long-windedness of the question/s. I have tried to provide as much as poss. but if you need more let me know.

Any help, pointers to useful links, ideas, brainstorms or otherwise useful knownledge would be greatly appreciated. I'm very confused, if you hadn't noticed.

I have used sme server for over a year and heartily recommend it to anyone.  These forums have been a great value to me, enabling me to solve any issues through the use of this great forum, without even needing to resort to asking a question, (until now that is).

Thank you

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Website Hosting DNS problem...
« Reply #1 on: October 07, 2007, 05:41:30 PM »
Odd - I can't find any specific mention of this in the documentation, but:  SME does not serve as an Internet DNS server.  You MUST configure your external IP and your various public DNS settings on a public DNS server outside of your local network.

I suppose this is your option 'B'.

DNS is an odd beast; imagine the following scenario:
Code: [Select]
Root_DNS
  |     Registrar
  |    /   DNS Server
  |   /   /            Other_DNS
  |  |   /            /
  Internet---Other_ISP---Remote_User
      |
  Your_ISP---Your_ISPs_DNS
      |
     SME
      |
  Local_User

Let's assume that
  • SME has IP Address a.b.c.d
  • SME has domain name mysmeserver.com
  • Remote_User is configured to use Other_DNS for DNS lookups

If Remote_User tries to browse to http://mysmeserver.com, his computer asks Other_DNS how to find 'mysmeserver.com'.  Other_DNS server then
  • asks the Root_DNS servers where 'mysmeserver.com' is registered
  • asks the Registrar where to get specific answers for 'mysmeserver.com'
  • asks the DNS_Server for the IP address of 'mysmeserver.com'
  • saves the answer in its local cache for the amount of time specified by the administrator of the DNS record at DNS_Server.

If, on the other hand, Remote_User asks for information about your IP address (a.b.c.d), his DNS server
  • asks the Root_DNS servers where d.c.b.a.in-addr.arpa is registered.
  • asks the Registrar where to get more info about d.c.b.a.in-addr.arpa.  This is probably but not necessarily Your_ISPs_DNS.
  • asks the host indicated by the Registrar (probably Your_ISPs_DNS) what name belongs to 'd.c.b.a.in-addr.arpa'.  The return value is almost always a generic filler based on your IP address unless you contact your ISP and ask them to change the PTR data for your IP address.
Basically, PTR records are managed by the organization that controls the IP address (which makes sense, if you think about it).

If Local_User tries to open http://mysmeserver.com (assuming a default SME installation with DHCP and therefore DNS provided by the SME server):
  • If mysmeserver.com is configured for Local resolution, the SME server returns the data that has been configured locally.
  • If mysmeserver.com is configured to use Internet DNS Servers, the SME proceeds just as the first example from Root_DNS to Registrar to DNS_Server to local cache (actually, it checks the local cache first...)

So, for you to host a public web server at your location you need:
  • An ISP to provide connectivity
  • A DNS Registrar where you can 'register' your domain name and publish the addresses of your DNS servers.
  • A DNS service provider who will respond to queries about your domain

Some ISP's provide registration and DNS hosting capabilities as part of the connectivity package.

Some ISP's provide DNS hosting but not Registration as part of the connectivity package.

Some Registrars provide DNS hosting as part of the registration.

Sometimes you will need 3 separate vendors for these separate services.

You need to find out if your Registrar provides DNS hosting services, and if so, how to configure them.  They'll provide you with a web address where you can configure your DNS.

If they do NOT provide DNS hosting services, your ISP might.  Ask them.  If so, configure your DNS on their servers, then edit the Registrar page to point to the DNS servers indicated by your ISP.

If neither your Registrar nor your ISP provides DNS hosting, you'll need to find a 3rd vendor to do this.  I use 'PairNIC' here in the US and pay a few dollars per year for DNS hosting that is reliable and easy to configure.  You could also use DynDNS, etc.  Once you have a DNS hosting account, setup your hosts on the hosting server, then change the 'DNS servers' settings on your Registrar's site.

One last item: the PTR (or 'Pointer', or 'Reverse DNS') address of your IP address only becomes important once you start hosting email on your system - some providers will not accept your email if the name returned by the 'reverse lookup' of your IP address does not in its turn result in your IP address when it, itself is looked up.  It doesn't necessarily need to match your configured domain name (since so many providers host multiple domains on one IP), but it has to work both ways.  In your example this means that if your reverse lookup is dsl-58-x-xx-xx.location.myISP'sname.com.au then before trying to send email directly from your SME to the Internet at large you want to make sure that nslookup dsl-58-x-xx-xx.location.myISP'sname.com.au returns your IP address (not an error, and not some other address).
« Last Edit: October 07, 2007, 05:53:47 PM by mmccarn »

Offline joshAU

  • ***
  • 70
  • +0/-0
Re: Website Hosting DNS problem...
« Reply #2 on: October 08, 2007, 06:55:55 AM »
Thank you mmccarn for your quick and informative response.  It has explained things and made it a bit easier to understand. Thanks for taking the time to explain a complicated issue that is not covered in great depth in the manuals. 

I had my suspicions that SME didnt support external DNS services - a friend ages ago suggested that might be the case.

I guess I will have to look at DNS hosting then.  For anyone interested.  MelbourneIT does NOT provide any DNS hosting when you register a domain, unless they are the domain hosts as well.  My ISP (Westnet) charge $66AU per year for such a service, which seems a bit rich for a couple of lines of text on a dns server - given that the domain registration is only $70AU per year.

Sorry to ask another question/s but....

1.  Can I setup another server internally to run as an external DNS server for my SME-hosted website?  I have a 2003 server that I could reconfigure to use this for.  If so, I guess I would then have to foward external dns requests through the sme to the 2003 server.... I think Im getting confused again :).

2.  Why cant a SME server act as an external DNS server?  This question is really more out of interest.  I accept that it cannot, but am curious as to why. Should I post this as a seperate question?

3. You mentioned you use 'PairNIC' as your DNS hosts.  Does $66AU sound reasonable to you?  Would it be better/faster for me to have my DNS host located on my isps servers, rather than on some other third party?

Again, sorry to reply with more questions.
Thanks once again for your in-depth reply to my first question






Offline smeghead

  • *
  • 563
  • +0/-0
Re: Website Hosting DNS problem...
« Reply #3 on: October 08, 2007, 07:33:33 AM »
There are many free DNS hosting services, I use Zoneedit (http://www.zoneedit.com).

Setup an account, & add your domain; read up a bit on DNS so you know what to add & def look at adding an SPF record.

Once this is all done log on to MelbourneIT & change the setup there to point to the zonedit DNS servers (they will tell you this info as part of the setup).

HTH
..................

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Website Hosting DNS problem...
« Reply #4 on: October 08, 2007, 07:38:50 AM »
Quote
1.  Can I setup another server internally to run as an external DNS server for my SME-hosted website?  I have a 2003 server that I could reconfigure to use this for.  If so, I guess I would then have to foward external dns requests through the sme to the 2003 server.... I think Im getting confused again
Sure you could - but see the answer to #2...

Quote
.  Why cant a SME server act as an external DNS server?  This question is really more out of interest.  I accept that it cannot, but am curious as to why. Should I post this as a seperate question?
I am not one of SME's primary developer, but the reasoning I've seen given most often is that A) running a DNS server is tricky and complicated and/or B) according to the DNS RFCs you're supposed to have 2 servers for any domain - each on a separate internet connections (so how can you do that with one SME?) and/or C) if your domain only deserves one DNS server, why not use one of DynDNS's 'free' domain offerings?

Quote
3. You mentioned you use 'PairNIC' as your DNS hosts.  Does $66AU sound reasonable to you?  Would it be better/faster for me to have my DNS host located on my isps servers, rather than on some other third party?
There is no advantage that I'm aware of to using your ISP's DNS servers (except that sometimes it's free).  Large DNS providers or Web providers probably have better DNS infrastructure (more servers, faster servers, better connectivity) than many ISPs.

(PS - Just noticed smeghead's posting re: zoneedit.com - looks even cheaper than any of the options I've listed...)

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Website Hosting DNS problem...
« Reply #5 on: October 08, 2007, 09:39:01 AM »
There are many free DNS hosting services, I use Zoneedit (http://www.zoneedit.com).
And when you have registered your domain with zonedit, update your existing /sbin/e-smith/dynamic-dns/custom script (or create a new one called /sbin/e-smith/dynamic-dns/zonedit) with
Code: [Select]
#!/bin/sh
# Description: www.zonedit.com (free service)

#------------------------------------------------------------
# zonedit.com dynamic DNS update handler.
#------------------------------------------------------------

IPADDR=$1
USERID=$2
PASSWD=$3
DOMAIN=$4

wget -q -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host='$DOMAIN
wget -q -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=mail.'$DOMAIN

exit 0
for however many different servers you created (I just had domain & mail.domain).

You will then need to change you smeserver DynDNS entry, either via the admin console (option 2. Configure this server) or via the shell as root
Code: [Select]
config setprop DynDNS Service customor if you created a new script
Code: [Select]
config setprop DynDNS Service zonedit
Good Luck
Trevor B
PS. I use zonedit for my domains from NetRegistry - same deal.

Offline smeghead

  • *
  • 563
  • +0/-0
Re: Website Hosting DNS problem...
« Reply #6 on: October 08, 2007, 10:14:16 AM »
.. assuming the IP is dynamic, if static then htis is not req; Westnet(.com.au) charge extra for a static IP.

The format of the name returned by the ping doesn't necessarily determine the pool from which the address has been pulled (dynamic or static).  Some ISP's assign 'static' address via a dhcp lease from a dynamic pool forcing the same address, this can cause lotsa probs as this static address is not really static (per the RFC's) just unchanging, to be really static it must be pulled from a defined static pool.

If your IP is dynamic make sure you set you mail server to relay via the ISP's mail server.
..................

Offline joshAU

  • ***
  • 70
  • +0/-0
Re: Website Hosting DNS problem...
« Reply #7 on: October 08, 2007, 01:31:25 PM »
Thanks smeghead for your reply.
I'm leaning towards westnet as dns host as I already have my them as ISP.  My IP address is static, however when I signed up they gave, and continue to give, it to me it for free, lucky me, hey.
EDIT: I'm wrong, just saw an invoice $4.99 /month for static IP.

I'm familiar with pointing the name servers to hostname and ip address via the registrars site, just had them pointing erroneously to my sme server.

I didnt realise what you were saying in your second post re isps assigning I guess semi-static IP addresses. I did ask my isp and they told me my account supported my own webhosting.
Thanks once again for your input.

_____________________________________________________________________

Thankyou once again mmccarn for your replies to my question.

re 1,2,3

1. Given the added complications/expense of using my own dns server (x2), and I don't really want to have to rely on a windows system for dns anyway, I'll probably get my ISP to do the DNS hosting.

2. A. Fair enough, i can accept that
    B.  that rules me out of my own dns hosting then.
    C.  I wasnt saying that my site only deserved one dns server, if asked I'd say my site would deserve a dozen or more :).
It is designed for a business website. I'll probably go with my isp, as ive said in 1, above...

3. No Melb.it dont provide dns hosting services unless they provide the domain hosting as well, they advised my isp. Thanks for all the info re dns hosting sites, they are quite a bit cheaper.

I'm still inclined to stick with the isp to help centralise things, at least if only in my mind.

Guess I just lucked out getting either a registrar or and a ISP that provided free dns hosting.

Thank you once again for your informative advice, mmccarn.
_____________________________________________________________________


Hello TrevorB, and thank you as well for your extra input.
I assume that the code is for use only if using a dynamic dns service.
I may be wrong, I have been at least once before :)

I have decided to go with my ISPs DNS hosting option.
« Last Edit: October 08, 2007, 01:59:43 PM by joshAU »

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Website Hosting DNS problem...
« Reply #8 on: October 08, 2007, 02:41:21 PM »
Hello TrevorB, and thank you as well for your extra input.
I assume that the code is for use only if using a dynamic dns service.
I may be wrong, I have been at least once before :)
No, you are right :-)
I have decided to go with my ISPs DNS hosting option.
Easiest option.

But you can also use zonedit for free dns (you just don't need to do the DynDNS stuff).

Trevor B

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Website Hosting DNS problem...
« Reply #9 on: October 08, 2007, 04:16:01 PM »
My $2 collaboration.

http://freedns.afraid.org/

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Website Hosting DNS problem...
« Reply #10 on: October 08, 2007, 08:25:16 PM »
Odd - I can't find any specific mention of this in the documentation, ...

Mike, it'd be great if you could create that documentation. What I suggest in future is that instead of posting such a detailed reply inline in the forum, that you create a topic in the wiki, and then post the URL to your wiki entry in the forum response.

Thanks.

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Website Hosting DNS problem...
« Reply #11 on: October 09, 2007, 12:35:09 AM »
Mike, it'd be great if you could create that documentation. What I suggest in future is that instead of posting such a detailed reply inline in the forum, that you create a topic in the wiki, and then post the URL to your wiki entry in the forum response.
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Appendix#Appendix_B._DNS  :)

Although it might be nice to add some of the other Dynamic DNS providers Mike mentioned.

Trevor B