孤军奋战到半夜
终于可以给本帖画一个句号了!!!!!!!!
直接用dns:202.98.0.68是不行的
但至少本机里的bind9可以替我做域名转发了!
(和迭代?递归?)
复制内容到剪贴板
代码:
[No.301 03:31:19 bind ]# cat named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
[U]
[B]include "/etc/bind/named.conf.options";[/B][/U]
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
zone "linux.net" {
type master;
file "/etc/bind/db.linux.net";
};
zone "51.3.10.in-addr.arpa" {
type master;
file "/etc/bind/db.10.3.51";
};
// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };
// From the release notes:
// Because many of our users are uncomfortable receiving undelegated answers
// from root or top level domains, other than a few for whom that behaviour
// has been trusted and expected for quite some length of time, we have now
// introduced the "root-delegations-only" feature which applies delegation-only
// logic to all top level domains, and to the root domain. An exception list
// should be specified, including "MUSEUM" and "DE", and any other top level
// domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };
include "/etc/bind/named.conf.local";
[B][No.302 03:31:30 bind ]# cat named.conf.options [/B]
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.
[U][B] query-source address * port 53;[/B][/U]
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
202.98.0.68;202.98.5.68;
};
auth-nxdomain no; # conform to RFC1035
};
[No.303 03:32:26 bind ]# cat /etc/resolv.conf
[B]nameserver 10.3.51.41[/B]
domain linux.net
[No.304 03:32:35 bind ]# ifconfig inet
inet: error fetching interface information: Device not found
[No.305 03:32:45 bind ]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0D:61:90:56:E8
inet addr:10.3.51.41 Bcast:10.255.255.255 Mask:255.255.255.0
引用:
// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.
[U][B] query-source address * port 53;[/B][/U]
问题虽然解决
但知其然
不知其所以然
为什么需要指定53端口?
难道windows下是用53 sport ?
那vm里的linux呢?
学校固然有防火墙。。。。。。。
哪位大大的头脑比较清醒??