|
我安装的是linux7.2 server,完全安装,单网卡,在进行服务器配置时,参照帖子:http://www.linuxsir.cn/forum.php?mod=viewthread&tid=13686 进行的。
DHCP能正常工作,DNS有问题,我用nslookup做测试时,正向解析失败,提示错误“;; connetction timed out; no servers could be reached”。反向解析没问题。
我的基本配置如下:
************************************ Network
vi /etc/sysconfig/network
HOSTNAME= server
DOMAINNAME="mydomain.com.cn"
GATEWAY="192.168.0.1"
GATEWAY="eth0"
NETWORKING=YES
onBOOT=YES
FORWARD_IPV4="yes"
************************************ eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="none"
IPADDR="192.168.0.1"
NETMASK="255.255.255.0"
onBOOT="yes"
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
**************************************DHCP
vi /etc/dhcpd.conf
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name "weboa.com.cn";
option domain-name-servers 192.168.0.1;
range dynamic-bootp 192.168.0.10 192.168.0.250;
default-lease-time 1200;
max-lease-time 87600;
}
**************************************DNS
vi /etc/named.conf //配置named.conf
options {
directory "/var/named";
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "ip2name.conf";
};
zone "mydomain.com.cn" in {
type master;
file "name2ip.conf";
};
#########
vi /var/named/name2ip.conf //配置name2ip.conf
@ IN SOA www.mydomain.com.cn. root.www.mydomain.com.cn.
( 1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS www.mydomain.com.cn.
IN MX 10 mail.mydomain.com.cn.
localhost IN A 127.0.0.1
www IN A 192.168.0.1
mail IN A 192.168.0.1
pop3 IN A 192.168.0.1
smtp IN A 192.168.0.1
@ IN A 192.168.0.1
#########
vi /var/named/ip2name.conf //配置ip2name.conf
@ IN SOA www.mydomain.com.cn. root.www.mydomain.com.cn. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS www.mydomain.com.cn.
IN MX 10 mail.mydomain.com.cn.
1 IN PTR www.mydomain.com.cn.
#########
vi /etc/hosts //配置hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.1 www.mydomain.com.cn www
#########
vi /etc/resolv.conf
search mydomain.com.cn
nameserver 192.168.0.1
*********************************************************
以上为我所做的全部配置,DHCP能够正常运行,但是DNS正向解析始终不行,反向可以,我为此折磨了近一个星期,郁闷啊,请兄弟帮帮小弟,看看问题出在那里,小弟不胜感激,谢谢!!!! |
|