[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 ...
随机推荐
- 部分函数依赖 && 完全函数依赖
部分函数依赖:若x->y 并且,存在X的真子集x1,使得x1->y,则 y部分依赖于x. 完全函数依赖:若x->y并且,对于x的任何一个真子集x1,都不存在x1->y,则称y完 ...
- Excel导入oracle库
Excel导入oracle库 建表 /*==============================================================*/ /* DBMS nam ...
- C++设计与声明——让接口容易被正确使用
一个简答易错的例子 class Date { public Date(int month,int day,int year); } 一年后使用这个接口的时候,写了Date d(15,10,2015)或 ...
- windows下搭建nginx+php+虚拟主机配置过程
需要软件信息: nginx php RunHiddenConsole 首先安装之前要规划一下把他们放到那里,比如我将他们统一放在e :/web下 那么将这些都拷贝过来,开始吧,window要执行php ...
- tornado多路由示例
main.py代码: # encoding: utf-8 """ @version: ?? @author: andu99 @contact: andux@qq.com ...
- pandas 之 concat
本文摘自:http://pandas.pydata.org/pandas-docs/stable/merging.html 前提: ide: liuqian@ubuntu:~$ ipython 准备: ...
- Winform菜单之Menustrip
有窗体必定有菜单了,可以直接使用菜单组件,也可以使用按钮(按钮就没法显示级联菜单的形式了). 下面重点介绍一下各种菜单 1.Menustrip 最常用的莫过于此菜单了,从工具栏中拖入一个menustr ...
- C++ wait捕捉的信号处理WIFEXITED/WEXITSTATUS/WIFSIGNALED
当一个进程正常或异常终止的时候,内核就像其父进程发送SIGCHLD信号,因为子进程是个异步事件,所以这种信号也是内核给那个父进程发的异步通知.父进程可以选择忽略该信号,或者提供一个该信号发生时即被调用 ...
- ubuntu16.04安装Nvidia显卡驱动、CUDA8.0和cudNN V6
Nvidia显卡驱动安装 在ubuntu搜索框输入 软件更新,打开 "软件和更新" 对话框,在 附加驱动里选择系统检测到的Nvidia驱动,应用更改,重启系统: 安装完成之后查看G ...
- Swift 标签控制器(tabbar添加提醒和控制器)
// Override point for customization after application launch. //初始化window, 大小为设备物理大小 self.window = U ...