centos7配置开启无线网卡,重启防火墙

centos7配置无线网卡:

在虚拟机为nat的网络连接下(就是默认的那个),centos7默认网卡未激活

可以设置 

文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3(这里的enp0s3不是固定的,看你具体情况,但是基本是en开头的)

 将 ONBOOT=no 改为 ONBOOT=yes

保存后重启网卡: service network restart

centos7重启防火墙:

防火墙配置后执行service iptables save/restart 出现”Failed to restart iptables.service: Unit iptables.service failed to load: No such file or directory.”错误,在CentOS 7或RHEL 7或Fedora中防火墙由firewalld来管理,当然你可以还原传统的管理方式。

1.systemctl stop firewalld
2.systemctl mask firewalld
3.yum install iptables-services(注:安装iptables-services)
4.systemctl enable iptables(注:设置开机启动)
5.systemctl [stop|start|restart] iptables
  #or
  service iptables [stop|start|restart]
6.service iptables save
#or
/usr/libexec/iptables/iptables.init save
原文地址:https://www.cnblogs.com/jiubiubiu/p/6165057.html