[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 ...
随机推荐
- TensorFlow实现FM
看了网上的一些用tf实现的FM,很多都没有考虑FM实际使用中数据样本稀疏的问题. 我在实现的时候使用 embedding_lookup_sparse来解决这个问题. 对于二阶部分,由于embeddin ...
- Aho-Corasick算法
2018-03-15 10:25:02 在计算机科学中,Aho–Corasick算法是由Alfred V. Aho和Margaret J.Corasick 发明的字符串搜索算法,用于在输入的一串字符串 ...
- https ddos攻击——由于有了认证和加解密 后果更严重 看绿盟的产品目前对于https的ddos cc攻击需要基于内容做检测
如果web服务器支持HTTPS,那么进行HTTPS洪水攻击是更为有效的一种攻击方式,一方面,在进行HTTPS通信时,web服务器需要消耗更多的资源用来进行认证和加解密,另一方面,一部分的防护设备无法对 ...
- css实现心形图案
用1个标签实现心形图案,show you the code; <!DOCTYPE html> <html lang="en"> <head> & ...
- Javascript设计模式笔记
Javascript是越来越厉害了,一统前后端开发.于是最近把设计模式又看了一遍,顺便做了个笔记,以方便自己和他人共同学习. 笔记连载详见:http://www.meteorcn.net/wordpr ...
- HDU 1241 Oil Deposits bfs 难度:0
http://acm.hdu.edu.cn/showproblem.php?pid=1241 对每个还未访问的点bfs,到达的点都标为一块,最后统计有多少块即可 #include <cstdio ...
- SGU 140. Integer Sequences 线性同余,数论 难度:2
140. Integer Sequences time limit per test: 0.25 sec. memory limit per test: 4096 KB A sequence A is ...
- python自动化运维之路03
set集合 集合是一个无序的.不可重复的集合.主要作用有: 1.去重,把一个列表变成集合,就等于去重了. 2.关系测试,测试两组数据之前的交集.差集.并集等关系 常用操作 创建.交集.并集.差集.对称 ...
- 20181009-8 选题 Scrum立会报告+燃尽图 07
Scrum立会报告+燃尽图(07)选题 此作业要求参见:https://edu.cnblogs.com/campus/nenu/2018fall/homework/2197 一.小组介绍 组长:刘莹莹 ...
- specialized English for automation-Lesson 2 Basic Circuits of Operational Amplifiers
排版有点乱.... ========================================================================= Operational Ampl ...