Linux centos7 防火墙设置
1.查看防火墙状态
systemctl list-unit-files|grep firewalld.service
或
systemctl status firewalld.service 2.开启
systemctl start firewalld.service 3.停止
systemctl stop firewalld.service 4.重启
systemctl restart firewalld.service 5.开机启动
systemctl enable firewalld.service 6.开机禁止启动
systemctl disable firewalld.service 7.查看开机是否自启
systemctl is-enabled firewalld.service;echo $? 8.列举出所有开机自启服务
systemctl list-unit-files|grep enabled 9.查看已经开放端口
firewall-cmd --list-ports 10.添加开放端口(重启防火墙才生效)
firewall-cmd --zone=public --add-port=80/tcp --permanent
--zone 作用域
--add--port 添加端口号
--permanent 永久生效 不用的话重启机器失效
11.重启防火墙
firewall-cmd --reload 12.防火墙运行状态
firewall-cmd --state
Linux centos7 防火墙设置的更多相关文章
- CentOS7防火墙设置常用命令
目录 开/关/重启防火墙 查看所有开启的端口号 CentOS7环境下防火墙常用命令 开/关/重启防火墙 查看防火墙状态 firewall-cmd --state 启动防火墙 systemctl sta ...
- CentOS7 防火墙设置
CentOS7 防火墙命令 最近在公司服务器上安装了oracle12c数据库,在用数据库客户端连接的时候,连接不了.最后查找资料的原因是因为oracle的服务端口未开放. 首先还是还是输入以往的开启某 ...
- linux CentOS7 防火墙操作
1, 查看防火墙状态: firewall-cmd --state systemctl status firewalld.service 2, 开启防火墙: systemctl start firewa ...
- Linux下防火墙设置
Linux下开启/关闭防火墙命令 1) 永久性生效,重启后不会复原 开启:chkconfigiptables on 关闭:chkconfigiptables off 2) 即时生效,重启后复原 开启 ...
- redHat linux 修改防火墙设置简略版
1) 重启后生效 开启: chkconfig iptables on 关闭: chkconfig iptables off 2) 即时生效,重启后失效 开启: service iptables sta ...
- centos7防火墙设置
前言 CentOS7 与之前版本在防火墙配置上不同,防火墙从iptables变成了firewalld Centos7默认安装了firewalld,如果没有安装的话,可以使用yum命令进行安装 yum ...
- Centos6与Centos7防火墙设置与端口开放的方法
Centos升级到7之后,内置的防火墙已经从iptables变成了firewalld.所以,端口的开启还是要从两种情况来说明的,即iptables和firewalld.更多关于CentOs防火墙的最新 ...
- CentOS7——防火墙设置
1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态firewall-cmd --state 3.开启.重启.关闭.firewalld ...
- Centos6,Centos7防火墙设置与端口开放的方法
Centos升级到7之后,内置的防火墙已经从iptables变成了firewalld.端口的开启还是要从两种情况来说明的,即iptables和firewalld. 一.iptables 1.打开/关闭 ...
随机推荐
- if not aa 表示如果aa等于空就是true 相当于if not aa 相当于 if aa== 空
aa='tt' print(not aa) #表示 bb是空的 not 表示空 bb='' print(not bb)
- 【Mac系统 + Python + Django】之开发一个发布会系统【Django模型(三)】
上一部分给大家介绍Django的视图. 接下来继续来了解Django框架,来看第三部分,此部分是对数据库的操作. 目录: 一.设计系统表 二.admin后台管理 三.基本数据访问(SQLite数据库) ...
- cocos2dx-3.0(前言)
说了好久,告诉自己要開始学cocos2dx(在心理里告诉了好久),然后养成良好习惯,记录自己学习cocos2dx的过程.一个是怕自己忘记.还有一个是更加让自己理解透彻(或许哪天我写的好了,组合一下出一 ...
- Android Otto框架浅析
今天要介绍的是一个Android中使用得比較多的android 事件总线 EventBus模式的一个框架Otto. Otto 官网:http://square.github.io/otto/ 一.An ...
- Windows API之DuplicateHandle
在进程之间共享内核对象句柄的一种方法:DuplicateHandle 简单地说,该函数取得某个进程句柄表中的一个表项,然后把它拷贝到另一个进程的句柄表中. BOOL WINAPI DuplicateH ...
- Java-iBATIS
1.是什么? 2010年迁移到了google code,并且改名为MyBatis.ibatis1.ibatis2.到了版本3就改名为mybatis. iBATIS的是一个持久层框架,它能够自动在 Ja ...
- dll 在进程中怎么区分的
平时一直没想过这个问题,今天在测试输入法注入的时候才发现windows下dll在进程中是以名字区分的,即使是完全一模一样的DLL. 具体详情,容我慢禀 : 需求是这样的,只能含有一个a.DLL,这 ...
- CentOS6.8部署SVN
第1章 安装svn服务 1.1 准备操作系统并查看系统环境 [root@localhost ~]# cat /etc/redhat-release CentOS release 6.8 (Final) ...
- jquery 插件 起步代码
/** * Created by W.J.Chang on 2014/6/25. */ ;(function($) { var methods= { check: function() { retur ...
- Python 文件操作、异常
windows默认是gbk编码,又称cp936,汉字占2个字节. utf-8被称为万国码,这个编码下,汉字占3个字节. ASCII也是一种编码. 一.文件操作 最基本的文件打开: f = open(& ...