关于centos7 nat服务的配置

关于centos7 nat服务的配置

首先打开服务里面的nat服务关于centos7 nat服务的配置
确认VMnet8已启用,并查看本机ip

关于centos7 nat服务的配置

虚拟机打开网络编辑器,网关为192.168.78.2

关于centos7 nat服务的配置关于centos7 nat服务的配置

前三步nat虚拟机都适用
切换超级用户:su root
查看网络配置文件:

[[email protected] sha]# cd /etc/sysconfig/network-scripts/
[[email protected] network-scripts]# ls
关于centos7 nat服务的配置

编辑:vi ifcfg-ens33

关于centos7 nat服务的配置
关于centos7 nat服务的配置
可能显示的ip和设置里的不一样,这时重启下服务 service network restart
此时ping本机,ping百度就都ping通了
关于centos7 nat服务的配置