Centos7安装防火墙firewall
安装
1.下载
yum install -y firewalld
yum install -y firewall-config
2.启动
systemctl start firewalld # 启动
systemctl status firewalld #查看firewalld当前状态
systemctl enable firewalld # 开机启动
systemctl stop firewalld # 关闭
systemctl disable firewalld # 取消开机启动
使用
1.查看开放端口命令
firewall-cmd --list-ports
- 添加开放端口
firewall-cmd --zone=public --add-port=5000/tcp --permanent #对外网全部开放
firewall-cmd --zone=public --permanent --add-rich-rule 'rule family=ipv4 source address=192.168.0.1/24 port port=22 protocol=tcp accept' #添加端口开放
firewall-cmd --permanent --remove-rich-rule 'rule family=ipv4 source address=192.168.0.1/2 port port=5000 protocol=tcp accept' #删除端口开放
Centos7安装防火墙firewall的更多相关文章
- Centos7 配置防火墙 firewall
一.firewall 1.从CentOS7开始,默认使用firewall来配置防火墙,没有安装iptables(旧版默认安装). 2.firewall的配置文件是以xml的格式,存储在 /usr/li ...
- centos7 tengine2.1.2 编译安装 防火墙设置
安装 pcre 和 openssl yum -y install pcre pcre-devel yum -y install openssl openssl-devel wget http://te ...
- Centos7启动防火墙时报错Failed to start IPv4 firewall with iptables
今天在虚拟机的Linux系统(centos7)里安装Redis,准备学习一下布隆过滤器呢,安装完后使用Windows本机访问不了虚拟机里的Redis,telnet不通能够ping通.于是就去看防火墙, ...
- CentOS7中关闭firewall,并使用iptables管理防火墙
背景描述 在使用Docker时,启用centos7默认的firewall,启动端口映射时,防火墙规则不生效.docker默认使用了iptables防火墙机制.所以需要关闭firewall使用iptab ...
- Centos7 安装Nginx 防火墙开放80端口给外网访问
Centos7的防火墙改成了firewall,不再叫iptables,开放端口的方法如下: firewall-cmd --zone=public --add-port=80/tcp --permane ...
- centos7安装后的防火墙问题
centos7 默认使用firewall作为防火墙 停止并关闭开机自启动: systemctl stop firewalld.service #停止firewall systemctl disable ...
- centos7防火墙--firewall
centos7的防火墙变成firewall了 systemctl start firewalld.service#启动firewallsystemctl stop firewalld.service# ...
- CentOS7 下使用 Firewall防火墙系统封禁允许IP和端口的访问 端口转发 IP转发方法
CENTOS7的防火墙系统默认已经从iptable改成了firewall,使用方法也有所不同,下面是详细介绍 一.管理端口 列出 dmz 级别的被允许的进入端口 # firewall-cmd --zo ...
- CentOS7 安装Mono及Jexus
CentOS7安装Mono及Juxes 1 安装Mono 1.1 安装yum-utils 因为安装要用到yum-config-manager,默认是没有安装的,所以要先安装yum-utils包.命令如 ...
随机推荐
- jenkins报错Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password) 的处理
问题背景:jenkins服务器发布代码后需要执行删除缓存的操作ssh -p222 eus_pe_devadmin@1.1.1.1 "sudo rm -rf /dev/shm/nginx/hi ...
- Gan-based zero-shot learning 论文整理
1 Feature Generating Networks for Zero-Shot Learning Suffering from the extreme training data imbala ...
- Python数据库连接池DBUtils详解
what's the DBUtils DBUtils 是一套用于管理数据库连接池的Python包,为高频度高并发的数据库访问提供更好的性能,可以自动管理连接对象的创建和释放.并允许对非线程安全的数据库 ...
- RSA 签名、验证、加密、解密帮助类
import java.io.IOException; import java.security.InvalidKeyException; import java.security.KeyFactor ...
- LeetCode_447. Number of Boomerangs
447. Number of Boomerangs Easy Given n points in the plane that are all pairwise distinct, a "b ...
- [LeetCode] 68. Text Justification 文本对齐
Given an array of words and a length L, format the text such that each line has exactly L characters ...
- sqlyog 社区版
https://github.com/webyog/sqlyog-community/wiki/Downloads
- 10分钟弄懂Raft算法
分布式系统在极大提高可用性.容错性的同时,带来了一致性问题(CAP理论).Raft算法能够解决分布式系统环境下的一致性问题. 我们熟悉的ETCD注册中心就采用了这个算法:你现在看的这篇微信公众号文章, ...
- Consul服务告警之Watch机制
熔断保护在Consul和Ocelot中都有实现,意思就是当一个服务不正常时(比如我们的一个服务实例挂了,Consul的健康检查机制检测到了),应该给系统维护人员给以告警.在Consul中,服务告警也是 ...
- [06]Go设计模式:适配器模式(Adapter Pattern)
目录 适配器模式 一.简介 二.代码 三.参考资料 适配器模式 一.简介 适配器模式(Adapter Pattern)是作为两个不兼容的接口之间的桥梁.这种类型的设计模式属于结构型模式,它结合了两个独 ...