linux as4上配置 DNS
本帖被 幸运星 从 技术交流 移动到本区(2007-12-06)
linux as4上配置 DNS
机器名为localhost, ip=192.168.1.155
安装bind-9.2.4-2.i386.rpm
rpm -ivh bind-9.2.4-2.i386.rpm
[root@localhost named]# rpm -q bind
bind-9.2.4-2
首先修改
第一步
修改DNS配置文件
vi /etc/named.conf
在named.conf的options部分添加这样2行
forwarders { 61.144.56.100; 61.144.56.101; };
version "amtium_amu";
#正向域名解析
zone "amu.com" IN {
type master;
file "amu.zone";
allow-update { none; };
};
#反向域名解析
zone "1.168.192.in-addr.arpa" IN {
type master;
file "192.168.1.local";
allow-update { none; };
};
第二步配置域名文件内容
使用以下命令自己建立域名文件内容
vi /var/named/chroot/var/named/amu.zone
@ IN SOA amu.com root.amu.com (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS 192.168.1.1
www IN A 192.168.1.155
web IN A 192.168.1.168
ftp IN A 192.168.1.203
movie IN A 192.168.1.204
soft IN A 192.168.1.205
music IN A 192.168.1.206
jw IN A 192.168.1.210
mail IN A 219.159.83.58
vi /var/named/chroot/var/named/192.168.1.local
@ IN SOA amu.com. root.amu.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS amu.com.
155 IN PTR
168 IN PTR web.amu.com.
203 IN PTR ftp .amu.com
204 IN PTR movie.amu.com.
205 IN PTR soft.amu.com.
206 IN PTR music.amu.com.
210 IN PTR jw.amu.com.
ln -s /var/named/chroot/var/named/amu.zone /var/named/amu.zone
ln -s /var/named/chroot/var/named/192.168.1.local /var/named/192.168.1.local
service named restart
现在可以在别的机器上nslookup 了,到这里就大公告成了。GXGX
若还想要做的更加全面那就
第三步
检查配置情况,使用setup命令修改网络配置,在DNS设置中使用本机的ip即可
> [root@localhost named]# nslookup
> mail.amu.com
Server: 192.168.1.155
Address: 192.168.1.155#53
Name: mail.amu.com
Address: 192.168.1.155
>
到这说明正向解析成功
> 192.168.1.155
Server: 192.168.1.155
Address: 192.168.1.155#53
阅读(1756) | 评论(1) | 转发(0) |