CentOS7使用firewalld打开关闭防火墙与端口[转]
转自:http://www.cnblogs.com/moxiaoan/p/5683743.html
1、firewalld的基本使用
启动: systemctl start firewalld
查看状态: systemctl status firewalld 
停止: systemctl disable firewalld
禁用: systemctl stop firewalld
2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed
3.配置firewalld-cmd
查看版本: firewall-cmd --version
查看帮助: firewall-cmd --help
显示状态: firewall-cmd --state
查看所有打开的端口: firewall-cmd --zone=public --list-ports
更新防火墙规则: firewall-cmd --reload
查看区域信息:  firewall-cmd --get-active-zones
查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0
拒绝所有包:firewall-cmd --panic-on
取消拒绝状态: firewall-cmd --panic-off
查看是否拒绝: firewall-cmd --query-panic
那怎么开启一个端口呢
添加
firewall-cmd --zone=public --add-port=80/tcp --permanent    (--permanent永久生效,没有此参数重启后失效)
重新载入
firewall-cmd --reload
查看
firewall-cmd --zone= public --query-port=80/tcp
删除
firewall-cmd --zone= public --remove-port=80/tcp --permanent
CentOS7使用firewalld打开关闭防火墙与端口[转]的更多相关文章
- CentOS7使用firewalld打开关闭防火墙与端口(转载)
		
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...
 - 关于学习CentOS7使用firewalld打开关闭防火墙和端口
		
1.firewalld简介 firewalld是centos7的一大特点,主要有两个优点:一是支持动态更新,不需要重启服务:二就是加入了防火墙的“zone”概念. firewalld有图形界面和工具界 ...
 - CentOS7使用firewalld打开关闭防火墙与端口(转)
		
CentOS7使用firewalld打开关闭防火墙与端口 1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop ...
 - CentOS7使用firewalld打开关闭防火墙与端口
		
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disab ...
 - CentOS7 使用firewalld打开关闭防火墙与端口
		
1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status f ...
 - CentOS7 使用firewalld打开关闭防火墙以及端口
		
1.firewalld的基本使用 启动 systemctl start firewalld 关闭 systemctl stop firewalld 查看状态 systemctl status fire ...
 - 莫小安 CentOS7使用firewalld打开关闭防火墙与端口
		
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disab ...
 - 转 CentOS7使用firewalld打开关闭防火墙与端口
		
http://blog.csdn.net/huxu981598436/article/details/54864260 开启端口命令 输入firewall-cmd --query-port=6379/ ...
 - Linux 之CentOS7使用firewalld打开关闭防火墙与端口
		
一.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status f ...
 
随机推荐
- Java 编程下简介 Class 与类加载
			
即使有一个类并对它一无所知,但其实它本身就包含了许多信息,Java 在需要使用到某个类时才会将类加载,并在 JVM 中以一个 java.lang.Class 的实例存在.从 Calss 实例开始,可以 ...
 - wireshark in ubuntu
			
安装 sudo apt-get install wiresharksudo dpkg-reconfigure wireshark-commonsudo usermod -a -G wireshark ...
 - 获取windows可执行文件的version信息(版本号)
			
之前在msdn上Version Information看到文件版本信息的介绍,看着整体比较复杂,就一直没做.现在需要获取ocx文件的版本号,所以查找了下相关资料,比较有用的就是VS_FIXEDFILE ...
 - spring boot guava cache 缓存学习
			
http://blog.csdn.net/hy245120020/article/details/78065676 ****************************************** ...
 - idea 换行设置
 - 基于jQuery仿QQ音乐播放器网页版代码
			
基于jQuery仿QQ音乐播放器网页版代码是一款黑色样式风格的网页QQ音乐播放器样式代码.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div class="m ...
 - VMWare: eth0: error fetching interface information : device not found
			
VMWare: eth0: error fetching interface information : device not found 今天在VMware上新搭建的Redhat Linux 64 ...
 - Android View体系(八)从源代码解析View的layout和draw流程
			
相关文章 Android View体系(一)视图坐标系 Android View体系(二)实现View滑动的六种方法 Android View体系(三)属性动画 Android View体系(四)从源 ...
 - Spring WebSocket初探2 (Spring WebSocket入门教程)<转>
			
See more: Spring WebSocket reference整个例子属于WiseMenuFrameWork的一部分,可以将整个项目Clone下来,如果朋友们有需求,我可以整理一个独立的de ...
 - Go学习笔记 - 关于Java、Python、Go编程思想的不同
			
***看了两周七牛团队翻译的<Go语言程序设计>,基本上领略到了Go语言的魅力.学习一个语言,语法什么的任何人都是很容易学会,难就难在充分领略到这门编程语言的思想.*** ## 面向对象 ...