We have a new DynDNS Community site!
Check out www.dyndnscommunity.com

Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

Board index : Services : Custom DNS/Secondary DNS

Author Message
 Post subject: Custom DNS - MX record for mail service - is this right?
PostPosted: Mon Aug 31, 2009 4:28 pm 
Offline

Joined: Mon Aug 31, 2009 4:11 pm
Posts: 6
Just setting up Custom DNS and would appreciate input if I have this correct. I have one server only and plan to run a mail server on this as well as other services.

Host TTL TYPE Data
bbs.ch 60 A 85.7.x.x
server001.bbs.ch 60 A 85.7.x.x
http://www.bbs.ch 60 CNAME bbs.ch
bbs.ch 3600 MX server001.bbs.ch

Most of the examples I read have setup DNS records for http://www.example.com, mail.example.com etc.

Should I setup another host mail.bbs.ch and make and MX record for that?

I am guessing I can use the hosts file on server001 and add the alias mail.bbs.ch or am I a million miles off wicket here?

BTW I have not redirected the names servers yet and the above is a shortened version of my real domain name.


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Mon Aug 31, 2009 4:52 pm 
Offline
DynDNS.com Prolific Poster

Joined: Tue Mar 04, 2008 6:08 pm
Posts: 1177
Location: Bergen, Norway
You have specified a URL as the name of your www CNAME. You can't do that. Other than that, your host list looks okay.

If you want the alias mail.bbs.ch, then create a CNAME. Local hosts files on your server won't do anyone else any good. But perhaps I didn't quite understand what you meant by that?

You don't need to have the hostname mail.bbs.ch. You can have whatever names you wish. Many people choose to have a mail hostname for simplicity, but that's it.

Remember that you cannot specify a CNAME in your MX records. An MX record must point to an A record. In other words, your current MX record is valid. But if mail.bbs.ch were a CNAME, you could not have used that in an MX record.

_________________
Any opinion I express is merely my personal opinion


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Tue Sep 01, 2009 1:49 am 
Offline

Joined: Mon Aug 31, 2009 4:11 pm
Posts: 6
mastermind wrote:
You have specified a URL as the name of your www CNAME. You can't do that. Other than that, your host list looks okay.

If you want the alias mail.bbs.ch, then create a CNAME. Local hosts files on your server won't do anyone else any good. But perhaps I didn't quite understand what you meant by that?

You don't need to have the hostname mail.bbs.ch. You can have whatever names you wish. Many people choose to have a mail hostname for simplicity, but that's it.

Remember that you cannot specify a CNAME in your MX records. An MX record must point to an A record. In other words, your current MX record is valid. But if mail.bbs.ch were a CNAME, you could not have used that in an MX record.


Thanks for the input, I think I am finally getting my head around this.

The CNAME record was actually already created for me and an example of it's use is here:

https://www.dyndns.com/support/kb/recor ... nameanchor

The part about the hosts filemane locally was about how computers behind a NAT resolve the "hostname" as per here:

https://www.dyndns.com/support/kb/loopb ... tions.html

However I can run DNS service on my local server so maybe it is better to set that up in one place to resolve all the internal addressing.

Once I read about port forwarding it made more sense, it does not matter of how many servers you pyhsically have, currently I have only one so I think the following is now correct.

Host TTL TYPE Data
bbs.ch 60 A 85.7.x.x
server001.bbs.ch 60 A 85.7.x.x
mail.bbs.ch 60 A 85.7.x.x
ftp.bbs.ch 60 A 85.7.x.x
http://www.bbs.ch 60 A bbs.ch
bbs.ch 3600 MX mail.bbs.ch

It is more about routing the service to the internal IP address so all of the services in this case would go to say 192.168.1.2 for example but in the future if I end up with a second server then some maybe routed to say 192.168.1.3

I think I have got that right. The reality as I think is that "Host" in this case is a human readable for an the "xxxx". in xxxx.bbs.ch is just really a label to make life easy, but generally they are indicative of the service they provide.

Can you tell me if my understanding is correct?

Thanks


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Tue Sep 01, 2009 2:42 am 
Offline
DynDNS.com Prolific Poster

Joined: Tue Mar 04, 2008 6:08 pm
Posts: 1177
Location: Bergen, Norway
magician wrote:
Thanks for the input, I think I am finally getting my head around this.

The CNAME record was actually already created for me and an example of it's use is here:

https://www.dyndns.com/support/kb/record_types_supported_in_custom_dns_standard_interface.html#cnameanchor
I don't think you understand me. You specified an HTTP URL (http://www.bbs.ch) and not a hostname (www.bbs.ch) as name of the CNAME. That is not a valid name for any hostname.

magician wrote:
The part about the hosts filemane locally was about how computers behind a NAT resolve the "hostname" as per here:

https://www.dyndns.com/support/kb/loopback_connections.html

However I can run DNS service on my local server so maybe it is better to set that up in one place to resolve all the internal addressing.
Ah, I see. Well, if your router does not support NAT loopback, then that sounds like a good idea. Beware, though, that it easily becomes confusing to maintain both local and public DNS zones for the same domain name. Personally, I prefer hosts files rather than local DNS services for public domains.

magician wrote:
Once I read about port forwarding it made more sense, it does not matter of how many servers you pyhsically have, currently I have only one so I think the following is now correct.

Host TTL TYPE Data
bbs.ch 60 A 85.7.x.x
server001.bbs.ch 60 A 85.7.x.x
mail.bbs.ch 60 A 85.7.x.x
ftp.bbs.ch 60 A 85.7.x.x
http://www.bbs.ch 60 A bbs.ch
bbs.ch 3600 MX mail.bbs.ch
See the line I've outlined in bold. It should be something like
Code:
www.bbs.ch 60 CNAME bbs.ch
The TTL is a bit short. You would rarely benefit from having a very short TTL for a CNAME. I would rather set it to for example 3600 (1 hour).

Other than that, I notice that you have many A hosts pointing to the same IP. You can obviously have as many as you wish, but remember that you will have to keep each and every one up-to-date. I would rather recommend having only one or two A hosts, and let the others be CNAMEs that point to one of the A hosts. Just make sure the hostname you specify as your MX is an A host.

magician wrote:
It is more about routing the service to the internal IP address so all of the services in this case would go to say 192.168.1.2 for example but in the future if I end up with a second server then some maybe routed to say 192.168.1.3

I think I have got that right. The reality as I think is that "Host" in this case is a human readable for an the "xxxx". in xxxx.bbs.ch is just really a label to make life easy, but generally they are indicative of the service they provide.

Can you tell me if my understanding is correct?

Thanks

Yes, that sounds right. The public DNS system directs users on the Internet to your public IP (which belongs to your router). Your router is responsible for routing the traffic further to your internal devices. The DNS system is basically just an IP lookup service.

_________________
Any opinion I express is merely my personal opinion


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Tue Sep 01, 2009 3:13 am 
Offline

Joined: Mon Aug 31, 2009 4:11 pm
Posts: 6
Hi,

Thanks for the feedback, I understand so much more now. There is quite a big learning curve here so much appreciated.

I can now go and update my settings.

Thanks


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Tue Sep 01, 2009 4:26 am 
Offline
DynDNS.com Prolific Poster

Joined: Tue Mar 04, 2008 6:08 pm
Posts: 1177
Location: Bergen, Norway
Yes, it's complex for sure. But in my humble opinion, the concepts of DNS are very simple. The complicating factor - in my opinion - is NAT and port forwarding. That makes it horribly complicated for average users (with only a moderate interest in the underlying logic) to serve anything from their home computers. NAT indirectly also makes DNS setup complicated, because the public DNS looks very different from a local setup.

The primary purpose of NAT is to preserve IP addresses, because of the ongoing global IP address shortage. An Internet customer with 300 Internet enabled devices can - with the help of NAT - manage with only 1 IP address instead of 300. If we had been able to migrate to IPv6 a long time ago, this would never have become a problem.

Of course, one of the really positive effects of NAT must be mentioned as well: By default, it is not possible to initiate inbound connections to the devices behind the NAT, which protects people from viruses and network worms. No firewall is more effective than a restrictive NAT. Not only can it block inbound connections, but it completely conceals the local network.

_________________
Any opinion I express is merely my personal opinion


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Fri Sep 11, 2009 10:39 am 
Offline

Joined: Mon Aug 31, 2009 4:11 pm
Posts: 6
I tried with a bbs.homip.net and got the whole shbang working including email so decided to bite the bullet and switch over with my own domain.

When I now use DNSCog using DNS lookup I get the following:

-- for the domain name
Quote:
; <<>> DiG 9.3.4-P1.1 <<>> bbs.ch
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4256
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 5

;; QUESTION SECTION:
;bbs.ch. IN A

;; ANSWER SECTION:
bbs.ch. 60 IN A 85.5.XX.XX

;; AUTHORITY SECTION:
bbs.ch. 84760 IN NS ns3.mydyndns.org.
bbs.ch. 84760 IN NS ns2.mydyndns.org.
bbs.ch. 84760 IN NS ns5.mydyndns.org.
bbs.ch. 84760 IN NS ns1.mydyndns.org.
bbs.ch. 84760 IN NS ns4.mydyndns.org.

;; ADDITIONAL SECTION:
ns3.mydyndns.org. 36553 IN A 208.78.69.76
ns2.mydyndns.org. 36495 IN A 204.13.249.76
ns5.mydyndns.org. 36553 IN A 203.62.195.76
ns1.mydyndns.org. 172 IN A 204.13.248.76
ns4.mydyndns.org. 36553 IN A 91.198.22.76

;; Query time: 58 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Sep 11 10:27:53 2009
;; MSG SIZE rcvd: 256


-- for the mail.bbs.ch

Quote:
; <<>> DiG 9.3.4-P1.1 <<>> mail.bbs.ch
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38221
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;mail.bbs.ch. IN A

;; ANSWER SECTION:
mail.bbs.ch. 61335 IN CNAME mail.infomaniak.ch.
mail.infomaniak.ch. 61336 IN A 84.16.68.123
mail.infomaniak.ch. 61336 IN A 84.16.68.124

;; AUTHORITY SECTION:
infomaniak.ch. 61329 IN NS ns2.infomaniak.ch.
infomaniak.ch. 61329 IN NS ns1.infomaniak.ch.

;; ADDITIONAL SECTION:
ns2.infomaniak.ch. 61329 IN A 84.16.67.66
ns1.infomaniak.ch. 61329 IN A 84.16.66.66

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Sep 11 10:21:53 2009


-- these are my records in Custom DNS

Quote:
Host TTL Type Data
bbs.ch 60 A 85.5.XX.XX
bbs.ch 3600 MX 10 mail.bbs.ch
mail.bbs.ch 60 A 85.5.XX.XX
www.bbs.ch 3600 CNAME 85.5.XX.XX
srv.bbs.ch 60 A 85.5.XX.XX


Note: I have shortened the real domain name.

So the first one looks good but the second does not look good for my email. Why is it still pointing at my old hosting?
Or is this just a matter of time to wait until this gets updated?


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Fri Sep 11, 2009 1:43 pm 
Offline
DynDNS.com Prolific Poster

Joined: Sun Feb 24, 2008 2:45 pm
Posts: 4223
Location: UK
You need to update your domain registration to reflect the fact that you want to use DynDNS's DNS servers. Right now the DNS servers for bbs.ch are reported as being at backslash.ch. You'll do that through your domain registrar.

_________________
Now you're looking for the secret... but you won't find it because you're not really looking. You don't really want to know the secret... You want to be fooled.

Do not PM me to draw my attention to a thread. Post in the forum and be patient.


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Fri Sep 11, 2009 2:16 pm 
Offline

Joined: Mon Aug 31, 2009 4:11 pm
Posts: 6
I have changed the names servers for bbs.ch with the register. The query for bbs.ch shows that it is using dyndns name servers (1 to 5)

So from the high level domain name resolution is through dyndns name servers.

It is the mx record I guess that is not getting looked up or refreshed at the correct place, well in fact the old service providers names servers. This was the query above where I was looking to see what mail.bbs.ch resolved to.

I would have thought that if the resolution is now with dyndns it would read the mx record.

Maybe I am just missing something simple?


Back to top
 Profile  
 
 Post subject: Re: Custom DNS - MX record for mail service - is this right?
PostPosted: Fri Sep 11, 2009 2:59 pm 
Offline
DynDNS.com Prolific Poster

Joined: Sun Feb 24, 2008 2:45 pm
Posts: 4223
Location: UK
The changes haven't taken - fresh queries still show the same, non DynDNS, name servers. Until you resolve that then people won't be using DynDNS's DNS server and so any records you enter in Custom DNS are invisible.

See this IntoDNS report on your domain.

_________________
Now you're looking for the secret... but you won't find it because you're not really looking. You don't really want to know the secret... You want to be fooled.

Do not PM me to draw my attention to a thread. Post in the forum and be patient.


Back to top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

Board index : Services : Custom DNS/Secondary DNS


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
All information © Dynamic Network Services, Inc. 2008