2.软文推荐
3.软文推荐
CentOS7 的防火墙配置跟以前版本有很大区别,CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样
1、关闭防火墙:
systemctl stop firewalld.service connection closed. Disconnected from remote host(.7) at 17:21:23. Type 'help' to learn how to use Xshell prompt [d:~]$ Connecting to 192.168.0.7:22... Connection established. To escape to local shell, press 'Ctrl Alt ]'. Last login: Fri May 12 16:53:10 2017 from 192.168.0.221... [root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]#2、开启防火墙:
systemctl start firewalld.service3、关闭开机启动:
systemctl disable firewalld.service4、开启开机启动:
systemctl enable firewalld.service centos6存在以下两种方式:
一、service方式
查看防火墙状态:
[root@centos6 ~]# service iptables statusiptables:未运行防火墙。
开启防火墙:
[root@centos6 ~]# service iptables start关闭防火墙:
[root@centos6 ~]# service iptables stop二、iptables方式
先进入init.d目录,命令如下:
[root@centos6 ~]# cd /etc/init.d/ [root@centos6 init.d]#然后
查看防火墙状态:
[root@centos6 init.d]# /etc/init.d/iptables status暂时关闭防火墙:
[root@centos6 init.d]# /etc/init.d/iptables stop重启iptables:
[root@centos6 init.d]# /etc/init.d/iptables restart原文链接:https://blog.csdn.net/xc_zhou/article/details/80879810
来源:zyhot.com/article/5906.html
本站声明:内容来源于网络,内容不代表本站立场,仅供阅读参考,文章版权归原作者“本公司cmy.cn”所有。如有侵权,请联系我们删除。
免责声明:本站发布的内容(图片、视频和文字)以原创、来自本网站内容采集于网络互联网转载等其它媒体和分享为主,内容观点不代表本网站立场,如侵犯了原作者的版权,请告知一经查实,将立刻删除涉嫌侵权内容,联系我们56dr_com,同时欢迎投稿传递力量。

立即
返回
1
众所周知,美国虚拟主机相对于国内主机具有许多的优势,比如用户比较注重的主机价格、主机配置及主机备案等问题,但美国虚拟主机上...