centos7防火墙以设置以及关闭selinux
一、CentOS 7.X 关闭SELinux
1、查看
getenforce
permissive 或者 enforcing模式
2、临时设置
setenforce 1 成为permissive模式
setenforce 0 成为enforcing模式
3、永久设置
vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效
二、Centos 7防火墙设置
1、查看
systemctl status firewalld.service
2、启动
systemctl start firewalld.service
3、停止
systemctl stop firewalld.service
4、开机禁用
systemctl disable firewalld
5、开机启动
systemctl enable firewalld
6、查看服务是否开机启动
systemctl is-enable firewalld
7、查看状态
firewall-cmd --state
8、查看所有端口列表
firewall-cmd --zone=public --list-ports
9、添加一个端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
10、重新载入规则
firewall-cmd --reload
11、查看某个端口
firewall-cmd -zone=public --query-port=80/tcp
12、删除某个端口(重新载入生效)
firewall-cmd -zone=public --remove-port=80/tcp --permanent
centos7防火墙以设置以及关闭selinux的更多相关文章
- Centos7 防火墙常用命令 开启 关闭防火墙
如果你的系统上没有安装使用命令安装 #yum install firewalld //安装firewalld 防火墙 开启服务 # systemctl start firewalld.service ...
- CentOs7 防火墙的开放与关闭及端口的设定
1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态 firewall-cmd --state 3.开启.重启.关闭.firewall ...
- CentOS7防火墙firewalld设置
添加80端口 重启后永久生效 firewall-cmd --zone=public --add-port=80/tcp --permanent 查看防火墙状态 systemctl status ...
- NO13 Linux的基础优化-关闭SELinux功能-Linux的7种运行级别-防火墙设置-中文显示设置
壹 安装Linux系统后调优及安全设置: 1 关闭SELinux功能: [root@localhost data]# sed 's#SELINUX=enforcing#SELINUX=disable ...
- Linux学习之设置联网,关闭防火墙,关闭selinux
桥接模式,给一台物理机,有自己独立的IP. boot分区,引导分区,系统启动,内核文件. swap分区,内存扩展分区.1.5或2倍.内存不够的时候,会写入其中.正常给8G或者16G就够了.不需要非要1 ...
- Centos7防火墙和SELinux的开启和关闭
在虚拟机里面开启多个服务,对应多个端口,在防火墙开启的情况下,就要对外开放端口,这样客户端才能正常访问,但比较繁琐,关闭更直接点. 防火墙 临时关闭防火墙 systemctl stop firewal ...
- centos7 关闭SELINUX 防火墙
关闭SELINUXvi /etc/selinux/config#SELINUX=enforcing #注释掉#SELINUXTYPE=targeted #注释掉SELINUX=disabled #增加 ...
- 永久关闭selinux | 防火墙
关闭SELinux的两种方法 1 永久方法 – 需要重启服务器 修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器. 2 临时方法 – 设置系统参数 ...
- centos7防火墙设置
前言 CentOS7 与之前版本在防火墙配置上不同,防火墙从iptables变成了firewalld Centos7默认安装了firewalld,如果没有安装的话,可以使用yum命令进行安装 yum ...
随机推荐
- day7--面向对象进阶(内含反射和item系列)
一面向对象的结构和成员 1.1面向对象的结构 class A: company_name = '老男孩教育' # 静态变量(静态字段) __iphone = '1353333xxxx' # 私有静态变 ...
- 阿里Canal配置(编写中)
首先在源mysql的.ini文件中进行配置 [client]default-character-set=utf8 [mysqld]basedir = E:/testCanal/mysql-5.7.17 ...
- IIS w3wp对应的应用程序
IIS7以前我們用IISApp查看IIS哪些服務已啟動,但在IIS7已經不適用了,新語法是appcmd.exe list wp.你可以在%windir%\system32\inetsrv\底下找到ap ...
- 使用DolphinPHP的框架中的excel插件导入数据
直接上函数吧 public function importfile() { if ($this->request->isPost()) { if($_POST['files']) { Cu ...
- python中strip、startswith、endswith
strip(rm)用来删除元素内的空白符: rm对应要删除空白符的元素,当rm为空(strip())时删除所有元素的空白符 startswith.endswith用来查找开头或结尾条件的元素 例子: ...
- python中的extend
extend()拓展列表,批量写入 举个例子: 1 a = ["hello", "world", "dlrb"] 2 b = [1, 2, ...
- 关于spire wb.SaveToPdf(f_pdf) excell 转为pdf 乱码问题
excell 可以合并单元格,但是在单元格内容不要用 alt+enter换行,否则就会出现乱码.
- Linux 用户、权限
用户:uid 保存在 /etc/passwd 用户分类: 管理员 uid--0 普通用户 --系统用户 uid 1-499 --一般用户 uid 500-60000 组:gid 保存在/etc/ ...
- 通过Sonar的代码质量报告学习【如何写安全高质量的代码】
1.不要用.size(),改用isEmpty() Using Collection.size() to test for emptiness works, but using Collection.i ...
- 爬虫--Scrapy-持久化存储操作
总体概况 持久化存储操作: a. 磁盘文件 a) 基于终端指令 i. 保证parse方法返回一个可迭代类型的对象(存储解析到的页面内容) ii. 使用终端指令完成数据存储到制定磁盘文件中的操作 1. ...