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 ...
随机推荐
- 【Selenium-WebDriver自学】出现的问题和解决方案(十七)
==================================================================================================== ...
- 搭建eclipse开发环境
eclipse-jee配置 基本配置: 快捷查找:window->perferences->搜索框搜索 utf8: window->perferences->general-& ...
- eclipse创建的maven项目中使用javafx
类似普通maven项目,不需要特地创建javafx项目. 将fxml资源文件放在resource目录下即可.
- 关于thinkphp3.1无法加载模块解决办法
关于thinkphp3.1无法加载模块解决办法 如果没有具体的哪个模块的名字 请注意PHP的版本问题
- Your password has expired. To log in you must change it using a client that supports expired passwords.
[Lk] ERROR [11-26 23:01:51] [main] net.jweb.listener.AppInitializerListener.contextInitialized(231) ...
- windows定时关机命令
at 11:00 shutdown.exe -s -t 120 https://jingyan.baidu.com/article/574c52191ea9996c8c9dc17a.html?st=2 ...
- tensorflow实战系列(一)
最近开始整理一下tensorflow,准备出一个tensorflow实战系列,以飨读者. 学习一个深度学习框架,一般遵循这样的思路:数据如何读取,如如何从图片和标签数据中读出成tensorflow可以 ...
- node.js 爬虫动态代理ip
参考文章: https://andyliwr.github.io/2017/12/05/nodejs_spider_ip/ https://segmentfault.com/q/10100000081 ...
- react-native android 报错 error calling Appregistry.runApplication
解决了权限问题以为就没问题了,但是进来就红屏了,报错信息如下: 解决了,懒得截图了 error calling Appregistry.runApplication 这个问题也找了很久,开始找到 ht ...
- java中常用工具类
目录 一. org.apache.commons.io.IOUtils 二. org.apache.commons.io.FileUtils 三. org.apache.commons.lang.St ...