联通常用DNS:
202.102.224.68
202.102.227.68
阿里DNS:
223.5.5.5
电信:
222.85.85.85
CentOS7网卡配置:
[root@centos7 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="772475e4-5aeb-426b-8e42-3b918d25d8e6"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.123.171
NETMASK=255.255.255.0
GATEWAY=192.168.123.1
CentOS7路由配置
[root@centos7 ~]# cat /etc/resolv.conf
#Generated by NetworkManager
search stu.mc
nameserver 222.85.85.85
nameserver 223.5.5.5
CentOS6网卡配置:
[root@centos6 ~]#cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=2bd086a4-d50d-4491-bd63-94bb7a0560b8
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
HWADDR=00:0C:29:B2:E8:00
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
IPADDR=192.168.123.161
NETMASK=255.255.255.0
GATEWAY=192.168.123.1
CentOS6路由配置:
[root@centos6 ~]#cat /etc/resolv.conf
#Generated by NetworkManager
search stu.mc
#No nameservers found; try putting DNS servers into your
#ifcfg files in /etc/sysconfig/network-scripts like so:
#DNS1=xxx.xxx.xxx.xxx
#DNS2=xxx.xxx.xxx.xxx
#DOMAIN=lab.foo.com bar.foo.com
nameserver 222.85.85.85
nameserver 223.5.5.5
关闭防火墙:
CentOS6:
service iptables stop
chkconfig iptables off
CentOS7:
systemctl stop firewalld
systemctl disable firewalld
SELinux
临时关闭:setenforce 0
[root@centos6 ~]#cat /etc/selinux/config
#This file controls the state of SELinux on the system.
#SELINUX= can take one of these three values: #enforcing - SELinux security policy is enforced.
#permissive - SELinux prints warnings instead of enforcing.
#disabled - No SELinux policy is loaded.
SELINUX=enforcing
#SELINUXTYPE= can take one of these two values:
#targeted - Targeted processes are protected,
#mls - Multi Level Security protection.
SELINUXTYPE=targeted