清空现有的规则
iptables -F
iptables -P INPUT DROP
iptables -I INPUT -m state --state RELATED , ESTABLISHED -j ACCEPT
iptables -I INPUT -p tcp --dport -m state --state NEW -j ACCEPT
iptables -I INPUT -p tcp --dport -m state --state NEW -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT #mysql内部连接

清除某条规则

iptables -L INPUT --line-numbers 所打印出来的行号

iptables -D INPUT 11 删除11行

保存规则

service iptables save



CentOS6 防火墙配置的更多相关文章

  1. CentOS7防火墙firewalld 和 CentOS6防火墙iptables的一些配置命令

    CentOS7 防火墙 一.防火墙的开启.关闭.禁用.查看状态命令 (1)启动防火墙:systemctl start firewalld (2)关闭防火墙:systemctl stop firewal ...

  2. centos6.3 配置防火墙,开启80端口、3306端口

    vi /etc/sysconfig/iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT(允许80端口通过防火 ...

  3. Centos7和Centos6防火墙开放端口配置方法(避坑教学)

    ▲这篇文章主要为大家详细介绍了Centos7防火墙开放端口的快速方法,感兴趣的小伙伴们可以参考一下! 一.CentOS 7快速开放端口: CentOS升级到7之后,发现无法使用iptables控制Li ...

  4. centos7的防火墙配置

    centos7 不在使用iptables作为防火墙, 而是使用firewalld规则, 好吃是支持动态更新, 不需要重启服务, 第二个就是加入了zone概念. 所以和centos6在防火墙配置上有很大 ...

  5. centos7 开启端口防火墙配置(如开启3306或者80端口)

    转载自https://blog.csdn.net/codepen/article/details/52738906 https://www.cnblogs.com/hantianwei/p/57362 ...

  6. 6. Samba服务和防火墙配置笔记

    Samba文件服务器 (一)简介 内网文件服务器 windows-windows 文件共享服务 网络邻居linux-linux NFS windows-linux Samba (二)端口 smbd: ...

  7. CentOS7下Firewall防火墙配置用法详解

    官方文档地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide ...

  8. [转] Linux下防火墙iptables用法规则详及其防火墙配置

    from: http://www.cnblogs.com/yi-meng/p/3213925.html 备注: 排版还不错,建议看以上的链接. iptables规则 规则--顾名思义就是规矩和原则,和 ...

  9. Linux 学习之防火墙配置

    1.安装iptables防火墙 yum install iptables  2. 清除已有的iptables规则  iptables -F  iptables -X  iptables -Z  3.显 ...

随机推荐

  1. IntelliJ IDEA删除代码的注释

    由于反编译出的Java每一行都有注释,因此查找批量替换 搜索框,正则表达式 (/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/|[ \t]*//.*) 或者 (/\* ...

  2. go类型系统

    https://blog.csdn.net/hittata/article/details/50915496 https://blog.csdn.net/hittata/article/details ...

  3. openURL调用其他程序(转)

    转自:http://blog.csdn.net/iefreer/article/details/8812708 一个应用程序,可以调用其它的应用程序的. 和其它应用程序进行通讯如果一个应用程序支持一些 ...

  4. iOS分辨率的那些事儿(转)

    1 iOS设备的分辨率 iOS设备,目前最主要的有3种(Apple TV等不在此讨论),按分辨率分为两类 iPhone/iPod Touch 普屏分辨率    320像素 x 480像素 Retina ...

  5. 【函数式】Monads模式初探——for解析式

    for表达式是monad语法糖 先看一组演示样例: case class Person(name: String, isMale: Boolean, children: Person*) val la ...

  6. Qt生成ui文件对应的.h和.cpp文件

    在VS中,可以通过CMake设定QT5_WRAP_UI来编译a.ui到ui_a.h, 要想快速生成a.h和a.cpp,经过尝试,必须使用Qt Creator,否则就手写.

  7. Unity使用OpenGL绘制经纬线圈

    using System.Collections; using System.Collections.Generic; using UnityEngine; public class LatLonGr ...

  8. CharacterMotor_刚体角色驱动

    using UnityEngine; //this class holds movement functions for a rigidbody character such as player, e ...

  9. GCC 编译详解[转]

    转自http://www.cnblogs.com/azraelly/archive/2012/07/07/2580839.html GNU CC(简称为Gcc)是GNU项目中符合ANSI C标准的编译 ...

  10. 【Java并发编程一】线程安全和共享对象

    一.什么是线程安全 当多个线程访问一个类时,如果不用考虑这些线程在运行时环境下的调度和交替执行,并且不需要额外的同步及在调用代码代码不必作其他的协调,这个类的行为仍然是正确的,那么称这个类是线程安全的 ...