Koozali.org: home of the SME Server

Best practice for domain setup

Offline kevinb

  • *
  • 237
  • +0/-0
Best practice for domain setup
« on: August 30, 2009, 05:42:49 PM »
Hello everyone,

I am trying to learn what is the best way to setup a domain in a certain situation. We have:

  • External web hosting with a dynamic IP
  • SME server in gateway mode with email hosting on a static external IP

If I make the SME server domain name the same as our domain (domain.tld) then SME's DNS will resolve local domains internally and not to the web site (internally www.domain.tld will be the SME server and not the web host).

Can I make the SME domain a different name (domain.lan) and then setup a virtual domain (domain.tld) and then how do the users send and receive email with their local account (user@domain.tld)? Does this work?

Thank you in advance for your help.

Kevin

Offline johnp

  • *****
  • 312
  • +0/-0

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Best practice for domain setup
« Reply #2 on: August 30, 2009, 07:19:20 PM »
Thank you John but that doesn't help me. I can set www.domain.tld to point to our web host assigned IP but the web host assigned IP is dynamic. At some point in time I would expect my manual entry to be outdated.

I thought about setting SME to use the internet as the DNS server but then I believe I would lose resolution of all internal hosts.

The option I am investigating is to setup SME on another domain (domain.lan) and configure a virtual domain (domain.tld). But I am not sure how email is handled. If a user logs into domain.lan IMAP do they get the email sent to user@domain.tld?
« Last Edit: August 30, 2009, 07:32:40 PM by kevinb »

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Best practice for domain setup
« Reply #3 on: August 31, 2009, 05:03:13 AM »
kevinb

Configure external DNS records to point http://www requests to your dynamic provider, and mail requests (MX record) to your sme server static IP.

DNS can also be configured for any other services you wish to host locally on your sme server.

Talk to whoever maintains your external DNS records for the domain, to configure all this.

Also then configure your sme server for external DNS resolution so local users http requests get directed to the external website.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Best practice for domain setup
« Reply #4 on: August 31, 2009, 05:41:45 AM »
Thanks Mary but I tested that. If I setup SME to use the internet for DNS then DNS requests from internal hosts to internal servers/hosts do not get resolved.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Best practice for domain setup
« Reply #5 on: August 31, 2009, 06:49:38 AM »
kevinb

Quote
If I setup SME to use the internet for DNS then DNS requests from internal hosts to internal servers/hosts do not get resolved.

I am referring to the domain in question which you say is hosted externally and therefore must already have external DNS records.
I asume at present your server must be configured to provide access to the externally hosted web site for locally made requests.

I wonder if we are "referring" to the same thing.
What do you exactly mean by "setup SME to use the internet for DNS" ?
ie what setting & where ?

Obviously if you host other "non public" domains on your server that do not have external DNS records, then you will need to resolve them locally ie by making the appropriate setting in the Domains panel in server manager on a per domain basis.

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Best practice for domain setup
« Reply #6 on: August 31, 2009, 06:59:43 AM »
External DNS and hosting for www.domain.tld.

Local SME for email for @domain.tld (we initially setup SME to be on the domain "domain.tld").

I any case I have just setup SME to be on the domain "domain.lan" with local DNS and setup another virtual domain of "domain.tld" with internet DNS.

Initial testing looks good.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Best practice for domain setup
« Reply #7 on: August 31, 2009, 07:41:11 AM »
kevinb

Why did you ask for advice ?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Best practice for domain setup
« Reply #8 on: August 31, 2009, 04:51:28 PM »
Simple,

If someone would have come back and written "This method causes these problems ..." or "We have the same situation and here is what we did ...." I would have been one step ahead. Plus, we get this topic exposed so others may benefit.

A smart person learns from their mistakes, a smarter person learns from the mistakes of others. I am always trying to be smarter (my wife will remind me on occation of areas where I need to become smarter).

Kevin

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Best practice for domain setup
« Reply #9 on: August 31, 2009, 05:35:28 PM »
kevinb

It seems like you were not interested in best practise advice as you already had a pre conceived idea of what you were going to do. You coveniently ignored valid answers, which do work if you had taken the time to understand and correctly implement them.  Your method is a workaround only. So why ask if you are only going to ignore the answers given ?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Best practice for domain setup
« Reply #10 on: September 01, 2009, 07:24:46 AM »
Mary, I want to thank you for being so passionate about this subject. I sure many will benefit by your advice.

Please let me explain:

I tried your solution several years ago and it did not work satisfactorily. That is why I did not try your advice this time but I do value your input.

The web host is also the DNS server for domain.tld on the internet. The www.domain.tld and ftp.domain.tld IP's are set by them and are dynamic. I have set mail.domain.tld to point to our SME server that has a static external IP and set the MX to mail.domain.tld. I have the local SME primary domain as domain.tld with the SME server handling DNS for this domain. I manually set on SME www.domain.tld and ftp.domain.tld to point to the web host address and everything is fine. Until the dynamic IP of www and ftp changes. Then I get phone calls from the internal users who cannot connect to them anymore.

If I set SME to use the external (Internet) DNS servers for resolution of domain.tld then SME does not let me create hostname records for internal servers and these servers then cannot be contacted by name.

You stated:
Quote
DNS can also be configured for any other services you wish to host locally on your sme server.
(just so I am clear ... I need to assign names to local IP's for devices like printers and servers, not other services on SME)

and:
Quote
Also then configure your sme server for external DNS resolution

I do not believe this can be done (or am I misinterpreting your instructions). When I set SME for external DNS resolution the hostname page is no longer accessible and a message is given that DNS relay is active and thus you cannot add hostnames manually for internal devices.

True, I did have a plan in mind but I wanted to ask the community for their input and am serious about considering any comments. There are a lot of sharp minds out there and I was interested in others' experiences. I see no harm in that and exposing this topic may help someone else later on.

Thank you again for your time.

Kevin

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Best practice for domain setup
« Reply #11 on: September 01, 2009, 08:52:27 AM »
kevinb

Your (unusual) requirements are clearer now.

I did not mean to use the Hostnames panel to direct your web requests to the external dynamic IP, as that clearly won't permanently work.

It seems you mean you want hostnames for devices on the same main domain name, so unless, as you say, local DNS is enabled, then they cannot be configured.
I had assumed you meant other domain names (hosts) needed to be configured on your server and for those you could have local DNS enabled, for which DNS could happily resolve locally.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Best practice for domain setup
« Reply #12 on: September 01, 2009, 12:33:15 PM »
kevinb

Quote
But I am not sure how email is handled. If a user logs into domain.lan IMAP do they get the email sent to user@domain.tld?

If you take time to read the manual you will find your question is answered in the Pseudonyms section
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter9
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Best practice for domain setup
« Reply #13 on: September 01, 2009, 07:03:57 PM »
Thank you Mary, I would not have thought to look in Pseudonyms.

I will report back my results when I have them.

Offline kevinb

  • *
  • 237
  • +0/-0
Re: Best practice for domain setup
« Reply #14 on: September 11, 2009, 01:03:29 AM »
Well this did not work so well.

The issue that I do not have a simple solution for is that Horde uses the true domain in the return email address. Since this domain does not exist on the internet spam filters are rejecting the email.

Back to plan A.

Thanks everyone,

Kevin