LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1960|回复: 4

能ping通外网,但打不开网页(新手提问)

[复制链接]
发表于 2006-11-10 20:41:09 | 显示全部楼层 |阅读模式
能ping通外网ip和域名,但打不开网页也上不了qq,系统是debian sarge
用ethereal抓包,显示192.168.100.2(dns)--》192.168.40.216(我的ip)standard query response , no such name  
最近网关禁了arp广播,只打开了21和23端口,之前是能打开网页的
网卡配置:

### etherconf DEBCONF AREA. DO NOT EDIT THIS AREA OR INSERT TEXT BEFORE IT.
auto lo eth0

iface lo inet loopback

iface eth0 inet static
        address 192.168.40.125
        netmask 255.255.255.0
        broadcast 192.168.40.255
        gateway 192.168.40.1
        name ghh
        network 192.168.40.0


### END OF DEBCONF AREA.  PLACE YOUR EDITS BELOW; THEY WILL BE PRESERVED.

```````````````````````````````````````````````````````````

DNS是192.168.100.2


windowsXP 里面是
192.168.40.125
255.255.255.0
192.168.40.1-网关
192.168.100.2-DNS
winXP 可以正常上网

麻烦老大
发表于 2006-11-11 00:43:59 | 显示全部楼层
echo "nameserver 192.168.100.2" >> /etc/resolv.conf
回复 支持 反对

使用道具 举报

发表于 2006-11-11 12:50:51 | 显示全部楼层
I preferred to check following steps below:
1: nslookup - check whether the DNS is correct.
2: telnet www.google.com 80 - check whether you can connect to 80 port of www.google.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-15 18:12:32 | 显示全部楼层
谢谢老大帮忙
补充一下
debian里面能够上不同网段的ftp(ftp://192.168.180.2))和打开学校的主页(http://www.gdcvi.net/main/index.asp)
windowsXP里面不能用代理(80端口)打开网页,但可以用代理(80端口)下载
网关还打开了4001端口

下面是测试结果

q:~# telnet www.google.com 80
Trying 64.233.189.104...
telnet: Unable to connect to remote host: Connection timed out
q:~# telnet www.google.com
Trying 64.233.189.104...
telnet: Unable to connect to remote host: Connection timed out

q:~# telnet 192.168.100.2 80
Trying 192.168.100.2...
telnet: Unable to connect to remote host: Connection refused
q:~# telnet 192.168.100.2
Trying 192.168.100.2...
Connected to 192.168.100.2.
Escape character is '^]'.


SunOS 5.8

login:

q:~# telnet 192.168.40.1 80
Trying 192.168.40.1...
telnet: Unable to connect to remote host: Connection refused
q:~# telnet 192.168.40.1
Trying 192.168.40.1...
Connected to 192.168.40.1.
Escape character is '^]'.

*********************************************************
*          All rights reserved (1997-2003)              *
*      Without the owner's prior written consent,       *
*no decompiling or reverse-engineering shall be allowed.*
*********************************************************


Login authentication


Password:

(下面这个命令不会用,不知道是不是这样用)
q:~# nslookup
> www.google.com
Server:         192.168.100.2
Address:        192.168.100.2#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
www.l.google.com        canonical name = www-china.l.google.com.
Name:   www-china.l.google.com
Address: 64.233.189.104
>
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-15 18:12:33 | 显示全部楼层
发多了一次
不知道怎莫删除帖子的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表