[RHEL7.1]关闭防火墙及SElinux
1. 先查看防火墙状态
[root@bogon ~]#
|
1
|
systemctl status firewalld |
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: active (running) since 一 2015-05-25 22:53:54 CST; 3min 18s ago
Main PID: 979 (firewalld)
CGroup: /system.slice/firewalld.service
└─979 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
5月 25 22:53:54 localhost.localdomain systemd[1]: Started firewalld - dynami...
Hint: Some lines were ellipsized, use -l to show in full.
2. 关闭防火墙
[root@bogon ~]#
|
1
|
systemctl stop firewalld |
[root@bogon ~]#
|
1
|
systemctl status firewalld |
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: inactive (dead) since 一 2015-05-25 23:03:56 CST; 3s ago
Process: 979 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 979 (code=exited, status=0/SUCCESS)
5月 25 22:53:54 localhost.localdomain systemd[1]: Started firewalld - dynami...
5月 25 23:03:55 bogon systemd[1]: Stopping firewalld - dynamic firewall da.....
5月 25 23:03:56 bogon systemd[1]: Stopped firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.
3. 查看防火墙服务是否开机启动
[root@bogon ~]#
|
1
|
systemctl is-enabled firewalld |
enabled #开启
4. 关闭防火墙开机启动
[root@bogon ~]#
|
1
|
systemctl disable firewalld |
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
[root@bogon ~]#
|
1
|
systemctl is-enabled firewalld |
disabled
二、关闭SELinux
1. 查看当前SELinux状态
[root@bogon ~]#
|
1
|
getenforce |
Enforcing
2. 关闭SElinux
[root@bogon ~]#
|
1
|
setenforce 0 |
[root@bogon ~]# getenforce
Permissive
3. 编辑配置文件
[root@bogon ~]#
|
1
|
vim /etc/selinux/config |
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive #修改此参数
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[RHEL7.1]关闭防火墙及SElinux的更多相关文章
- CentOS7 关闭防火墙和selinux
本文将简单介绍在CentOS7上如何临时和永久关闭防火墙和selinux. 关闭防火墙 # 查看防火墙状态 [root@localhost ~]# systemctl status firewalld ...
- CentOS 关闭防火墙和selinux
1)关闭防火墙(每个节点) [Bash shell] 1 2 service iptables stop chkconfig iptables off 2)关闭selinux(重启生效) [Bash ...
- Centos7关闭防火墙与selinux
CentOS 7.0默认使用的是firewall作为防火墙 直接关闭防火墙 systemctl stop firewalld.service #停止firewall systemctl disable ...
- Linux关闭防火墙、SELinux
使用root权限: Linux关闭防火墙: 1. chkconfig –list|grep iptables 2. chkconfig iptables off 永久关闭防火墙 3. chkconfi ...
- 永久关闭防火墙和selinux
临时关闭selinux: setenforce 0 //设置SELinux 成为permissive模式 彻底禁用selinux: 使用root用户,vim /etc/sysconfig/sel ...
- centos 7.X关闭防火墙和selinux
一.关闭防火墙 centos从7开始默认用的是firewalld,这个是基于iptables的,虽然有iptables的核心,但是iptables的服务是没安装的. 所以你只要停止firewalld服 ...
- Redhat 关闭防火墙和selinux
查看防火墙状态.systemctl status firewalld 临时关闭防火墙命令.重启电脑后,防火墙自动起来.systemctl stop firewalld 永久关闭防火墙命令.重启后,防火 ...
- linux关闭防火墙及selinux
RHEL6.5 查看linux防护墙状态: service iptables status 关闭linux防火墙: 1)永久关闭,重启后生效 开启: chkconfig iptables on 关闭: ...
- 关闭防火墙,selinux,交互式设置IP的脚本
脚本内容: #!/bin/bash # ens=$(cat /proc/net/dev | awk '{if($2>0 && NR > 2) print substr($1 ...
随机推荐
- 【测试设计】性能测试工具选择:wrk?jmeter?locust?还是LR?
原文链接:http://www.51testing.com/html/49/n-3721249.html 前言 当你想做性能测试的时候,你会选择什么样的测试工具呢?是会选择wrk?jmeter?loc ...
- Spring中的@Transactional
spring中的@Transactional基于动态代理的机制,提供了一种透明的事务管理机制,方便快捷解决在开发中碰到的问题. 一般使用是通过如下代码对方法或接口或类注释: @Transactiona ...
- python实现:将文本文件分割成多个小文本文件(php也可实现)
前两天有个朋友说,想实现一个文本文件按照固定行数进行分割成多个文本文件,却不知如何实现.如果数据量小手动分割下就好了,如果数据量很大的话手动完成实在太耗费人力了,也不现实.那么就需要借助脚本去实现.既 ...
- 108. Convert Sorted Array to Binary Search Tree 109. Convert Sorted List to Binary Search Tree -- 将有序数组或有序链表转成平衡二叉排序树
108. Convert Sorted Array to Binary Search Tree Given an array where elements are sorted in ascendin ...
- BootStrap使用
BootStrap简单使用 <深入理解BootStrap>这本书对BootStrap进行了全面的讲解包括设计思想以及源码解析对没有接触过的很有帮助 BootStrap可以说是最简单的一类框 ...
- 一个自动化测试工具 UI Recorder
链接 教程 UI Recorder 是一款零成本UI自动化录制工具,类似于Selenium IDE. UI Recorder 要比Selenium IDE更加强大! UI Recorder 非常简单易 ...
- ES6中箭头函数的作用
我们知道在ES6中,引入了箭头函数,其本质就是等同有ES5中的函数.类似于下面的写法: let test1=() => “abc”; let test2=() => { return “a ...
- axios请求requestBody和formData
前言 在vue的后台管理开发中,应需求,需要对信息做一个校验,需要将参数传递两份过去,一份防止在body中,一份防止在formdata中,axios请求会默认将参数放在formdata中进行发送. 对 ...
- Vue3.0代理的设置
1.在主目录下创建vue.config.js 内容如下: const path = require('path'); function resolve (dir) { return path.join ...
- springboot整合mybatis增删改查(一):项目创建
新建 打开 IDEA 工具,通过 File -> New -> Project->Spring Initializr 主要步骤包括: 选择 Spring Initializr 项目 ...