手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Iptables防火墙详解

[日期:2012-12-26] 来源:Linux社区  作者:abc16810 [字体:大 中 小]

4. time(时间匹配,iptables默认么加载)

Match only if today is one of the given days. (format: Mon,Tue,Wed,Thu,Fri,Sat,Sun ; default everyday)

(只是匹配已经给出的天,格式Mon,Tue,Wed,Thu,Fri,Sat,Sun ;默认每天)

(开始日期 日期)

Match only if it is after `date' (Inclusive, format: YYYY]]]] h,m,s start from 0 ; default to 1970)

(只是匹配这个开始日期值之后的(包括,格式: YYYY]]]] h,m,s start from 0 ; 默认是1970):

Match only if it is before `date' (Inclusive, format: YYYY]]]] h,m,s start from 0 ; default to 2037)

(只是匹配这个开始日期值之前的(包括,格式: YYYY]]]] h,m,s start from 0 ; 默认是2037):

(例子:)

-A INPUT -m time --timestart 8:00 --timestop 18:00 --days Mon,Tue,Wed,Thu,Fri

will match packets that have an arrival timestamp in the range 8:00->18:00 from Monday to Friday.

(上面将匹配从到达日期是星期一至星期五时间从8:00至18:00的包)

-A OUTPUT -m time --timestart 8:00 --timestop 18:00 --Days Mon --date-stop 2010

will match the packets (locally generated) that have a departure timestamp in the range 8:00->18:00 on Monday only, until 2010

(上面将匹配本地产生的时间范围直到2010年为止的每个星期一8:00至18:00的包)

NOTE: the time match does not track changes in daylight savings time

5. iprange (ip范围匹配,iptables默认没有加载该模块)

这个补丁名令匹配源/目标 IP地址可以倚着给出的地址范围进行匹配

(例子)

iptables -A FORWARD -m iprange --src-range 192.168.1.5-192.168.1.124 -j ACCEPT

这个例子是允许源ip地址范围192.168.1.5-192.168.1.124的包通过

iptables -A FORWARD -m iprange --dst-range 10.0.0.0-10.255.255.255 -j ACCEPT

这个例子是允许目标ip地址范围10.0.0.0-10.255.255.255的包通过

等等 iptables支持多达上百个模块(在/lib/iptables/),功能很丰富。关于iptables就介绍到这吧!!!!!!。

linux
相关资讯       IpTables  Iptables防火墙  iptables详解 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款