首先接入网络
然后打开终端 vi /etc/sysconfig/network-scripts/ifcfg-eth0(网卡名字)
修改配置:
ONBOOT=yes
BOOTPROTO=static
IPDDR=10.0....
GATEWAY=10.0.1.1
NETMASK=255.255.255.0
退出保存
重启网络服务:service network restart
或者/etc/init.d/network restart
配置DNS: vi /etc/resolv.conf
nameserver 222.222.222.222
iptables -L
iptables -F
service iptables save