Linode Forum
https://forum.linode.com/

correct master file?
https://forum.linode.com/viewtopic.php?f=19&t=917
Page 1 of 1

Author:  brlewis [ Tue Jun 01, 2004 10:12 pm ]
Post subject:  correct master file?

I'm hoping to use bind9 to run DNS myself. It looks like I get the right IP address back from dig @65.19.178.131 brlewis.com, but never having done this before I want to be sure I'm not doing some kind of subtle screwup. Anyone see a mistake in this master file for brlewis.com?

@ IN SOA ns1.brlewis.com. (
2004060101 ; Serial (yyyymmddxx)
86400 ; Refresh (1 day)
7200 ; Retry (2 hours)
604800 ; Expire (7 days)
86400 ) ; Minimum (1 day)

IN NS ns1.brlewis.com.

brlewis.com. IN A 65.19.178.131
www IN CNAME brlewis.com.

ns1 IN A 65.19.178.131

Author:  sweh [ Wed Jun 02, 2004 11:19 am ]
Post subject:  Re: correct master file?

brlewis wrote:
@ IN SOA ns1.brlewis.com. (
2004060101 ; Serial (yyyymmddxx)
86400 ; Refresh (1 day)
7200 ; Retry (2 hours)
604800 ; Expire (7 days)
86400 ) ; Minimum (1 day)


Aren't you missing an entry in this SOA record? After "ns1.brlewis.com." you need your contact address (with @ converted to .)

The format is
Code:
@ IN SOA origin mail.addr (
     serial refresh retry expire ttl)


The line beginning "brlewis.com." may be better of using @ as the name, so it references implicitly the zone you are defining (same as with the SOA record) for consistency. But that's just a matter of taste :-)

Author:  brlewis [ Thu Jun 03, 2004 9:26 pm ]
Post subject: 

I'll defer to someone else's taste. My DNS needs are so normal that I don't think I need to agonize over anything, or even get a deep understanding of all the RFCs.

@ IN SOA ns1.brlewis.com. brlewis.alum.mit.edu (
2004060101 ; Serial (yyyymmddxx)
86400 ; Refresh (1 day)
7200 ; Retry (2 hours)
604800 ; Expire (7 days)
86400 ) ; Minimum (1 day)

IN NS ns1.brlewis.com.

@ IN A 65.19.178.131
www IN CNAME brlewis.com.
ns1 IN A 65.19.178.131

Author:  brlewis [ Tue Jun 15, 2004 10:38 pm ]
Post subject: 

I suppose though I should at least have an MX record. I also added a $TTL line because bind was noting its absence in syslog (falling back on min ttl).

Code:
$TTL 1d
@ IN  SOA  ns1.brlewis.com. brlewis.alum.mit.edu (
                2004061501 ; Serial (yyyymmddxx)
                86400      ; Refresh (1 day)
                7200       ; Retry (2 hours)
                604800     ; Expire (7 days)
                86400 )    ; Minimum (1 day)

                IN      NS      ns1.brlewis.com.

@                       IN      A       65.19.178.131
@                       IN      MX 50   65.19.178.131
www                     IN      CNAME   brlewis.com.
ns1                     IN      A       65.19.178.131
ns2                     IN      A       65.19.178.131

Author:  sweh [ Wed Jun 16, 2004 7:03 am ]
Post subject: 

A quick glance and there's a few things. FIrstly, MX records should point to A records, not to IP addresses...

Code:
% nslookup -silent -type=mx brlewis.com 65.19.178.131
Server:         65.19.178.131
Address:        65.19.178.131#53

brlewis.com     mail exchanger = 50 65.19.178.131.brlewis.com.


There are a couple of minor points you may not be aware of. The first is that since you have multiple entries for "@" they can all be collapsed into one.

The second is the CNAME for www. Because it's a CNAME you now also have MX records, NS records and SOA records for the "www" name etc etc

Code:
% nslookup -silent -type=mx www.brlewis.com 65.19.178.131
Server:         65.19.178.131
Address:        65.19.178.131#53

www.brlewis.com canonical name = brlewis.com.
brlewis.com     mail exchanger = 50 65.19.178.131.brlewis.com.


It's just a minor point :-)

What I would do is:
Code:
$TTL 1d
@ IN  SOA  ns1.brlewis.com. brlewis.alum.mit.edu (
                2004061601 ; Serial (yyyymmddxx)
                86400      ; Refresh (1 day)
                7200       ; Retry (2 hours)
                604800     ; Expire (7 days)
                86400 )    ; Minimum (1 day)

                IN      NS      ns1.brlewis.com.
                IN      A       65.19.178.131
                IN      MX 50   mail.brlewis.com.

; We use the same IP address a lot, because we use different
; names for the same service.  We could just have
; "linode.brlewis.com" as the one name, but...
www                     IN      A       65.19.178.131
ns1                     IN      A       65.19.178.131
ns2                     IN      A       65.19.178.131
mail                    IN      A       65.19.178.131

Note that the same IP address is used in lots of places now. As the comment says, we _could_ reduce it and just have it twice (an A record for the @ line, and an A record for a general line (eg "linode") and have everything (NS, MX,WWW) all point to that. That's just a matter of taste :-)

Author:  wirehead [ Wed Jun 16, 2004 11:51 am ]
Post subject: 

And don't forget to do everybody a favor and create an SPF record. ;)

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/