linux网络配置正确,能够ping通内网地址,无法打开外网网页
在虚拟机里面装了linux后,发现内网能访问,外网访问不了。 首先确定网络配置没有问题,并且能够访问外网,通过以下方法进行确认: [root@localhost ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0 # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) DEVICE=eth0 BOOTPROTO=none HWADDR=00:50:56:bd:00:56 ONBOOT=yes NETMASK=255.255.255.0 IPADDR=172.16.6.50 GATEWAY=172.16.6.1 TYPE=Ethernet [root@localhost ~]# ping 172.16.6.1 PING 172.16.6.1 (172.16.6.1) 56(84) bytes of data. 64 bytes from 172.16.6.1: icmp_seq=1 ttl=255 time=0.890 ms 64 bytes from 172.16.6.1: icmp_seq=2 ttl=255 time=0.841 ms --- 172.16.6.1 ping statistics --- 2 packets transmitted, 2