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. 201871020225-牟星源《面向对象程序设计(java)》第七周学习总结

    201871020225-牟星源<面向对象程序设计(java)>第七周学习总结 博文正文开头: 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu- ...

  2. 用Jetpack的Site Accelerator为网站CDN加速

    Jetpack 的Site Accelerator站点加速器(前身为 Photon,注意:“Photon”现在是站点加速器的一部分)允许 Jetpack 优化图像并通过他们的全球服务器网络CDN提供图 ...

  3. 【Spring 整合篇】整合SpringMVC+Mybatis(一)

    首先,创建Maven Project,packaging为war,修改pom.xml. <properties> <!-- JDK版本 --> <java.version ...

  4. 【使用篇二】SpringBoot文件上传(5)

    一.单个文件上传 1. 在static目录下创建upload.html <!DOCTYPE html> <html> <head> <meta charset ...

  5. django之choice、ajax初步

    django之choice参数,ajax choice参数 应用场景:主要是用户性别.用户工作状态.成绩对应 ##在测试文件中运行,需要写以下几个模块 if __name__ == "__m ...

  6. html 单元格合并

    <table border="1" style={{margin:200}}> <tbody> <tr> <th colspan=&quo ...

  7. git npm包管理

    #Node # node 一.安装nodejs 下载地址:http://nodejs.cn/download/ 二.安装git 下载地址:https://git-scm.com/download/wi ...

  8. 11/8 <matrix> LC 48 54 59

    48. Rotate Image 先按对角线对称图形,再水平对折. class Solution { public void rotate(int[][] matrix) { //1.transpos ...

  9. luoguP4551最长异或路径

    P4551最长异或路径 链接 luogu 思路 从\(1\)开始\(dfs\)求出\(xor\)路径.然后根据性质\(x\)到\(y\)的\(xor\)路径就是\(xo[x]^xo[y]\) 代码 # ...

  10. [LeetCode] 1123. Lowest Common Ancestor of Deepest Leaves 最深叶结点的最小公共父节点

    Given a rooted binary tree, return the lowest common ancestor of its deepest leaves. Recall that: Th ...