新装的Linux不能访问公网
新装的Redhat Enterpraise Linux 4,一切配置正常。可以访问局域网,但不能访问公网。可以访问网关。下面是iptables的默认配置:
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUTall--anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUTall--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,局域网的其他的机器则可以。 设置好DNS。 大家帮帮忙啊,急! ifconfig -a 上面结果 # ifconfig -a
eth0 Link encap:EthernetHWaddr 00:00:B4:00:06:09
inet addr:192.168.3.6Bcast:192.168.3.255Mask:255.255.255.0
inet6 addr: fe80::200:b4ff:fe00:609/64 Scope:Link
UP BROADCAST RUNNING MULTICASTMTU:1500Metric: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.1Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNINGMTU:16436Metric: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
NOARPMTU:1480Metric: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)
页:
[1]