webmin配置DNS参考资料

Setting up a master DNS server for the bsac.com domain

Here's a quick howto on setting up a nameserver. I did this in a bit of a hurry, so I've accepted defaults for just about everything - it should be obvious how to select non-default options.

1. The main Webmin BIND control screen

image: BIND control screen

This is the first screen of the BIND control module in Webmin (my preferred administration interface). The first thing to note is that this display is a little more complex than the default installation - I have multiple views defined. These aren't overly-relevant to this discussion - it just complicates the screens a little. I'll be adding the bsac.com domain to my external view so that it can be seen from the Internet.

2. Creating a Master Zone

A Master Zone is one for which the original zone records are held on this server. BIND also supports slave zones (where the records are transferred from a remote server which holds the zone files), but I don't currently serve up any slave data.

image: Creating a new master zone

Most of this form is default; I added the domain name ("bsac.com"), the Master Server name ("ns1.bsac.com"), the email address ("duff@bsac.com"), and ticked the box marked "Add NS record for Master Server". All the times at the bottom can be altered if desired - but this is just an example, so I didn't.

Pressing the "Create" button builds the (empty) zone :

image: Blank canvas for bsac.com

3. Adding the A records

bsac.com has three A records of which I'm aware: bsac.com, www.bsac.com, and mail.bsac.com. I'll also add a fourth, ns1.bsac.com, because that was defined as the Master Server when the zone was created. A records are added by clicking the "A" icon in the "Edit Master Zone" screen above.

Firstly, I'll add bsac.com :

image: Adding the first A record

Note the trailing dot - absolute names need a trailing dot. Relative names (see later) don't. It's easy to forget this, but the mistake is easily visible!

The next record is www.bsac.com. I could add this in just the same way as above, but it's more usual to add it as a relative record - i.e. it is the "www" record, relative to the domain of "bsac.com" :

image: Adding a relative record

Note that there is not a trailing dot after "www". This is what makes it a relative record.

The "mail" and "ns1" records are added in exactly the same way :

image: All the A records I know of

4. Adding MX records

MX records are added by clicking the "MX" icon in the "Edit Master Zone" screen, but otherwise are just like adding A records :

image: Adding MX records

5. Testing

Clicking the "Apply Changes" in the main control screen makes this data live. This server will now respond to requests for information about the bsac.com domain according to the records we've just given it. So now it is a good idea to test it!

Because this server has separate views according to whether the client is inside my firewall or not, and because I've only created this zone in the external view, I need an external client to test it. I've used d236, as that is readily available:

image: Checking the records

It's a little sparse, with only one nameserver, but correct.

6. Adding Slave nameservers

Having just one nameserver is a bad idea, as a failure of that server would take the whole domain down. To prevent this, we run multiple nameservers, slaved from this master. I'll use the ones at everydns.net, as they are fast, robust, geographically-dispersed, and completely free.

The first task is to add the slave nameservers to the list of nameservers in the zone. This is performed by clicking the "NS" icon in the "Edit Master Zone" screen, and the records are added just like the "A" and "MX" records created earlier.

image: Adding more nameservers

Note that ns1.bsac.com was created when the zone was originally created (that's the purpose of the "create NS" tickbox). And remember that absolute names (like "ns1.everydns.net") need a trailing dot (or else they become "ns1.everydns.net.bsac.com"!)

By default, zone transfers are not allowed. This is for security reasons - if a hostile machine can read your zone file, it can determine which machines are worth attacking. So the next step in creating our slave servers is to permit them access to the zone file. This is achieved by clicking the "Edit Zone Options" in the "Edit Master Zone" screen.

image: Adding more nameservers

I've allowed zone transfers from 64.158.219.3 (which is ns1.everydns.net), and also told this server to notify the same machine if anything changes.

Lastly, we need to set up the service with EveryDNS. I've done this on my account, which is why some of my other domains are listed on the page.

image: Setting up the slaves

And that's it!
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值