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

firewall常用命令

service firewalld restart     重启
service firewalld start 开启
service firewalld stop 关闭
service firewalld status 状态 也可以使用这些命令
(.service 可有可无)
systemctl restart firewalld.service 重启
systemctl start firewalld.service 启动
systemctl stop firewalld.service 关闭
systemctl status firewalld.service 状态 (.service 可有可无)
systemctl disable firewalld.service 禁止开机自启 systemctl enable firewalld.service 允许开机自启 查看运行状态
firewall-cmd --state 查看防火墙规则
firewall-cmd --list-all firewall切换为iptables防火墙 service firewalld stop 关闭
systemctl disable firewalld.service 禁止firewall开机启动 iptables简介
iptables 一般在/etc/sysconfig/iptables iptables常用命令 service iptables status 状态
service iptables stop 关闭
service iptables start 启动
service iptables restart 重启
chkconfig iptables off 禁止开机自启
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. 使用apache的poi来实现数据导出到excel的功能——方式二

    此次,介绍利用poi与layui table结合导出excel.这次不需要从数据库中查询出来的数据进行每一行的拼接那么麻烦,我们这次将标题定义一个id值,对应从数据库中查找出来的字段名即可. 1.po ...

  2. 在window里面安装ubuntu子系统并安装图形化界面

    一.开启windows子系统 1. 在win10设置里面开启开发人员选项 (设置-->更新安全--> 开发者选项  )选择开启 2.在控制面板里面开启windows子系统 (启用或关闭wi ...

  3. .Net Core 微服务容器系列基础目录篇

    1.开场白 HI,各位老铁,大家端午好,之前写了些关于.net core商城系列的文章,有点乱,今天心血来潮想着整理一下(今天只是先把目录列出来,后面的每篇文章这两天会进行重新修改的,目前先将就看下) ...

  4. SpringBootSecurity学习(16)前后端分离版之 OAuth2.0 加密配置

    示例代码的改进 前面使用spring cloud security和spring cloud oauth2写了一个第三方授权的例子,例子非常的简单,主要目的是用来熟悉OAuth2.0 申请授权的整个流 ...

  5. Spring5源码解析3-refresh方法初探

    接上回分析完register(annotatedClasses);后,现在来看一下refresh();方法. // new AnnotationConfigApplicationContext(App ...

  6. ELK 学习笔记之 elasticsearch环境搭建

    ELK概述: ElasticSearch是个开源分布式搜索引擎,它的特点有:分布式,零配置,自动发现,索引自动分片,索引副本机制,restful风格接口,多数据源,自动搜索负载等 Logstash是一 ...

  7. 浅析十大常见排序(含C++代码)

    首先声明一下,本文只对十种排序算法做简单总结,并参照一些资料给出自己的代码实现,并没有对某种算法理论讲解,更详细的 了解可以参考以下资料: 1.<data structure and algor ...

  8. Linux内存描述之内存节点node–Linux内存管理(二)

    日期 内核版本 架构 作者 GitHub CSDN 2016-06-14 Linux-4.7 X86 & arm gatieme LinuxDeviceDrivers Linux内存管理 #1 ...

  9. UVA - 11400 Lighting System Design

    题文: You are given the task to design a lighting system for a huge conference hall. After doing a lot ...

  10. 基于Matlab/Simulink的模型开发(连载一)

    概述 基于模型的开发将省去繁琐的代码编写步骤,只需要拖动几个模块,就像搭积木一般,轻松搭建您自己的飞控算法.飞控开发人员可以将更多的精力放在算法本身,而不需要过多关注代码实现的细节,这样将大大加快开发 ...