主机命令和 Web 浏览器不接受 hosts.conf 命令

主机命令和 Web 浏览器不接受 hosts.conf 命令
[root@MYPC etc]# lsb_release -a
LSB Version:    :core-4.0-ia32:core-4.0-noarch
Distributor ID: Fedora
Description:    Fedora release 14 (Laughlin)
Release:    14
Codename:   Laughlin

[root@MYPC etc]# uname -a
Linux MYPC 2.6.35.11-83.fc14.i686.PAE #1 SMP Mon Feb 7 06:57:55 UTC 2011 i686 i686 i386 GNU/Linux

[root@MYPC etc]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 127.0.0.1
nameserver 8.8.8.8

[root@MYPC etc]# cat /etc/host.conf 
multi on
order hosts,bind

[root@MYPC etc]# cat /etc/hosts
192.168.1.2 MYPC    # Added by NetworkManager
127.0.0.1   localhost.localdomain   localhost
::1 MYPC    localhost6.localdomain6 localhost6

127.0.0.0   audit.median.hu

[root@MYPC etc]# ping audit.median.hu
Do you want to ping broadcast? Then -b

[root@MYPC etc]# host -t a audit.median.hu
audit.median.hu has address 193.68.35.149
audit.median.hu has address 193.91.69.232
audit.median.hu has address 193.68.35.131
audit.median.hu has address 193.68.35.136

为什么ping显示的audit.median.hu是 127.0.0.0,为什么host -t a audit.median.hu显示的是 193.68.35.149?audit.median.hu只是一个示例站点 [托管广告等]

我的 Fedora PC 上只有一个缓存名称服务器:

yum -y install caching-nameserver
service named restart
chkconfig named on

我在网络管理器小程序中配置了我的 DNS 服务器地址:127.0.0.1、8.8.8.8

即使使用 Wireshark,我也可以看到它:

`195.70.37.149 DNS Standard query A audit.median.hu`

所以最大的问题是:为什么命令或我的网络浏览器无法host识别我已修改的audit.median.huIP 地址?

答案1

/etc/nsswitch.conf有吗

hosts:      files dns

放?

相关内容