我安裝了FreeBSD4.8, 也配置了DNS
我的網絡設定是:
Host: king.com
Domain: king.com
Gateway: 192.168.0.253
IP Address: 192.168.0.9
Netmask: 255.255.255.0
當我的 /etc/resolv.conf設定為: nameserver 192.168.0.9 時
可以解析到 king.com
當我的 /etc/resolv.conf設定為: nameserver 202.96.128.68時
可以解析到外網, 如 163.net sohu.com
我想讓這台電腦又能解析到 king.com 也能解析到外網.
我試著將 /etc/resolv.conf的文件內容設定為:
domain king.com
nameserver 192.168.0.9
nameserver 202.96.128.68
此時卻只能解析到 king.com
當解析 163.net 時卻顯示 *** king.com can't find www.163.net: Non-existent host/domain
那么我在FreeBSD中想設兩個 nameserver時我要如何設定才行
【发表回复】【查看CU论坛原帖】【关闭】
bopchung 回复于:2003-10-03 16:27:22
domain king.com
nameserver 127.0.0.1
nameserver 202.96.128.68
你是否设定为 dns cache server?
bopchung 回复于:2003-10-03 16:31:36
可以考虑以下这个djbdns-cache-server设定,但你需要完全放弃 BIND..
[b:505c6ef42f]只适合FreeBSD[/b:505c6ef42f]
按次序打入控制台啦!
#cd /usr/ports/sysutils/daemontools/; make install clean
#cd /usr/ports/net/djbdns; make install clean
#mkdir -p /service
#fetch -o /usr/local/etc/rc.d/services.sh http://matt.simerson.net/computing/mail/toaster/services.txt
#chmod 755 /usr/local/etc/rc.d/services.sh
#ln -s /usr/local/etc/rc.d/services.sh /usr/local/sbin/services
#dnscache-conf bind bin /usr/local/dnscache 127.0.0.1
#ln -s /usr/local/dnscache /service/dnscache
#echo "nameserver 127.0.0.1" > /etc/resolv.conf
#rehash; services start
#services start 开
#services stop 关
你还可以加入qmail或其它可以的在services内、
请叁考有关说明!
kinux 回复于:2003-10-03 16:47:59
[quote:9f6876d51e="bopchung"]domain king.com
nameserver 127.0.0.1
nameserver 202.96.128.68
你是否设定为 dns cache server?[/quote:9f6876d51e]
老大, 好久不见..
楼主, 你的问题是不是还沒有update.. 要等24小时..
bopchung 回复于:2003-10-03 16:50:24
嘻!
赖人用djb,就不用那个update呢!
好用呢!
kinux 回复于:2003-10-03 17:03:10
[quote:5a7e6f8788="bopchung"]嘻!
赖人用djb,就不用那个update呢!
好用呢![/quote:5a7e6f8788]
说的也是,
一个make之后,
几乎全世界都找到你..
bopchung 回复于:2003-10-03 17:37:03
还未算,djb不像BIND那样多设定档嘛,只需走入档目位置内,打入
以下就可以安装好 master dns server
只适合 FreeBSD ports 安装
#cd /usr/ports/sysutils/daemontools/; make install clean
#cd /usr/ports/net/djbdns; make install clean
#mkdir -p /service
#fetch -o /usr/local/etc/rc.d/services.sh http://matt.simerson.net/computing/mail/toaster/services.txt
#chmod 755 /usr/local/etc/rc.d/services.sh
#ln -s /usr/local/etc/rc.d/services.sh /usr/local/sbin/services
# tinydns-conf tinydns dnslog /usr/local/ tinydns [b:1b4e726828]1.2.3.1[/b:1b4e726828] <<<对应真的网络 IP,解释到的。
#echo "/etc/tinydns/[b:1b4e726828]1.2.3.1[/b:1b4e726828]" > /etc/tinydns2/env/ROOT
#ln -s /usr/local/tinydns /service/tinydns
#echo "nameserver 127.0.0.1" > /etc/resolv.conf
#rehash; services start
#cd /usr/local/ tinydns/root 网内一般计算机
#./add-host machine1.example.com 1.2.3.1
#./add-host machine2.example.com 1.2.3.2
#./add-host machine3.example.com 1.2.3.3
虚拟名 (alias)
#cd /etc/tinydns/root
#./add-alias www.example.com 1.2.3.1
#./add-alias ftp.example.com 1.2.3.1
名字伺服器
#cd /etc/tinydns/root
#./add-ns example.com 1.2.3.3
#./add-ns 3.2.1.in-addr.arpa 1.2.3.3
虚拟名 (alias)
# cd /etc/tinydns/root
#./add-mx example.com 1.2.3.1
#./add-mx king.com 1.2.3.1
master DNS Server
#axfrdns-conf axfrdns dnslog /usr/local/ tinydns /usr/local/ tinydns 1.2.3.5
zhangzhen 回复于:2003-10-04 11:03:30
ding
xf13579 回复于:2003-10-06 08:22:02
我按照上面朋友給出的方法?碓