CentOS 7.0 Firewall防火墙配置
启动停止
- 获取firewall状态
systemctl status firewalld.service
firewall-cmd --state
- 开启停止防火墙
开机启动:systemctl enable firewalld.service
启动:systemctl start firewalld.service
停止:systemctl stop firewalld.service
禁止开机启动:systemctl disable firewalld.service
开放端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
- –zone #作用域
- –add-port=80/tcp #添加端口,格式为:端口号/协议
- –permanent #永久生效,没有此参数重启后失效
禁用端口
firewall-cmd --zone=public --remove-port=80/tcp --permanent
应用修改
firewall-cmd --reload
查看所有开放的端口
firewall-cmd --zone=dmz --list-ports
其它参数说明
1. firewall-cmd --state ##查看防火墙状态,是否是running 2. firewall-cmd --reload ##重新载入配置,比如添加规则之后,需要执行此命令 3. firewall-cmd --get-zones ##列出支持的zone 4. firewall-cmd --get-services ##列出支持的服务,在列表中的服务是放行的 5. firewall-cmd --query-service ftp ##查看ftp服务是否支持,返回yes或者no 6. firewall-cmd --add-service=ftp ##临时开放ftp服务 7. firewall-cmd --add-service=ftp --permanent ##永久开放ftp服务 8. firewall-cmd --remove-service=ftp --permanent ##永久移除ftp服务 9. iptables -L -n ##查看规则,这个命令是和iptables的相同的
CentOS 7.0 Firewall防火墙配置的更多相关文章
- CentOS 7.0 firewall防火墙关闭firewall作为防火墙,这里改为iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤: 1.先检查是否安装了: iptables service iptables status 2.安装ip ...
- centos 7.0 firewall 防火墙常用命令
1.查看防火墙是否在运行 firewall-cmd --state [root@localhost ~]# firewall-cmd --staterunning 2.查看都有哪些端口添加到例外 f ...
- CentOS7下Firewall防火墙配置用法详解
官方文档地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide ...
- CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙
官方文档介绍地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Gui ...
- CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙--转载
最近在linux(这里用到的是Centos7的64位版本)安装nginx时,在开放80端口时用iptables设置端口 和重启服务发现提示未找到文件,在网络上收集查找后发现在Centos7中iptab ...
- CentOS7 Firewall防火墙配置用法详解
centos 7中防火墙是一个非常的强大的功能了,但对于centos 7中在防火墙中进行了升级了,下面我们一起来详细的看看关于centos 7中防火墙使用方法. FirewallD 提供了支持网络 ...
- Centos 7 关闭firewall防火墙启用iptables防火墙
一.关闭firewall防火墙 1.停止firewall systemctl stop firewalld.service 2.禁止firewall开机启动 systemctl disable fir ...
- CentOS 7.0如何安装配置iptables和seLinux以及firewalld
一.配置防火墙,开启80端口.3306端口 CentOS .0默认使用的是firewall作为防火墙,这里改为iptables防火墙. .关闭firewall: systemctl stop fire ...
- 在 CentOS 7.0 上安装配置 Ceph 存储
来自: https://linux.cn/article-6624-1.html Ceph 是一个将数据存储在单一分布式计算机集群上的开源软件平台.当你计划构建一个云时,你首先需要决定如何实现你的存储 ...
随机推荐
- Python之路(第十篇)迭代器协议、for循环机制、三元运算、列表解析式、生成器
一.迭代器协议 a迭代的含义 迭代器即迭代的工具,那什么是迭代呢? #迭代是一个重复的过程,每次重复即一次迭代,并且每次迭代的结果都是下一次迭代的初始值 b为何要有迭代器? 对于序列类型:字符串.列表 ...
- EditText输入小数
edtValue.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
- 2017/2/13:springMVC拦截器的使用
一.定义Interceptor实现类(主要是实现Handlerceptor接口) SpringMVC 中的Interceptor 拦截请求是通过HandlerInterceptor 来实现的.在Spr ...
- Sprign中常用注解
1.@Component 创建类对象,相当于配置<bean/> 2.@Service 与 @Component功能相同 2.1写在ServiceImpl类上 (建议在ServiceImpl ...
- 2019.01.23 hdu1693 Eat the Trees(轮廓线dp)
传送门 题意简述:给一个有障碍的网格图,问用若干个不相交的回路覆盖所有非障碍格子的方案数. 思路:轮廓线dpdpdp的模板题. 同样是讨论插头的情况,只不过没有前一道题复杂,不懂的看代码吧. 代码: ...
- 2019.01.08 bzoj4543: [POI2014]Hotel加强版(长链剖分+dp)
传送门 代码: 长链剖分好题. 题意:给你一棵树,问树上选三个互不相同的节点,使得这个三个点两两之间距离相等的方案数. 思路: 先考虑dpdpdp. fi,jf_{i,j}fi,j表示iii子树中离 ...
- WPF中的依赖项属性(转)
出处:https://www.cnblogs.com/axzxs2001/archive/2010/04/25/1719857.html 随着WPF的推广,不得不重新拾起WPF来,因为这块的产品越来越 ...
- hashCode() 和equals() 区别和作用(转)
出处:https://www.jianshu.com/p/5a7f5f786b75 本章的内容主要解决下面几个问题: 1 equals() 的作用是什么? 2 equals() 与 == 的区别是什么 ...
- boost-数据类型之auto、any、tuple、variant
1.auto.decltype auto是C++11中的关键字,它可以通过类型推导自动得到变量或对象的类型,需要注意的是auto会忽略引用,因为引用其实就代表原对象: #include <v ...
- B-论文一些好的句子
Due to high design and test costs for real many-core chips, simulators which allow exploring the bes ...