QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1322|回复: 4

新装的Linux不能访问公网

[复制链接]
发表于 2006-8-31 21:56:03 | 显示全部楼层 |阅读模式
新装的Redhat Enterpraise Linux 4,一切配置正常。可以访问局域网,但不能访问公网。可以访问网关。
下面是iptables的默认配置:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
RH-Firewall-1-INPUT  all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
RH-Firewall-1-INPUT  all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     ipv6-crypt--  anywhere             anywhere            
ACCEPT     ipv6-auth--  anywhere             anywhere            
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
禁止防火墙后,还是访问不了,请大家给点建议。

再补充一下,路由也正常
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         192.168.3.1     0.0.0.0         UG    0      0        0 eth0
ping不通公网 ip,局域网的其他的机器则可以。
发表于 2006-8-31 22:01:56 | 显示全部楼层
设置好DNS。
回复

使用道具 举报

 楼主| 发表于 2006-9-1 07:38:57 | 显示全部楼层
大家帮帮忙啊,急!
回复

使用道具 举报

发表于 2006-9-1 08:19:56 | 显示全部楼层
ifconfig -a 上面结果
回复

使用道具 举报

 楼主| 发表于 2006-9-1 17:00:41 | 显示全部楼层
# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:00:B4:00:06:09  
          inet addr:192.168.3.6  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::200:b4ff:fe00:609/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5030774 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1729217 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3093030630 (2.8 GiB)  TX bytes:134315810 (128.0 MiB)
          Interrupt:11 Base address:0xc000

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:10856 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10856 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9355124 (8.9 MiB)  TX bytes:9355124 (8.9 MiB)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-9-22 17:35 , Processed in 0.080972 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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