Through this server, so that intranet users can access the Internet, here we use the FreeBSD with the bind to achieve DNS resolution, in fact, many DNS on the Internet use this software. The basic procedure is as follows:
◇The DNS parent domain (edu.cn) gives me the following information:
Domain-> wxicab.edu.cn
DNS master server-> 58.193.128.55 [dns1.wxicab.edu.cn]
DNS secondary server-> 58.193.128.56 [dns2.wxicab.edu.cn]
(Only the primary server configuration process is set up in this note)
◇ Card Interface Description:
xl0:3com External Network Network card interface
◇ pre-thought DNS information table:
Domain:wxicab.edu.cn
DNS Server:dns1.wxicab.edu.cn (58.193.128.55) dns2.wxicab.edu.cn (58.193.128.56)
58.193.128.55-> dns1.wxicab.edu.cn (DNS master server)
58.193.128.56-> dns2.wxicab.edu.cn (DNS secondary server)
58.193.128.53-> wxicab.edu.cn (Web server)
58.193.128.53-> www.wxicab.edu.cn (Web server)
58.193.128.52-> mail.wxicab.edu.cn (mail server)
58.193.128.51-> ftp.wxicab.edu.cn (file server)
58.193.128.50-> windowsupdate.wxicab.edu.cn (Windows Upgrade server)
58.193.128.49-> virus.wxicab.edu.cn (anti-virus server)
To begin the installation:
1. Download and install Freebsd6.1release
From ftp://ftp.freebsd.org/pub/freebsd/download freebsd6.1release image files, then carved into a CD-ROM, the server set to boot from the CD drive, start installation, installation I choose to minimize the installation, open ftp and SSH. The other default installation is OK. Specific reference to this article. Reboot the machine after installation.
2, the basic configuration
Configure/etc/rc.conf
# CD/ETC
# ee rc.conf
The contents are as follows:
Hostname= "dns1.wxicab.edu.cn"
Defaultrouter= "58.193.128.254"
ifconfig_xl1= "inet 58.193.128.55 netmask 255.255.248.0"
Inetd_enable= "YES"
Linux_enable= "YES"
Sshd_enable= "YES"
Usbd_enable= "YES"
3. Configure DNS
(1) New and configure/etc/named/db.wxicab.edu.cn (mappings from host name to IP)
# Cd/etc/namedb
# ee db.wxicab.edu.cn
The reads as follows:
$TTL 3d
@ in SOA dns1.wxicab.edu.cn. hostmaster.wxicab.edu.cn. (
2006626
3h
1h
1w
1h)
in NS dns1
in NS DNS2
in A 58.193.128.53
in MX ten mail.wxicab.edu.cn.
dns1 in a 58.193.128.55
dns2 in a 58.193.128.56
Mail on a 58.193.128.52
ftp in a 58.1 93.128.51
windowsupdate in a 58.193.128.50
virus in a 58.193.128.49
www. CNAME wxicab.edu.cn.
(2) New and configure/etc/named/db.58.193.128 (mappings from IP to host name)
# Cd/etc/namedb
# ee db.58.193.128
The contents are as follows:
$TTL 3d
@ in SOA dns1.wxicab.edu.cn. hostmaster.wxicab.edu.cn. (
2006626
3h
1h
1w
1h)
In NS dns1.wxicab.edu.cn.
In NS dns2.wxicab.edu.cn.
In PTR dns1.wxicab.edu.cn.
In PTR dns2.wxicab.edu.cn.
In PTR wxicab.edu.cn.
In PTR mail.wxicab.edu.cn.
Wuyi in PTR ftp.wxicab.edu.cn.
M in PTR windowsupdate.wxicab.edu.cn.
In PTR virus.wxicab.edu.cn.
(3) Configure Locahost.rev files:
# Cd/etc/namedb
# chmod 755 Make-localhost
#./make-localhost
after running in/etc/namedb/ The master directory will automatically generate Localhost.rev and localhost-v6.rev two files, Localhost-v6.rev is for the next generation of IP, temporarily not used, my Localhost.rev file content is:
$TTL 3600
@ in SOA dns1.wxicab.edu.cn. root.dns1.wxicab.edu.cn. (
20060627; Serial
3600; Refresh
900; Retry
3600000; Expire
3600); Minimum
In NS dns1.wxiabc.edu.cn.
1 in PTR localhost.wxicab.edu.cn.
(4) Configure/etc/namedb/named.conf files:
# Cd/etc/namedb
# ee named.conf
The contents are as follows:
Options {
directory "/etc/namedb";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
};
zone "." {
type hint;
file "Named.root";
};
Zone "0.0.127.in-addr. ARPA "{
type master;
file "Master/localhost.rev";
};
Zone "wxicab.edu.cn" {
type master;
file "db.wxicab.edu.cn";
};
Zone "128.193.58.in-addr.arpa" {
type master;
file "db.58.193.128";
};
(5) opens the named server and initiates it with the system
Add the following line in/etc/rc.conf:
named_enable= Yes
Edit save exit.
Restarts the server, using the top command to see if there is a named process, which indicates that the boot is OK. Then find a client, the DNS set up a cost machine ip:58.193.128.55, and then ping edu.cn test, if you can ping, the interpretation of the normal. You can also use the Nslookup tool to test. /span>