使用命令的方式配置
##Add
firewall-cmd --permanent --zone=public --add-port=80/tcp
##Remove
firewall-cmd --permanent --zone=public --remove-port=80/tcp
##Reload
firewall-cmd --reload

检查是否生效
firewall-cmd --zone=public --query-port=80/tcp
列出所有的开放端口
firewall-cmd --list-all
查看防火墙状态
systemctl status firewalld.service
启动防火墙
systemctl start firewalld.service

关闭防火墙
systemctl stop firewalld.service

重新启动防火墙
systemctl restart firewalld.service

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

  1. Linux Centos7配置防火墙开启端口

    在使用centos7安装完mysql.tomcat.nginx后,都需要配置防火墙才能正常访问. 下面系统的学习一下防火墙的配置. centos7默认使用firewall,需要关闭,然后使用iptab ...

  2. Centos7 配置防火墙 firewall

    一.firewall 1.从CentOS7开始,默认使用firewall来配置防火墙,没有安装iptables(旧版默认安装). 2.firewall的配置文件是以xml的格式,存储在 /usr/li ...

  3. Centos7,配置防火墙,开启端口

    原文链接:https://blog.csdn.net/u013410747/article/details/61696178 适用于CentOS 7 64位的指令: .查看已开放的端口(默认不开放任何 ...

  4. Centos7:配置防火墙

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

  5. CentOS7.3防火墙firewalld简单配置

    今天安装了centos7.3, 想用iptables的save功能保存规则的时候发现跟rhel不一样了,  后来度娘说centos用的是firewalld而不是iptables了, 平时工作都是用re ...

  6. linux配置防火墙,开启端口

    Centos7,配置防火墙,开启端口 1.查看已开放的端口(默认不开放任何端口) firewall-cmd --list-ports 2.开启80端口 firewall-cmd --zone=publ ...

  7. centos7配置开启无线网卡,重启防火墙

    centos7配置无线网卡: 在虚拟机为nat的网络连接下(就是默认的那个),centos7默认网卡未激活. 可以设置 文件 /etc/sysconfig/network-scripts/ifcfg- ...

  8. CentOS7下配置防火墙放过Keepalived

    Keepalived是一个轻量级的HA集群解决方案,但开启防火墙后各节点无法感知其它节点的状态,各自都绑定了虚拟IP.网上很多文章讲要配置防火墙放过tcp/112,在CentOS7下是无效的,正确的做 ...

  9. centOS7.2防火墙常用配置(转)

    centOS7.2防火墙常用配置   firewall-cmd --state #查看默认防火墙状态(关闭后显示not running,开启后显示running) systemctl stop fir ...

随机推荐

  1. Linux git 在自己的服务器上建立 git 仓库(repository)

    Linux git 在自己的服务器上建立 git 仓库(repository) 服务器端: 在这里使用 ssh 方式登陆: ssh [username]@server_address(建议用超级用户登 ...

  2. logging 日志

    1. 四步: import logging #初始化 logger = logging.getLogger("log_name") #设置级别 logger.setLevel(lo ...

  3. python2.7安装和uwsgi

    python2.7安装和uwsgi tar zxf Python-2.7.13xxxx# 这里,必须用–enable-shared,生成动态库,否则会遇到wsgi不能编译的问题. Bonus: mul ...

  4. Sublime Text3配置Lua运行环境

    Sublime Text3配置Lua运行环境 前言 要问现在哪个编译器最能扛得住潮流,要数Sublime Text3了,由于它的轻量,插件丰富,美观,造就了一大批粉丝(本菜鸡也是哦) 在以前的工作中使 ...

  5. CSU 1592 石子合并 (经典题)【区间DP】

    <题目链接> 题目大意: 现在有n堆石子,第i堆有ai个石子.现在要把这些石子合并成一堆,每次只能合并相邻两个,每次合并的代价是两堆石子的总石子数.求合并所有石子的最小代价. Input ...

  6. sqldeveloper 设置快捷

  7. C#调用WebService的简单方式

    WebServiceCallpublic class WebServiceCall { public void Call() { string url = "http://localhost ...

  8. ckplayer跨域调用

    <script type="text/javascript" src="/ckplayer/ckplayer.js" charset="utf- ...

  9. [USACO07NOV]牛栏Cow Hurdles

    OJ题号:洛谷2888 思路:修改Floyd,把边权和改为边权最大值.另外注意是有向图. #include<cstdio> #include<algorithm> using ...

  10. ns2.34 移植MFLOOD协议时出现的问题

    安全按照<NS网络模拟核协议仿真>第11章的步骤进行修改,但是make的时候出现了一下错误: make[1]: 正在进入目录 `/home/wang/ns/ns-allinone-2.34 ...