一、Centos7使用firewall的管理防火墙

1.firewalld基本使用

  启动:systemctl start firewalld

  关闭:systemctl stop firewalld

  状态:systemctl status firewalld

  开机禁用:systemctl disable firewalld

  开机启用:systemctl enable firewalld

2.配置项目

  例1:开放80端口

  a.开启80端口

  命令:firewall-cmd --zone=public --add-port=80/tcp --permanent    #--permanent永久生效,没有此参数重启后失效

  b.重新加载:

  命令: firewall-cmd --reload  #重新加载后生效

  例2:关闭80端口

  a.删除80端口:

  命令:firewall-cmd --zone=public --remove-port=80/tcp --permanet

  b.重新加载:

  命令: firewall-cmd --reload  #重新加载后生效

  例3:查看已开放的端口

  a.命令:firewall-cmd --zone=public --list-ports

Centos7 使用firewall管理防火墙的更多相关文章

  1. CentOS7使用firewalld管理防火墙与端口

    firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status fir ...

  2. Centos7(Firewall)防火墙开启常见端口命令

    Centos7默认安装了firewalld,如果没有安装的话,则需要YUM命令安装:firewalld真的用不习惯,与之前的iptable防火墙区别太大,但毕竟是未来主流讲究慢慢磨合它的设置规则: 安 ...

  3. CentOS7使用firewalld管理防火墙

    firewalld的基本使用 #启动 systemctl start firewalld #关闭 systemctl stop firewalld #查看状态 systemctl status fir ...

  4. CentOS7下Firewall防火墙配置用法详解

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

  5. CentOS7中firewall防火墙详解和配置,.xml服务配置详解

    修改防火墙配置文件之前,需要对之前防火墙做好备份 重启防火墙后,需要确认防火墙状态和防火墙规则是否加载,若重启失败或规则加载失败,则所有请求都会被防火墙 1. firewall-cmd --state ...

  6. Centos7管理selinux及使用firewalld管理防火墙

    CentOS 7.0默认使用的是firewall作为防火墙 1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status ...

  7. RHEL7 CentOS7 的 firewall命令简单介绍

    firewall 服务介绍 firewall 服务是 redhat7 和 centos7 系统默认安装好的防火墙服务,一个信任级别的概念来管理与之相关联的连接与接口.它支持 ipv4 与 ipv6,并 ...

  8. Centos7之firewall配置命令

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

  9. CentOS 7通过Firewall开放防火墙端口

    发现在CentOS 7上开放端口用iptables没效果(或者是sodino没找到正确的命令,传说Centos7 下默认的防火墙是 Firewall,替代了之前的 iptables)… 使用firew ...

随机推荐

  1. Ubuntu解决中文乱码

    gsettings set org.gnome.gedit.preferences.encodings candidate-encodings "['GB18030', 'UTF-8', ' ...

  2. hive的使用 + hive的常用语法

    本博文的主要内容有: .hive的常用语法 .内部表 .外部表 .内部表,被drop掉,会发生什么? .外部表,被drop掉,会发生什么? .内部表和外部表的,保存的路径在哪? .用于创建一些临时表存 ...

  3. 洛谷 P1445 [Violet]樱花

    #include<cstdio> #include<algorithm> #include<cstring> #include<vector> usin ...

  4. LPS UVA 11404 Palindromic Subsequence

    题目传送门 题意:求LPS (Longest Palidromic Subsequence) 最长回文子序列.和回文串不同,子序列是可以不连续的. 分析:1. 推荐->还有一种写法是用了LCS的 ...

  5. C3 Transitions, Transforms 以及 Animation总结

    C3 Transitions, Transforms 以及 Animation总结 前言 昨天有人咨询我面试的注意事项, 突然就意识到自己这块非常差, 竟然没有任何的印象, 准备看着大神老师的博客, ...

  6. h5-23-百度地图api

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name ...

  7. PowerShell~语法与运算符

    基本语法 变量:$开头 $a = "Hello" 条件语句:if else ) { Write-Host "偶数" } else{ Write-Host &qu ...

  8. AJPFX总结I/O流操作(二)

    FileWriter:该类没有特有的方法只有自己的构造函数.该类特点在于1,用于处理文本文件.2,该类中有默认的编码表,3,该类中有临时缓冲.构造函数:在写入流对象初始化时,必须要有一个存储数据的目的 ...

  9. 定时器、线程queue、进程池和线程池

    1.定时器 指定n秒后,执行任务 from threading import Timer,current_thread import os def hello(): print("%s he ...

  10. 基于udp协议的套接字及udp协议粘包问题

    udp协议的套接字 udp协议传输  服务端和客户端没有建立连接一说. import socket # 总结一下基础工作流程:服务端生成套接字并绑定ip_port,进入数据传输循环,服务端接受客户端发 ...