CentOS 7的防火墙配置跟以前版本有很大区别,CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样。

  1. firewall常用命令
  2.  
  3. service firewalld restart 重启
  4. service firewalld start 开启
  5. service firewalld stop 关闭
  6. service firewalld status 状态
  7.  
  8. 也可以使用这些命令
  9. (.service 可有可无)
  10. systemctl restart firewalld.service 重启
  11. systemctl start firewalld.service 启动
  12. systemctl stop firewalld.service 关闭
  13. systemctl status firewalld.service 状态
  14.  
  15. (.service 可有可无)
  16. systemctl disable firewalld.service 禁止开机自启
  17.  
  18. systemctl enable firewalld.service 允许开机自启
  19.  
  20. 查看运行状态
  21. firewall-cmd --state
  22.  
  23. 查看防火墙规则
  24. firewall-cmd --list-all
  25.  
  26. firewall切换为iptables防火墙
  27.  
  28. service firewalld stop 关闭
  29. systemctl disable firewalld.service 禁止firewall开机启动
  30.  
  31. iptables简介
  32. iptables 一般在/etc/sysconfig/iptables
  33.  
  34. iptables常用命令
  35.  
  36. service iptables status 状态
  37. service iptables stop 关闭
  38. service iptables start 启动
  39. service iptables restart 重启
  40. chkconfig iptables off 禁止开机自启
  41. chkconfig iptables on 允许开机自启

centos 7 防火墙firewall 与iptables 的一些常用命令的更多相关文章

  1. Linux防火墙firewall和iptables的使用

    防火墙是整个数据包进入主机前的第一道关卡. Linux中有两种防火墙软件,ConterOS 7.0以上使用的是 firewall,ConterOS 7.0以下使用的是 iptables,本文将分别介绍 ...

  2. LINUX防火墙firewall、iptables

    (1) 重启后永久性生效: 开启: systemctl enable iptables.service'.ln -s '/usr/lib/systemd/system/iptables.service ...

  3. CentOS 开启防火墙 firewall ,mysql 远程访问

    最近在阿里云服务器centos上安装了mysql数据库,默认是不开启远端访问功能,需要设置一下防火墙,在开放默认端口号 3306时提示FirewallD is not running,经过排查发现是防 ...

  4. CentOS 7 防火墙 firewall 的使用

    1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...

  5. centos查看系统/硬件信息及运维常用命令

    [root@yan-001 ~] # uname -a # 查看内核/操作系统/CPU信息的linux系统信息命令 [root@yan-001 ~] # head -n 1 /etc/issue # ...

  6. iptables简介及常用命令

    相关文件 iptables服务配置文件 -rw-------. 1 root root 2374 9月 4 2017 /etc/sysconfig/iptables-config iptables规则 ...

  7. Centos 的防火墙(firewalld,iptables)

    Centos系统防火墙介绍 概述: 1.Filewalld(动态防火墙)作为redhat7系统中变更对于netfilter内核模块的管理工具: 2.iptables service 管理防火墙规则的模 ...

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

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

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

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

随机推荐

  1. let与var的区别

    1.let作用域局限于当前代码块 文章中//后面的均为打印结果 代码1: { var str1 = "小花"; let str2 = "小明"; console ...

  2. Mycat 配置文件rule.xml

    rule.xml配置文件定义了我们对表进行拆分所涉及到的规则定义.我们可以灵活的对表使用不同的分片算法,或者对表使用相同的算法但具体的参数不同. 该文件里面主要有tableRule和function这 ...

  3. jQuery九大选择器和jQuery对ajax的支持

    一.jQuery九大选择器 1)基本选择器: <body> <div id="div1ID">div1</div> <div id=&qu ...

  4. 使用 BeanDefinition 描述 Spring Bean

    什么是BeanDefinition 在Java中,一切皆对象.在JDK中使用java.lang.Class来描述类这个对象. 在Spring中,存在bean这样一个概念,那Spring又是怎么抽象be ...

  5. JavaScript实现各种排序算法

    前言:本文主要是用JavaScript实现数据结构中的各种排序算法,例如:插入排序.希尔排序.合并排序等. 冒泡排序 function bubbleSort(arr) { console.time(& ...

  6. 【原】git如何撤销已提交的commit(未push)

    输入git log,我们可以看到最近的3次提交,最近一次提交是test3,最早的一次是test1,其中一大串类似黄色的字母是commit id(版本号) 如果嫌输出信息太多,可加上--pretty=o ...

  7. 面试|简单描述MySQL中,索引,主键,唯一索引,联合索引 的区别,对数据库的性能有什么影响(从读写两方面)

    索引是一种特殊的文件(InnoDB 数据表上的索引是表空间的一个组成部分),它们 包含着对数据表里所有记录的引用指针. 普通索引(由关键字 KEY 或 INDEX 定义的索引)的唯一任务是加快对数据的 ...

  8. QQ第三方授权登录OAuth2.0实现(Java)

    准备材料 1.已经备案好的域名 2.服务器(域名和服务器为统一主体或域名已接入服务器) 3.QQ号 4.开发流程:https://wiki.connect.qq.com/%E5%87%86%E5%A4 ...

  9. centos7版本以上root密码破解

    centos7版本以上root密码破解 主讲内容: 1.centos7版本以上root密码破解   一.centos7版本以上root密码破解 重启服务器,按键盘的方向键(上 下) 按e 进入紧急救援 ...

  10. url设计规范

    一. 什么是RESTful REST与技术无关,代表的是一种软件架构风格,REST是Representational State Transfer的简称,中文翻译为“表征状态转移” REST从资源的角 ...