Is This DNS Zone File Correct?

3 posts / 0 new
Last post
#1 Mon, 03/02/2009 - 13:48
MeanStudios

Is This DNS Zone File Correct?

Greetings, I'm currently learning how to write my own DNS Zone Files and I was wondering if I was on the right track. Currently the domain I am writing this for (differentstrokes.org.au) is using google apps for it's email. I've been told that for this to be correct, there has to be an A entry for the domain name itself (i.e. differentstrokes.org.au. A 67.23.4.169) but I am a little confused. The syntax I'm using below doesn't have the domain name listed for like the 7 lines, is that because the "@" symbol is being used in front of the SOA line? And every record you list below that will still work without the domain name in front of it? And if that's the case, do I need to put an "@" symble in front of the first "A" record I have listed? I've put it down there so things are a bit more tidy. If someone could just explain to me what "@" does and also if my syntax is correct. Thank you :)

[code:1]$TTL 38400 @ IN SOA ns1.meenstreek.com. admin.meenstreek.com. ( 1236034833 ; serial 10800 ; refresh 3600 ; retry 604800 ; expire 38400 ) ; minimum TTL of 1 day

      IN NS ns1.meenstreek.com.

      IN MX 10 ASPMX.L.GOOGLE.COM.
      IN MX 20 ALT1.ASPMX.L.GOOGLE.COM.
      IN MX 30 ALT2.ASPMX.L.GOOGLE.COM.
      IN MX 40 ASPMX2.GOOGLEMAIL.COM.
      IN MX 50 ASPMX3.GOOGLEMAIL.COM.

      IN TXT "v=spf1 include:aspmx.googlemail.com ~all"

mail IN CNAME ghs.google.com. www IN CNAME differentstrokes.org.au. ftp IN CNAME differentstrokes.org.au.

      IN A 67.23.4.169

admin IN A 67.23.4.169 localhost IN A 127.0.0.1[/code:1]<br><br>Post edited by: MeanStudios, at: 2009/03/02 13:50

Mon, 03/02/2009 - 20:00
andreychek

Howdy,

A quick way to validate a zone file is by restarting bind, and then looking in the log file for any syntax errors that show up.

In your case, the line in between &quot;ftp&quot; and &quot;admin&quot; doesn't have a name associated with it at the beginning, that would probably cause some trouble.
-Eric

Mon, 03/02/2009 - 20:05 (Reply to #2)
andreychek

Oh, and you're right, all the ones above &quot;mail&quot; don't have one listed either.

I'd be surprised if that worked, but maybe that's some sort of shorthand I'm not familiar with :-)

Using the &quot;@&quot; symbol is like a variable, it refers to the current zone/domain name.

So in your case, I'd have expected to see that &quot;@&quot; symbol in front of any record that otherwise doesn't have a name in it (one that begins with &quot;IN&quot;).

But, the errors logs are king there -- if it doesn't complain, maybe that syntax is allowed :-)
-Eric

Topic locked