1. 关闭防火墙

  1. 永久性生效

    开启:chkconfig iptables on

    关闭:chkconfig iptables off
  2. 即时生效

    开启:service iptables start

    关闭:service iptables stop
  3. 查看

    chkconfig –list iptables

2. 关闭SELinux

  1. 永久有效

    修改 /etc/selinux/config 文件中的 SELINUX=”” 为 disabled ,然后重启
  2. 即时生效

    setenforce 0
  3. 查看

    sestatus

3. 关闭ipv6的防火墙

chkconfig ip6tables off

4. ufw防火墙

iptables过于繁琐,ufw支持界面操作

  1. 启用/禁用

    ufw enable

    ufw disable
  2. 允许/禁用端口

    ufw allow 22

    ufw delete allow 22
  3. 允许/禁用服务

    ufw allow ssh

    ufw delete allow ssh
  4. 允许/禁用ip

    ufw allow from 192.168.60.219

    ufw delete allow from 192.168.60.219
  5. 允许/禁用tcp

    ufw allow 22/tcp

    ufw delete allow 22/tcp
  6. 查看状态

    ufw status

linux防火墙和SELinux的更多相关文章

  1. Linux 防火墙和SELinux的开启和关闭

    防火墙(firewalld) 临时关闭防火墙 systemctl stop firewalld 永久防火墙开机自关闭 systemctl disable firewalld 临时打开防火墙 syste ...

  2. Linux——防火墙、SELinux规则

    一.Firewalld防火墙规则 防火墙的作用:放行或者阻拦某些服务.端口 1.防火墙的简单操作 # 1.查看防火墙状态 systemctl status firewalld # 2.关闭防火墙 sy ...

  3. Linux关闭防火墙、SELinux

    使用root权限: Linux关闭防火墙: 1. chkconfig –list|grep iptables 2. chkconfig iptables off 永久关闭防火墙 3. chkconfi ...

  4. linux关闭防火墙及selinux

    RHEL6.5 查看linux防护墙状态: service iptables status 关闭linux防火墙: 1)永久关闭,重启后生效 开启: chkconfig iptables on 关闭: ...

  5. SpringCloud的应用发布(四)vmvare+linux,防火墙和selinux

    一.vmvare网络配置为nat模式 二.vmvare的网络设置为桥接bridge模式 1.linux 网卡的ip获取方式dhcp 三.关闭linux的防火墙和selinux 1.临时关闭防火墙 sy ...

  6. 一 SSH 无密码登陆 & Linux防火墙 & SELinux关闭

    如果系统环境崩溃.   调用/usr/bin/vim /etc/profile   SHH无密码登陆 所有要做得节点上运行   修改 host name vi /etc/sysconfig/netwo ...

  7. 网卡配置文件详解 用户管理与文件权限篇 文件与目录权限 软连接 tar解压命令 killall命令 linux防火墙 dns解析设置 计划任务crond服务 软件包安装 阿里云 yum源 安装

    Linux系统基础优化及常用命令 Linux基础系统优化 引言没有,只有一张图. Linux的网络功能相当强悍,一时之间我们无法了解所有的网络命令,在配置服务器基础环境时,先了解下网络参数设定命令. ...

  8. Linux 笔记 - 第十三章 Linux 系统日常管理之(二)Linux 防火墙和任务计划

    博客地址:http://www.moonxy.com 一.前言 Linux 下的的防火墙功能是非常丰富的,作为 Linux 系统工程师有必要了解一下.防火墙一般分为硬件防火墙和软件防火墙.但是,不管是 ...

  9. 天道神诀---防火墙以及selinux(上篇)

    Linux防火墙 linux6.x 防火墙会影响通信,默认是拒绝所有. [root@redhat6 sysconfig]# chkconfig iptables --listiptables      ...

随机推荐

  1. 201871010133-赵永军《面向对象程序设计(java)》第十一周学习总结

    201871010133-赵永军<面向对象程序设计(java)>第十一周学习总结 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ ...

  2. 每天一道Rust-LeetCode(2019-06-08)

    每天一道Rust-LeetCode(2019-06-08) 91. 解码方法 坚持每天一道题,刷题学习Rust. 题目描述 https://leetcode-cn.com/problems/decod ...

  3. 11/7 <Dynamic Programming>

    62. Unique Paths 方法一: 二位数组 而这道题是每次可以向下走或者向右走,求到达最右下角的所有不同走法的个数.那么跟爬梯子问题一样,需要用动态规划 Dynamic Programmin ...

  4. [LeetCode] 327. Count of Range Sum 区间和计数

    Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive.Ra ...

  5. [LeetCode] 312. Burst Balloons 打气球游戏

    Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by ...

  6. [LeetCode] 119. Pascal's Triangle II 杨辉三角之二

    Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...

  7. [LeetCode] 81. Search in Rotated Sorted Array II 在旋转有序数组中搜索之二

    Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e. ...

  8. vue-lazyload 图片懒加载

    vue-lazyload简单使用 github地址:https://github.com/hilongjw/vue-lazyload 1.安装插件 npm install vue-lazyload - ...

  9. Linux中Too many open files 问题分析和解决

    今天某个服务的日志中出现了大量的异常: [WARN ] 2018-06-15 16:55:20,831 --New I/O server boss #1 ([id: 0x55007b59, /0.0. ...

  10. 第31课 std::atomic原子变量

    一. std::atomic_flag和std::atomic (一)std::atomic_flag 1. std::atomic_flag是一个bool类型的原子变量,它有两个状态set和clea ...