iptables防火墙和selinux
iptables
存在以下两种方式:
一、service方式
查看防火墙状态:
[root@centos6 ~]# service iptables status
iptables:未运行防火墙
开启防火墙: [root@centos6 ~]# service iptables start
关闭防火墙: [root@centos6 ~]# service iptables stop
二、iptables方式
先进入init.d目录,命令如下:
[root@centos6 ~]# cd /etc/init.d/
[root@centos6 init.d]#
然后 查看防火墙状态:
[root@centos6 init.d]# /etc/init.d/iptables status
暂时关闭防火墙:
[root@centos6 init.d]# /etc/init.d/iptables stop
重启iptables:
[root@centos6 init.d]# /etc/init.d/iptables restart
selinux
临时生效: getenforce 0
永久生效: 改配置文件 /etc/sysconfig/selinux
[root@oldboy /]# vi /etc/sysconfig/selinux
把SELINUX=enforcing 改成 disabled [root@oldboy /]# cat /etc/sysconfig/selinux # 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=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
iptables防火墙和selinux的更多相关文章
- 关闭SELinux和iptables防火墙
1.关闭SELinux: 编辑SELinux配置文件: [root@Redis selinux]# vim /etc/selinux/config 修改SELINUX配置项为disable SELIN ...
- 2-10~2-11 配置iptables防火墙增强服务 selinux简单讲解
学习一个服务的过程: 1.此服务器的概述:名字,功能,特点,端口号 2.安装 3.配置文件的位置 4.服务启动关闭脚本,查看端口 5.此服务的使用方法 6.修改配置文件,实战举例 7.排错(从下到上, ...
- Centos7 iptables firewalld防火墙与selinux配置
一.iptables防火墙 1.基本操作 # 查看防火墙状态 service iptables status # 停止防火墙 service iptables stop # 启动防火墙 service ...
- Linux关闭防火墙、SELinux
使用root权限: Linux关闭防火墙: 1. chkconfig –list|grep iptables 2. chkconfig iptables off 永久关闭防火墙 3. chkconfi ...
- linux关闭防火墙及selinux
RHEL6.5 查看linux防护墙状态: service iptables status 关闭linux防火墙: 1)永久关闭,重启后生效 开启: chkconfig iptables on 关闭: ...
- Linux学习笔记 --iptables防火墙配置
iptables防火墙配置 一.防火墙简介 1.功能: 1)通过源端口,源IP地址,源MAC地址,包中特定标记和目标端口,IP,MAC来确定数据包是否可以通过防火墙 2)分割内网和外网[附带的路由器的 ...
- iptables防火墙配置
iptables防火墙配置 一.防火墙简介 1.功能: 1)通过源端口,源IP地址,源MAC地址,包中特定标记和目标端口,IP,MAC来确定数据包是否可以通过防火墙 2)分割内网和外网[附带的路由器的 ...
- Centos7下安装iptables防火墙
说明:centos7默认使用的firewalld防火墙,由于习惯使用iptables做防火墙,所以在安装好centos7系统后,会将默认的firewall关闭,并另安装iptables进行防火墙规则设 ...
- linux防火墙和SELinux
1. 关闭防火墙 永久性生效 开启:chkconfig iptables on 关闭:chkconfig iptables off 即时生效 开启:service iptables start 关闭: ...
随机推荐
- String 经常用法最优算法实现总结 (一)
<pre name="code" class="java"><span style="font-family: Arial, Hel ...
- pl/sql developer 快捷操作: 显示不可见字符 显示历史sql语句 拷贝整个sql窗口的语句至新的sql窗口
pl/sql developer 快捷操作: 显示不可见字符 显示历史sql语句 拷贝整个sql窗口的语句至新的sql窗口 显示不可见字符:可以把空格.回车显示出来: 显示历史sql语句:ctrl+e ...
- STM32学习之路-LCD(4)<显示字符>
昨晚疯狂的打了一夜的LOL,感觉L多了,今天一天精神萎靡.还是继续把显示字符给看了,可是在犹豫要不要写这篇文章 事实上写的东西也就是copy别人家的代码,不想写那么多,就记录下自己困惑的地方吧.也许改 ...
- java 线程 错失的信号、notify() 与notifyAll的使用
package org.rui.thread.block; import java.util.Timer; import java.util.TimerTask; import java.util.c ...
- 利用Ajax调用controller方法并传递参数
一.背景由于近期工作需要将人脸识别功能与选课系统结合,但是对前端知识了解的很少,只能边做边学了,因此在这边把遇到的一些坑说明一下,希望能帮助到像我一样的初学者 二.具体内容这里采用框架为MVC,如果想 ...
- andoid电阻触摸移植
这里我使用的是210的开发板 系统Android4.0.4 内核linux3.0.8 要用电阻屏一般都是使用tslib进行校准的 这里给个我在android上用的tslib 下载地址 http://d ...
- instanceof运算符的使用
在之前的学习中,经常遇到instanceof运算符,对于它的用法总感觉理解不到位,所以专门总结一下它的用法加深理解. instanceof主要用来判断一个类是否实现了某个接口,或者判断一个实例对象是否 ...
- jquery 页眉单行信息滚动显示
JSP: 下面是控制滚动的样式.将滚动的内容查询出来.放在一个div 或者别的容器里面,我这里使用的是<dt> <style> #newCglist{width:300px;h ...
- lightoj--1005--Rooks(组合数)
Rooks Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status De ...
- win7如何给虚拟机设置共享文件
友情提示:设置之前先把虚拟机关掉 1. 安装vmtools 安装过的,则不需要 重新安装 如果没有安装vmware tools,点击安装(需要联网下载) ,下载完成后,打开虚拟机 点击安装,安装完毕后 ...