centos7的防火墙配置
centos7 不在使用iptables作为防火墙, 而是使用firewalld规则, 好吃是支持动态更新, 不需要重启服务, 第二个就是加入了zone概念. 所以和centos6在防火墙配置上有很大的区别
配置文件:
firewalld配置文件有2个, /usr/lib/firewalld/ (系统配置, 尽量不要修改) 和 /etc/firewalld/ (用户配置)
运行firewalld
systemctl start firewalld
停止firewalld
systemctl disable firewalld
查看运行状态
systemctl status firewalld 或者 firewall-cmd --state
禁用firewalld规则
systemctl stop firewalld
更新防火墙规则
firewall-cmd --reload
firewall-cmd --complete-reload
查看打开的端口
firewall-cmd --zone=dmz --list-ports
加入端口到区域
firewall-cmd --zone=dmz --add-port=/tcp --permanent
后面添加 --permanent 永久生效
删除端口
firewall-cmd --zone= public --remove-port=/tcp --permanent
centos7的防火墙配置的更多相关文章
- CentOS7 Firewall防火墙配置用法详解
centos 7中防火墙是一个非常的强大的功能了,但对于centos 7中在防火墙中进行了升级了,下面我们一起来详细的看看关于centos 7中防火墙使用方法. FirewallD 提供了支持网络 ...
- 【转载】centos7.3 防火墙配置
firewalld介绍原文:https://www.cnblogs.com/moxiaoan/p/5683743.html 一. centos7 默认有一个防火墙 firewalld,具体使用如下: ...
- linux(centos7)防火墙配置firewalld和iptables
linux系统中防火墙管理有2种方式,分别是iptables和firewalld(centos7.x),下面介绍centos7的配置方法 一.firewalld: 因为cenos7默认使用firewa ...
- Centos7.3防火墙配置
1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态 firewall-cmd --state 3.开启.重启.关闭.firewall ...
- CentOS7 firewall防火墙配置笔记
开启端口 # firewall-cmd --zone=public --add-port=/tcp --permanent 命令含义: --zone #作用域 --ad ...
- CentOS7 中防火墙配置
systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 开 ...
- Centos7.4 防火墙配置
# service firewalld status; #查看防火墙状态 (disabled 表明 已经禁止开启启动 enable 表示开机自启,inactive 表示防火墙关闭状态 activate ...
- Centos7 Firewall 防火墙配置应用实例参考(转)
时间:2016-06-02 02:40来源:linux.it.net.cn 作者:IT 简单的配置,参考学习:--permanent 当设定永久状态时 在命令开头或者结尾处加入此参数,否则重载或 ...
- CentOS7.2防火墙配置
一.查看firewall以及firewall服务的状态. # 查看firewall服务状态 systemctl status firewalld # 查看firewall状态 firewall-cmd ...
随机推荐
- APUE(5)---标准I/O库 (3)
十.定位流 #include <stdio.h> long ftell(FILE *fp); //若成功,返回当前文件位置指示:若出错,返回-1L int fseek(FILE *fp, ...
- hdu2680 choose the best route
题目 题意:给定一个有向图,多个起点,一个终点,求起点到终点的最短路. 这道题TLE了好多次,两侧次的对比主要在于对起点的处理上,法一:最开始是采用的hdu2066--一个人的旅行,这道题的方法做的, ...
- 16、Docker的网络-host和none
16.1 none 创建一个容器使用网络none: [root@docker ~]# docker run -d --name test1 --network none busybox /bin/ ...
- java实现WC项目
个人项目:WC wc.exe 是一个常见的工具,它能统计文本文件的字符数.单词数和行数.这个项目要求写一个命令行程序,模仿已有wc.exe 的功能,并加以扩充,给出某程序设计语言源文件的字符数.单 ...
- Spring 注入集合类型
定义了一个类: @Service public class StringTest implements CachedRowSet,SortedSet<String>,Cloneable @ ...
- [program]编程习惯总结(2015_11_25)
1. 前端页面不要的数据,那么后端就不要发送到前端: 如:我们根据各个大洲来建立了一个个大洲的讨论区,但是在发表讨论页面.我们却希望用户去选择与当前帖子相关的国家标签. 那么,我们只需要在后台使用国家 ...
- 【C++】C++中的虚函数与纯虚函数
C++中的虚函数 先来看一下实际的场景,就很容易明白为什么要引入虚函数的概念.假设我们有一个基类Base,Base中有一个方法eat:有一个派生类Derived从基类继承来,并且覆盖(Override ...
- Thread in depth 2:Asynchronization and Task
When we want to do a work asynchronously, creating a new thread is a good way. .NET provides two oth ...
- Jersey Client Post Bean参数
代码: public static void main(String[] args) { Student st = new Student("Adriana", "Bar ...
- 初识powershell、nuget powershell 调试
初识powershell.nuget powershell 调试 补充 此文仅当做powershell的初步认识体验,关于nuget包里此脚本的使用官方已在vs2017停止支持,请看此文文末 前言 老 ...