默认/etc/sysoncifg/iptables-config的配置内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Load additional iptables modules (nat helpers)
#   Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers are
# stored in /etc/modprobe.conf.
IPTABLES_MODULES="ip_conntrack_netbios_ns"
 
# Unload modules on restart and stop
#   Value: yes|no,  default: yes
# This option has to be 'yes' to get to a sane state for a firewall
# restart or stop. Only set to 'no' if there are problems unloading netfilter
# modules.
IPTABLES_MODULES_UNLOAD="yes"
 
# Save current firewall rules on stop.
#   Value: yes|no,  default: no
# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets stopped
# (e.g. on system shutdown).
IPTABLES_SAVE_ON_STOP="no"
 
# Save current firewall rules on restart.
#   Value: yes|no,  default: no
# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets
# restarted.
IPTABLES_SAVE_ON_RESTART="no"
 
# Save (and restore) rule and chain counter.
#   Value: yes|no,  default: no
# Save counters for rules and chains to /etc/sysconfig/iptables if
# 'service iptables save' is called or on stop or restart if SAVE_ON_STOP or
# SAVE_ON_RESTART is enabled.
IPTABLES_SAVE_COUNTER="no"
 
# Numeric status output
#   Value: yes|no,  default: yes
# Print IP addresses and port numbers in numeric format in the status output.
IPTABLES_STATUS_NUMERIC="yes"
 
# Verbose status output
#   Value: yes|no,  default: yes
# Print info about the number of packets and bytes plus the "input-" and
# "outputdevice" in the status output.
IPTABLES_STATUS_VERBOSE="no"
 
# Status output with numbered lines
#   Value: yes|no,  default: yes
# Print a counter/number for every rule in the status output.
IPTABLES_STATUS_LINENUMBERS="yes"

IPTABLES_MODULES="ip_conntrack_netbios_ns"

在防火墙被激活时,指定一组独立的空间额外加载iptables模块,系统启动,加载防火墙模块,会打印:Loading additional iptables modules: ip_conntrack_netbios_ns[  OK  ]

IPTABLES_MODULES_UNLOAD="yes"

在重新启动和停止iptables模块时,是否卸载此模块。

IPTABLES_SAVE_ON_STOP="no"

当防火墙停止时,保存当前防火墙规则到iptables文件,no :(默认值)不保存当前的规则到iptables文件。

IPTABLES_SAVE_ON_RESTART="no"

当防火墙重启时:service iptables restart,保存当前防火墙规则到iptables文件,no :(默认值)不保存当前的规则到iptables文件。

IPTABLES_SAVE_COUNTER="no"

保存并恢复所有chain和规则中的数据包和字节计数器,yes:保存计数器的值,no:(默认值)不保存计数器值。

IPTABLES_STATUS_NUMERIC="yes"

输出的IP地址是数字的格式,而不是域名和主机名的形式,yes:(默认值)在状态输出中只包括IP地址,no:在状态输出中返回域名或主机名。

IPTABLES_STATUS_VERBOSE="no"

输出iptables状态时,是否包含输入输出设备,yes:包含,no:(默认值)不包含。

IPTABLES_STATUS_LINENUMBERS="yes"

输出iptables状态时,是否同时输出每条规则的匹配数,yes:(默认值)输出,no:不输出。

查看防火墙状态:service iptables status

重启防火墙:service iptables restart

1
2
3
4
5
# service iptables restart
iptables: Flushing firewall rules: [  OK  ]
iptables: Setting chains to policy ACCEPT: filter [  OK  ]
iptables: Unloading modules: [  OK  ]
iptables: Applying firewall rules: [  OK  ]

重启防火墙,清除规则和卸载模块,然后再加载新的规则。

CentOS防火墙iptables-config的相关配置参数详解的更多相关文章

  1. [转帖]持久化journalctl日志清空命令查看配置参数详解

    持久化journalctl日志清空命令查看配置参数详解 最近 linux上面部署服务 习惯使用systemd 进行处理 这样最大的好处能够 使用journalctl 进行查看日志信息. 今天清理了下 ...

  2. mha配置参数详解

    mha配置参数详解: 参数名字 是否必须 参数作用域 默认值 示例 hostname Yes Local Only - hostname=mysql_server1, hostname=192.168 ...

  3. reids配置参数详解

    转自:http://www.jb51.net/article/60627.htm reids配置参数详解 #daemonize no  默认情况下, redis 不是在后台运行的,如果需要在后台运行, ...

  4. Redis配置参数详解

    Redis配置参数详解 /********************************* GENERAL *********************************/ // 是否作为守护进 ...

  5. MHA配置参数详解 【转】

    mha配置参数详解: 参数名字 是否必须 参数作用域 默认值 示例 hostname Yes Local Only - hostname=mysql_server1, hostname=192.168 ...

  6. zookeeper的配置参数详解(zoo.cfg)

    配置参数详解(主要是%ZOOKEEPER_HOME%/conf/zoo.cfg文件) 参数名 说明 clientPort 客户端连接server的端口,即对外服务端口,一般设置为2181吧. data ...

  7. nginx配置参数详解

    配置参数详解 user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目.根据硬件调整,通常等于CPU数量或者2倍 ...

  8. HAproxy 配置参数详解

    HAproxy 配置参数详解 /etc/haproxy/haproxy.cfg # 配置文件 ----------------------------------------------------- ...

  9. samba 配置参数详解

    samba 配置参数详解: 一.全局配置参数  workgroup = WORKGROUP说明:设定 Samba Server 所要加入的工作组或者域. server string = Samba S ...

随机推荐

  1. linux 复制粘贴

    如果想把文件内的第三行内容黏贴到第十五行: 1.进入你的文件,(处于命令模式,而不是编辑模式) 2.将你的光标移到你的第三行的开头(用方向键) 3,按下v,(你发现切换到可视模式了),按方向键,知道选 ...

  2. 6、easyUI-拖放事件及应用

    一.EasyUI 基本的拖动和放置 直接代码看: <!doctype html> <html> <head> <meta http-equiv="C ...

  3. windows Objective-C模拟环境搭建

    安装GNUstep GNUstep Windows Installer提供了Windows平台下的Objective-C的模拟开发环境,一共有四个软件包,其中GNUstep System和GNUste ...

  4. 循环遍历完成后再进行else判断

    有时需要在循环遍历完后再进行else操作,通常的办法是在循环前设置一个flag,用于判断.具体例子如下:

  5. Java源码之String

    本文出自:http://blog.csdn.net/dt235201314/article/details/78330377 一丶概述 还记得那会的“Hello World”,第一个程序,输出的Str ...

  6. Vue中watch的简单应用

    Vue.js 有一个方法 watch,它可以用来监测Vue实例上的数据变动. 如果对应一个对象,键是观察表达式,值是对应回调,值也可以是方法名,或者是对象,包含选项. 下面写两个demo,参考demo ...

  7. PEP8 Python 编码规范整理(Python)

    add by zhj: 这个是豆瓣网友整理的PEP8,算是PEP8的一个简易版本,因为原PEP8内容太多,所以建议先看这篇文章,然后再看PEP8中文翻译 原文:http://www.douban.co ...

  8. W5100硬件设计和调试要点

    文章来源:成都浩然 与MCU的接口 W5100与MCU接口採用并行总线方式(假设要使用SPI接口,建议採用W5200),因此W5100与MCU的接口设计相对简单.以AT89C52为例,例如以下图所看到 ...

  9. hbase中清空整张表的数据

    hbase(main):005:0> truncate 'fr:test' Truncating 'FaceBase' table (it may take a while): - Disabl ...

  10. (4.9)SQL Server如何校验备份文件

    译 SQL Server如何校验备份文件 转自:https://blog.csdn.net/tjvictor/article/details/5261666 RESTORE VERIFYONLY与 c ...