CentOS7下的防火墙配置整理

一、firewalld的基本使用

[root@localhost jack]# systemctl start firewalld   # 启动防火墙
[root@localhost jack]# systemctl stop firewalld # 关闭防火墙
[root@localhost jack]# systemctl status firewalld # 查看当前防火墙状态
[root@localhost jack]# systemctl enable firewalld # 每次开机启用
[root@localhost jack]# systemctl disable firewalld # 每次开机禁用

二、配置firewalld-cmd

[root@localhost jack]# firewall-cmd --version   # 查看防火墙版本
[root@localhost jack]# firewall-cmd --help # 查看帮助
[root@localhost jack]# firewall-cmd --zone=public --list-ports # 查看防火墙当前所有打开的端口
[root@localhost jack]# firewall-cmd --reload # 重新加载防火墙规则

三、如何开启80端口

添加

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

重新载入

firewall-cmd --reload

查看

firewall-cmd --zone= public --query-port=80/tcp

删除

firewall-cmd --zone= public --remove-port=80/tcp --permanent

CentOS7下的防火墙配置整理的更多相关文章

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

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

  2. Centos7下Firewalld防火墙配置命令

    前    言 服务端口日常被拦截,记录一下常用的命令便于查询 Firewalld服务管理 查看防火墙状态   1 systemctl status firewalld 开机启用/禁用防火墙   1 s ...

  3. centos7 开启端口防火墙配置(如开启3306或者80端口)

    转载自https://blog.csdn.net/codepen/article/details/52738906 https://www.cnblogs.com/hantianwei/p/57362 ...

  4. Linux 下安装Nginx两种方法- yum安装 and Centos7下yum安装配置nginx与php

    转载csdn: Linux 下安装Nginx两种方法- yum安装_在电脑前深思的博客-CSDN博客 Linux安装Nginx(两种方式)_HHRunning的博客-CSDN博客_linux 是否安装 ...

  5. centos7下操作防火墙

    引言 最近使用centos7系统比较频繁,在配置服务器的时候,总是遇到能够ping通服务器,但是就是没有办法访问80端口,这个时候我的直觉告诉我,肯定是防火墙的原因,但是使用iptables却怎么都找 ...

  6. centos7 下nfs的配置

    td p { margin-bottom: 0cm } p { margin-bottom: 0.25cm; line-height: 120% } a:link { } 补充知识: RPC 主程序: ...

  7. CentOS7使用firewalld防火墙配置端口

    安装启用firewalld防火墙 CentOS7默认的防火墙是firewalld 如果没有firewalld防火墙,可以执行yum install firewalld 命令进行安装 firewalld ...

  8. CentOS7下,防火墙设置

    CentOS中防火墙程序主要是firewall和iptables两种. CentOS7中firewall服务已经默认安装好了,而iptables服务需要自己用yum install  iptabes- ...

  9. centos7下的防火墙

    在cengos7下的防火墙是交给systemctl来管理服务和程序,包括了service和chkconfig. 查看firewalld.service 是否启动 systemctl stop fire ...

  10. centos7下MySQL的配置

    1. 下载mysql的repo源 wget http:.noarch.rpm 2. 安装mysql-community-release-el7-5.noarch.rpm包 rpm .noarch.rp ...

随机推荐

  1. M-SOLUTIONS Programming Contest 2020 游记 (AB水题,CD模拟,E题DFS)

    A - Kyu in AtCoder 水题 B - Magic 2 题意很好理解,但写的时候注意一下边界 void solve() { int a, b, c, k; cin >> a & ...

  2. <vue 基础知识 6、条件判断标签v-if>

    代码结构 一.     01-v-if用法 1.效果 根据分数的不同展现不同的汉字 2.代码 01-v-if用法.html <!DOCTYPE html> <html lang=&q ...

  3. <vue 基础知识 3、v-bind使用>

    代码结构 一.     v-bind基本使用 1.效果 2.代码 01-v-bind基本使用.html <!DOCTYPE html> <html lang="en&quo ...

  4. 介绍几种OPTIONS检测的方法

    概述 日常的VOIP开发中,OPTIONS检测是常用的网络状态检测工具. OPTIONS原本是作为获取对方能力的消息,也可以检测当前服务状态.正常情况下,UAS收到OPTIONS心跳,直接回复200即 ...

  5. Android之AMS原理分析

    在学习android框架原理过程中,ams的原理非常重要,无论是在面试中还是在自己开发类库过程中都会接触到. 1 简述 ActivityManagerService是Android最核心的服务,负责管 ...

  6. 【转帖】ChatGPT的前身:InstructGPT

    https://www.jianshu.com/p/6daf35cbc46a ChatGPT的论文目前还没有发布,在其官方博客(https://openai.com/blog/chatgpt/)中对方 ...

  7. [转帖]Chrome 109发布,最后一个支持Windows 7/8的版本

    https://www.163.com/dy/article/HQR3QQFD0511CUMI.html 出品 | OSC开源社区(ID:oschina2013) Google 在去年 12 月 1 ...

  8. [转帖]nginx 启动、重启、关闭命令详解

    https://www.jianshu.com/p/d70006f18a6d 作者:Gakki nginx 命令详解 输入命令:nginx -h   nginx -h -?,-h:查看帮助 -v:显示 ...

  9. 使用rpm打包nacos然后部署为systemd服务开机自动启动的方法

    背景 Nacos是阿里开源的服务注册组件,能够简单的实现微服务的注册与发现机制. 但是官方并没有提供 sytemd的服务脚本, 也没有提供rpm包的方式. 公司里面使用 nacos的场景越来越多, 部 ...

  10. 结论&定理大全

    定理 1:包含 \(0\) 与 \(2^k-1\) 的按位与或空间和 \(k\) 个点的有传递性的有向图形成双射 证明: 空间->传递闭包:对于任意两个位 \(i,j\),若某个数包含 \(i\ ...