RedHat 7 系列之后 系统把默认的iptables 换成了 Firewall 所以我们要适应 这个新的防火墙管理

-------------------服务相关-------------------

- 启动 : systemctl start firewalld.service

- 重启 : systemctl restart firewalld.service

- 停止 : systemctl stop firewalld.service

- 禁止开机启动 : systemctl disable firewalld.service

-------------------操作相关-------------------

- 查看版本 : firewall-cmd --version

- 查看帮助 : firewall-cmd --help

- 查看FireWall状态 : firewall-cmd --state

- 查看区域信息 : firewall-cmd --get-active-zones

- 更新防火墙规则 :

1firewall-cmd --reload 软重启不会断开端口链接

2firewall-cmd --complete-reload 硬重启会断开端口链接

- 查看zong下打开的端口 : firewall-cmd --zone=(zone) --list-ports  // 这里的zong 可以更换成 : drop(丢弃)/block(阻塞)/public(公开)/external(外部)/dmz(隔离区)/work(工作)/home(家庭)/internal(内部)/trusted(受信任的)

-------------------常用端口-------------------

firewall-cmd --zone=public --add-port=80/tcp --permanent 开放80

firewall-cmd --zone= public --remove-port=80/tcp --permanent 关闭80

firewall-cmd --zone=public --add-port=3306/tcp --permanent 开放3306

RedHat7系列(Centos/Debian) FireWall 防火墙 设置的更多相关文章

  1. centOS服务器-firewall防火墙开放端口

    前言 日常开发中,我们常常会因为服务器各种端口未开放出现各种问题,下面我们就来简单了解下服务器上的端口开放!!! 作为一个后台开发,日常接触最多的除了代码就是服务器了: 产品:谁谁, 线上有个功能报错 ...

  2. CentOS 7.0防火墙设置

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙.1.关闭firewall:systemctl stop firewalld.servicesystemctl ...

  3. (十八)Centos之firewall 防火墙命令

    如果你的系统上没有安装使用命令安装 #yum install firewalld  //安装firewalld 防火墙 开启服务 # systemctl start firewalld.service ...

  4. centos 7 firewall(防火墙)开放端口/删除端口/查看端口

    1.firewall的基本启动/停止/重启命令 复制#centos7启动防火墙 systemctl start firewalld.service #centos7停止防火墙/关闭防火墙 system ...

  5. CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙

    官方文档介绍地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Gui ...

  6. Skynet服务器框架(十) CentOS 防火墙设置

    引言: 今天修改了 skynet 服务器的 IP 地址(即 config 文件中的 address 和 master 两项参数,IP 与当前及其的保持一致,端口号为 2017),然后使用一个简单的客户 ...

  7. CentOS 7.4中firewall防火墙详解和配置以及切换为iptables防火墙

    转载:https://blog.csdn.net/xlgen157387/article/details/52672988 一.firewall介绍 CentOS 7中防火墙是一个非常的强大的功能,在 ...

  8. centos 7 防火墙设置

    一.介绍 centos 7 的防火墙是以firewalld daemon的形式存在,区别于iptables 二.使用方法 centos7 主要通过firewall-cmd命令来管理firewall, ...

  9. CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙--转载

    最近在linux(这里用到的是Centos7的64位版本)安装nginx时,在开放80端口时用iptables设置端口 和重启服务发现提示未找到文件,在网络上收集查找后发现在Centos7中iptab ...

随机推荐

  1. <Python Text Processing with NLTK 2.0 Cookbook>代码笔记

    如下是<Python Text Processing with NLTK 2.0 Cookbook>一书部分章节的代码笔记. Tokenizing text into sentences ...

  2. ImportError: No module named _tkinter, please install the python-tk package ubuntu运行tkinter错误

    这是由于Python的版本没有包含tkinter的模块,只需要把tk的package安装就可以了. 一般在Linux才出现,windows版本一般已经包含了tkinter模块. apt-get ins ...

  3. mysql5.5.25 中文问题 my.ini没有及配置问题 修改默认编码方式

    1.当你向mysql输入中文后,用select查询结果中文变成了问号,那你就往下看. 2.打开cmd,进入mysql,输入show variables like"%char%";可 ...

  4. tensorFlow入门实践(二)模块化

    实现过一个例子之后,对TensorFlow运行机制有了初步的了解,但脑海中还没有一个如何实现神经网络的一个架构模型.下面我们来探讨如何模块化搭建神经网络,完成数据训练和预测. 首先我们将整体架构分为两 ...

  5. vim安装

    vim的下载与安装 在线安装 sudo yum install vim 源码编译安装 1)   下载源码 git clone https://github.com/vim/vim.git 2)   编 ...

  6. java知识点总结--java开发环境搭建

    安装 JDK(Java Development Kit) 和开发工具 如:eclipse,myeclipse,idea等 配置系统环境变量 查看系统环境变量 1.通过 我的电脑--->“属性”- ...

  7. Qt 快捷键

  8. 马凯军201771010116《面向对象与程序设计Java》第十一周学习总结

    一.理论知识部分 第九章  集合 1.数据结构介绍:线性结构:线性表,栈,队列,串,数组,文件.非线性结构:树,图. 散列表:又称为哈希表. 散列表算法的基本思想是:以结点的关键字为自变量,通过一定的 ...

  9. Python成长之路【第四篇】模块儿

    模块儿&包(* * * * *) 模块儿(modue)的概念 在计算机程序的开发过程中,随着程序代码越写越多,在一个文件里代码就会越来越长,越来越不容易维护. 为了编写可维护的代码,我们把很多 ...

  10. 在eclipse上集成安装阿里巴巴代码规约P3C插件

    在eclipse上集成安装阿里巴巴代码规约P3C插件 参照网址: https://jingyan.baidu.com/article/2d5afd6923e78b85a3e28e5e.html 首先进 ...