1、查看防火墙状态
firewall-cmd --state
2、停止防火墙
systemctl stop firewalld.service
3、禁止防火墙开机启动
systemctl disable firewalld.service
4、查询已开放的接口
netstat -anp
5、查询指定端口是否已开
firewall-cmd --query-port=8080/tcp
返回yes,已被占用。no表示未占用。
6、开启防火墙
systemctl start firewalld.service
7、添加指定需要开放的接口
firewall-cmd --add-port=8081/tcp --permanent
8、重新载入添加的端口
firewall-cmd --reload
9、查询端口是否开放成功
firewall-cmd --query-port=8080/tcp
10、移除指定的端口
firewall-cmd --permanent --remove-port = 8081/tcp

centos7开启,关闭防火墙的更多相关文章

  1. CentOS7/6 关闭防火墙

    CentOS6关闭防火墙使用以下命令, //临时关闭 service iptables stop //禁止开机启动 chkconfig iptables off CentOS7中若使用同样的命令会报错 ...

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

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

  3. Centos7永久关闭防火墙

    Centos7永久关闭防火墙 查看防火墙状态: systemctl status firewalld.service 绿的running表示防火墙开启 执行关闭命令: systemctl stop f ...

  4. Linux下开启关闭防火墙

    一.Linux下开启/关闭防火墙命令 1) 永久性生效,重启后不会复原 开启: chkconfig iptables on 关闭: chkconfig iptables off   2) 即时生效,重 ...

  5. Centos7 防火墙常用命令 开启 关闭防火墙

    如果你的系统上没有安装使用命令安装 #yum install firewalld  //安装firewalld 防火墙 开启服务 # systemctl start firewalld.service ...

  6. centos7上关闭防火墙

    centos7上默认开启的是+firewalld,关闭了iptables 停止防护墙: systemctl stop firewalld.service 开机不启动: systemctl disabl ...

  7. Linux 开启关闭防火墙

    开放防火墙端口添加需要监听的端口 /sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT/sbin/iptables -I INPUT -p tcp ...

  8. centos7下关闭防火墙

    查看防火墙:systemctl status firewalld.service 关闭防火墙:systemctl stop firewalld.service 以上方式是暂时的,重启系统则防火墙仍然开 ...

  9. 【Linux】CentOS7 打开关闭防火墙及端口

    一.centos7版本对防火墙进行加强,不再使用原来的iptables,启用firewalld1.firewalld的基本使用启动: systemctl start firewalld查状态:syst ...

  10. 003 centos7中关闭防火墙

    在centos7中,防火墙有了新的变化.下面是常用的几个命令. 1.查看状态 systemctl status firewalld 2.关闭防火墙 systemctl stop firewalld.s ...

随机推荐

  1. [C]链接和生存周期

    链接和生存周期的区别: 链接是标识符的属性: 生存周期是对象的属性: 链接可以是外部(external),内部(internal)或没有(none): 生存周期可以是自动的.静态的,或已分配的(all ...

  2. faster-rcnn训练自己数据+测试

    准备使用faster-rcnn进行检测实验.同时笔者也做了mask-rcnn,yolo-v3,ssd的实验,并进行对比. window下使用faster-rcnn  https://blog.csdn ...

  3. 【python爬虫】Xpath

    一.xml是什么 1.定义:可扩展标记性语言 2.特点:xml的是具有自描述结构的半结构化数据. 3.作用:xml主要设计宗旨是用来传输数据的.他还可以作为配置文件. 二.xml和html的区别 1. ...

  4. NIO中Buffer的重要属性关系解析

    Buffer 是java NIO中三个核心概念之一 缓存, 在java的实现体系中Buffer作为顶级抽象类存在 简单说,Buffer在做什么? 我们知道,在java IO中体系中, 因为InputS ...

  5. Assign a Standard Image 设置图标

    eXpressApp Framework (XAF) includes standard images embedded into the DevExpress.Images assembly. In ...

  6. SpringBoot(十二):SpringBoot整合Mybatis-Plus

    本节版本虽然只用到了基本特性,但可以满足大部分的增删改查. 一.环境准备SpringBoot 1.5.10.RELEASEMybatis-Plus 2.1.9Mybatis-Plus 官方地址:htt ...

  7. ant 打包脚本

    现在很多人都用ant脚本来进行打包,下面就介绍一下这个打包工具常见的用法.以及脚本如何编写 <!-- 定义任务,清空任务:清空原有的classes目录,重新创建 --> <targe ...

  8. 【C#】学习笔记 abstract、virtual、interface使用的一些栗子

  9. easyui-datagrid 使用笔记

    1.清空所有行和所有列 $('#dgJGQuery').datagrid({ columns: [], url: '', data: [] }); 2.采用 datagrid-groupview 分组 ...

  10. Cobalt Strike系列教程第五章:截图与浏览器代理

    Cobalt Strike系列教程分享如约而至,新关注的小伙伴可以先回顾一下前面的内容: Cobalt Strike系列教程第一章:简介与安装 Cobalt Strike系列教程第二章:Beacon详 ...