Centos7和Centos6 防火墙的区别:
Centos6 使用的是iptables ,Centos7 使用的是filewall

一、firewall常用命令

1、重启、关闭、开启、firewalld.serverice 服务

Service firewalld restart 重启
Service firewalld start  开启
Service firewalld stop  关闭
systemctl status firewalld
systemctl stop firewalld  关闭
systemctl start firewalld 开启
systemctl  restart firewalld 重启
systemctl  disable firewalld  关闭开机启动

2、查看状态

firewall-cmd --state

3、查看防火墙规则

firewall-cmd --list-all

二、添加端口命令

1、参数介绍:

firewall-cmd --permanent --add-port=3306/tcp
  1. firewall-cmd:是Linux提供的操作firewall的一个工具;
  2. –permanent:表示设置为持久;
  3. –add-port:标识添加的端口;

2、指定到具体的zone

另外,firewall中有Zone的概念,可以将具体的端口制定到具体的zone配置文件中。
例如:添加8010端口

firewall-cmd --zone=public --permanent --add-port=8010/tcp

–zone=public:指定的zone为public;

3、注意:

  1. 用户可以通过修改配置文件的方式添加端口,也可以通过命令的方式添加端口.
    修改的内容会在/etc/firewalld/目录下的配置文件中体现。

  2. firewalld 的操作只有重启之后才有效:service firewalld restart

Centos7 防火墙常用配置相关推荐

  1. Centos7 防火墙常用配置及说明

    一. Centos7和Centos6 防火墙的区别: 使用的工具不一样了.Centos6 使用的是iptables ,Centos7 使用的是filewall iptables 用于过滤数据包,属于网 ...

  2. Linux7查看防火墙日志,Linux入门教程:CentOS7防火墙firewalld配置,防火墙日志在哪呢...

    Linux入门教程:CentOS7防火墙firewalld配置,防火墙日志在哪呢 启动: systemctl start firewalld 停止: systemctl stop firewalld ...

  3. juniper防火墙常用配置

    juniper netscreen FW的常用配置   1.Juniper防火墙管理配置的基本信息 Juniper防火墙常用管理方式: ① 通过Web浏览器方式管理.推荐使用IE浏览器进行登录管理,需 ...

  4. Centos7防火墙常用操作打开关闭端口

    CentOS7 端口的开放关闭查看都是用防火墙来控制的,具体命令如下:一.打开/关闭某个端口 查看防火墙状态:(active (running) 即是开启状态) # systemctl status ...

  5. centos7防火墙firewalld配置,干货直接上手

    2019独角兽企业重金招聘Python工程师标准>>> [流程简介] centos7开始使用firewalld防火墙,防火墙规则在配置文件中加载,因此修改防火墙只需要[修改配置文件] ...

  6. Ubuntu 防火墙常用配置操作(ufw)【适用于 Debian 及其衍生版---Linux Mint、Deepin 等】

    ufw 是 Debian及其衍生版中的防火墙工具.这里只列出常用的一些操作,更详细操作可以自己使用 man 命令查看,或者是参考:http://wiki.ubuntu.org.cn/Ufw%E4%BD ...

  7. Centos7防火墙常用命令

    一.系统防火墙 1.启动防火墙 systemctl start firewalld 2.关闭防火墙 systemctl stop firewalld 3.查看状态 systemctl status f ...

  8. Centos7 防火墙配置

    CentOS 7.0默认使用的是firewall作为防火墙, 使用systemctl来管理服务和程序,包括了service和chkconfig Centos6 使用的是iptables,Centos7 ...

  9. VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装

    VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装 在阿里云开源镜像地址下载镜像 Index of /centos/7.2.1511/isos/x86_64/ http://mi ...

  10. Centos7 防火墙配置

    Centos7.3防火墙配置 1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态 firewall-cmd --state 3.开启 ...

最新文章

  1. html选择字段至左边的列表,css – 如何将列表项显示为保留从左到右顺序的列?...
  2. 路由器发展编年史 完结篇
  3. php return 返回html_【php socket通讯】php实现http服务
  4. Apache优化——日志管理
  5. RUNOOB python练习题 35 python print各色字体及背景
  6. OpenCV学习 4:摄像头视频读写与边缘检测
  7. 几个高效做事的法则,让你的一天有 25 小时
  8. 锁相环环路滤波器计算公式_锁相环PLL的电路原理以及基本构成
  9. Android_View,ViewGroup,Window之间的关系
  10. 非旋转Treap及可持久化[Merge,Split]
  11. Thinking in Java 9.6 适配接口
  12. psp用ps1模拟器_PSP自制系统用PS模拟器玩PS游戏指南
  13. [资源数据]民族代码
  14. 服务器光纤信号灯lan,光纤猫光信号灯不亮怎么办 光纤猫光信号灯不亮解决方法...
  15. 法国语言学校c1,法国留学的语言要求是什么?
  16. Android用MediaCodec将相机预览帧编码成MP4视频
  17. DNS服务器可能不可用
  18. QQ群文件更改默认下载路径方法
  19. CF 809C about proof of previous solution
  20. 计算机组装模拟网址,装机模拟器PC Building Simulator-电玩之家

热门文章

  1. 项目是如何完成的(一)
  2. QQ因系统日期无法打开
  3. 俄文化部长称Netflix是美国文化侵掠的工具,将占领每台电视机
  4. js学习笔记(新手向)
  5. MySQL + Atlas --- 部署读写分离
  6. Red hat linux ping: unknown host www.baidu.com
  7. SQL根据下标,返回split分割后字符串
  8. 1.Kubernetes权威指南 --- Kubernetes入门
  9. 10.企业安全建设指南(金融行业安全架构与技术实践) --- 安全预算、总结与汇报
  10. 9.企业应用架构模式 --- 领域逻辑模式