linux防火墙和SELinux
1. 关闭防火墙
- 永久性生效
开启:chkconfig iptables on
关闭:chkconfig iptables off - 即时生效
开启:service iptables start
关闭:service iptables stop - 查看
chkconfig –list iptables
2. 关闭SELinux
- 永久有效
修改 /etc/selinux/config 文件中的 SELINUX=”” 为 disabled ,然后重启 - 即时生效
setenforce 0 - 查看
sestatus
3. 关闭ipv6的防火墙
chkconfig ip6tables off
4. ufw防火墙
iptables过于繁琐,ufw支持界面操作
- 启用/禁用
ufw enable
ufw disable - 允许/禁用端口
ufw allow 22
ufw delete allow 22 - 允许/禁用服务
ufw allow ssh
ufw delete allow ssh - 允许/禁用ip
ufw allow from 192.168.60.219
ufw delete allow from 192.168.60.219 - 允许/禁用tcp
ufw allow 22/tcp
ufw delete allow 22/tcp - 查看状态
ufw status
linux防火墙和SELinux的更多相关文章
- Linux 防火墙和SELinux的开启和关闭
防火墙(firewalld) 临时关闭防火墙 systemctl stop firewalld 永久防火墙开机自关闭 systemctl disable firewalld 临时打开防火墙 syste ...
- Linux——防火墙、SELinux规则
一.Firewalld防火墙规则 防火墙的作用:放行或者阻拦某些服务.端口 1.防火墙的简单操作 # 1.查看防火墙状态 systemctl status firewalld # 2.关闭防火墙 sy ...
- 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 关闭: ...
- SpringCloud的应用发布(四)vmvare+linux,防火墙和selinux
一.vmvare网络配置为nat模式 二.vmvare的网络设置为桥接bridge模式 1.linux 网卡的ip获取方式dhcp 三.关闭linux的防火墙和selinux 1.临时关闭防火墙 sy ...
- 一 SSH 无密码登陆 & Linux防火墙 & SELinux关闭
如果系统环境崩溃. 调用/usr/bin/vim /etc/profile SHH无密码登陆 所有要做得节点上运行 修改 host name vi /etc/sysconfig/netwo ...
- 网卡配置文件详解 用户管理与文件权限篇 文件与目录权限 软连接 tar解压命令 killall命令 linux防火墙 dns解析设置 计划任务crond服务 软件包安装 阿里云 yum源 安装
Linux系统基础优化及常用命令 Linux基础系统优化 引言没有,只有一张图. Linux的网络功能相当强悍,一时之间我们无法了解所有的网络命令,在配置服务器基础环境时,先了解下网络参数设定命令. ...
- Linux 笔记 - 第十三章 Linux 系统日常管理之(二)Linux 防火墙和任务计划
博客地址:http://www.moonxy.com 一.前言 Linux 下的的防火墙功能是非常丰富的,作为 Linux 系统工程师有必要了解一下.防火墙一般分为硬件防火墙和软件防火墙.但是,不管是 ...
- 天道神诀---防火墙以及selinux(上篇)
Linux防火墙 linux6.x 防火墙会影响通信,默认是拒绝所有. [root@redhat6 sysconfig]# chkconfig iptables --listiptables ...
随机推荐
- opencv鼠标事件
#include <opencv2\opencv.hpp> using namespace cv; struct mouse_para { cv::Mat org; cv::Mat img ...
- mwArray和cv::Mat转化函数 20170812
不是新东西了,但是有必要专门把这两个函数拿出来记录一下. 需要注意的是,Mat2mwArry函数的输入Mat类型是 CV_8UC1,灰度图. 如果要传递多通道图像的话,需要先cv::split()成多 ...
- spring讲解
今日先简单介绍一下Spring bean 的 5 种效果域,然后详细介绍 singleton 和 prototype 这两种最常用的效果域. JavaSpring Bean的五种效果域 效果域的种类 ...
- 【day03】Xhtml
一.HTML公共属性 1. title 提示 2. class 3. id 4. style 说明:除了 html,head,body,link,meta外其他标记都可使用的属性 二.表单 1 ...
- [LeetCode] 662. Maximum Width of Binary Tree 二叉树的最大宽度
Given a binary tree, write a function to get the maximum width of the given tree. The width of a tre ...
- [LeetCode] 477. Total Hamming Distance 全部汉明距离
The Hamming distance between two integers is the number of positions at which the corresponding bits ...
- git diff比较版本差异(生成补丁)
1.git diff [<options>] <commit> <commit> options 使用--name-only(git diff HEAD cd504 ...
- 关于交叉编译Nodejs的坑
前言 交叉编译Nodejs到其他平台上的时候,遇到了2个坑,网上极少有人提及,花了整个晚上才解决,在此记录下. 我的编译目标环境为: 龙芯3A 编译脚本 cd 代码目录 export PREFIX=/ ...
- css 在一定区域内滚动显示,不修改父级样式
做项目时,会遇到一些零碎的技术点.记录下来以防忘记 需求:图中圈中的部门是滚动的.不修改父级样式 代码: <div class="right-text-bottom"> ...
- C# HTTP系列9 GET与POST示例
系列目录 [已更新最新开发文章,点击查看详细] 学习本篇之前,对 HttpWebRequest 与 HttpWebResponse 不太熟悉的同学,请先学习<C# HTTP系列>. ...