Date: Mon, 18 Dec 2000 14:26:30 +0100 From: Len Conrad <lconrad@Go2France.com> To: freebsd-isp@freebsd.org Subject: Re: Off topic - shell skills Message-ID: <5.0.2.1.0.20001218140245.03ada930@mail.Go2France.com> In-Reply-To: <NEBBJFIIGKGLPEBIJACLKEIJCJAA.davew@sai.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
>I have about 600 DNS zones on my DNS server, now because we are changing IP >addresses on our mail server most of those zones' MX/A records will need >updating. >How do I write a shell script that will change: Dave, I suppose many of your 600 domains share common RR's, and maybe even many have all RR's in common. Use the very handy BIND8 $INCLUDE directive to pkg all your common resource records in one include file: ;file: db.common @ NS ns1.ispplace.com. @ NS ns2.ispplace.com. ; @ MX 10 mailhost1.ispplace.com. @ MX 20 mailhost2.ispplace.com. ; Since you probably have many virtual www and ftp and smtp servers behind common ip's, you could have only a handful of zone files to cover all 600 domains. For groupA: ;file: db.groupA (maybe 500 domains?) @ SOA ns1.ispplace.com. hostmaster.ispplace.com. ( xxx xxx xxx xxx xxx ) ; $INLCUDE db.common ; ;web stuff @ A ip.ad.re.ss www A ip.ad.re.ss ftp A ip.ad.re.ss ; ;mail stuff smtp A ip.ad.re.ss pop A ip.ad.re.ss webmail A ip.ad.re.ss Then in your named.conf, all 500 zone statements refer to the same zone file: zone "somedomain.za" file "db.groupA"; zone "otherdomain.za" file "db.groupA"; zone "mydomain.za" file "db.groupB"; etc The above approach works for 600 or 6,000 or whatever number of domains. I recommend against CNAME's as way to dissociate hostnames from ip addresses, esp when the above techniques are available and the frequency of ip renumbering is low. It seems that most people screw up CNAME's sooner or later, plus CNAME's double the DNS traffic. Len http://BIND8NT.MEIway.com : Binary for ISC BIND 8.2.3 T9B for NT4 & W2K http://IMGate.MEIway.com : Build free, hi-perf, anti-spam mail gateways To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.0.2.1.0.20001218140245.03ada930>