引言

  最近使用centos7系统比较频繁,在配置服务器的时候,总是遇到能够ping通服务器,但是就是没有办法访问80端口,这个时候我的直觉告诉我,肯定是防火墙的原因,但是使用iptables却怎么都找不到命令,经过查资料才发现,centos7默认的防火墙是firewall,于是把firewall的一些常用命令记录下来,一来是加深印象,二来方便查询。

firewall相关命令

#启动firewall
/bin/systemctl stop firewalld.service
#关闭firewall
/bin/systemctl stop firewalld.service
#开机启动firewall
/bin/systemctl able firewalld.service
#禁止firewall开机启动
/bin/systemctl disable firewalld.service #查看firewall状态
/bin/systemctl status firewalld.service

centos7下操作防火墙的更多相关文章

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

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

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

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

  3. centos7下的防火墙

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

  4. CentOS7下,防火墙设置

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

  5. Centos7 下的防火墙端口配置

    如果外部不能访问,需要查看防火墙以及服务器的端口安全设置. 防火墙的操作 查看所有打开的端口: firewall-cmd --zone=public --list-ports 添加 firewall- ...

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

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

  7. centos7下关闭防火墙

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

  8. CentOS7下firewall-cmd防火墙使用

    一. firewalld的基本使用启动: systemctl start firewalld查状态:systemctl status firewalld 停止: systemctl disable f ...

  9. Centos7下开启防火墙,允许通过的端口

    1.查看防火墙状态 systemctl status firewalld 2.如果不是显示active状态,需要打开防火墙 systemctl start firewalld 3.# 查看所有已开放的 ...

随机推荐

  1. Nginx的启动脚本(Centos)

    vim /etc/init.d/nginxservice nginx start #!/bin/sh # chkconfig: 2345 85 15 # description:Nginx Serve ...

  2. svn error

    svn: E205009: Local, non-commit operations do not take a log message or revision properties svn copy ...

  3. Thymeleaf

    1.在html顶部添加 <html xmlns:th="http://www.thymeleaf.org"> 2.url表达式 @{...} <link rel= ...

  4. 微软unity 注入mvc

    首先获取开源unity ,引用, 新建UnityDependencyResolver 继承IDependencyResolver,代码如下: public class UnityDependencyR ...

  5. QR 二维码总结

    @(Java ThirdParty)[QR] QR 二维码总结 根据Wiki中的介绍,QR Code(Quick Response Code),二维条形码,由日志设计应用于汽车制造工业中.条形码中包含 ...

  6. MySQL主从复制实现

    上回提到了用ThinkPHP框架来实现数据库的读写分离,现在就来简单说说MySQL的主从复制. 形式 一主一从(也就是这里要实现的形式) 主主复制 一主多从 多主一从(MySQL5.7开始支持) 联级 ...

  7. 关于MySQL的wait_timeout连接超时问题报错解决方案

    bug回顾 : 想必大家在用MySQL时都会遇到连接超时的问题,如下图所示: ### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsExce ...

  8. bat脚本参数 if goto choice for使用的学习笔记。

    写过几次bat脚本,但一直没有总结,最近找到一个网页介绍bat,总结得很好,转自 http://www.jb51.net/article/49627.htm: 本文只总结我不会的,全面的看原网页就可以 ...

  9. 现代软件工程作业 第二章 学习github笔记

    在网上大量资料的辅助下,学习了github的基本使用方法,尝试了一些常见的命令.为了便于记忆总结了自己的学习内容. 1.首先需要在github的官网上注册一个帐号,并新建一个repository,选这 ...

  10. AVAudioPlayer

    AVAudioPlayer在AVFoundation框架下,所以我们要导入AVFoundation.framework. AVAudioPlayer类封装了播放单个声音的能力.播放器可以用NSURL或 ...