CentOS7使用firewalld打开关闭防火墙与端口
来源:互联网 发布:数据库表设计教材 编辑:程序博客网 时间:2024/06/06 00:24
转载:http://www.cnblogs.com/moxiaoan/p/5683743.html
firewalld的基本使用
启动: systemctl start firewalld查看状态: systemctl status firewalld 停止: systemctl disable firewalld禁用: systemctl stop firewalld=====================================================
systemctl的基本使用
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
配置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
阅读全文
0 0
- centos7 firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口(转载)
- 莫小安 CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- 莫小安 CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- CentOS7使用firewalld打开关闭防火墙与端口
- 机房重构---七层登录下(配置文件的使用)
- 常用命令及其它经验总结
- 访问被挡QQ空间的技巧分析
- Redis入门之五大数据类型及常用操作
- Python初入门(七)(Head First Python 第七章 集成在一起)
- CentOS7使用firewalld打开关闭防火墙与端口
- 数据结构之快速排序
- 容斥原理 —— 求1~n有多少个数与k互质(二进制算法详细解释&模板)
- TCP流量控制与拥塞控制
- HTML标签(一)
- js之错误与调试
- [POJ
- [机器学习3]参数学习
- Exception 异常