独学而无友,则孤陋而寡闻!
| 标题 | 阅读 | 评论 | 转发 | 发布日期 | |
|---|---|---|---|---|---|
| 在线教育行业的五大挑战 | 1587 | 0 | 0 | 2015-06-23 | |
| IT的比喻(未完) | 1484 | 0 | 0 | 2013-02-07 | |
| 反论:评价量规是摆设 | 1934 | 0 | 0 | 2012-08-24 | |
| 高中信息技术“三五四”教学策略 | 1612 | 0 | 0 | 2012-07-07 | |
| 正确握笔图 | 2491 | 0 | 0 | 2011-03-08 | |
| 笔顺易错字 | 1142 | 0 | 0 | 2011-03-08 | |
| 常见字笔顺 | 1542 | 0 | 0 | 2011-03-08 | |
| 走投无路当教师 | 1530 | 0 | 0 | 2010-09-16 | |
| 带圈字符的输入 | 1452 | 0 | 0 | 2010-07-12 | |
| Linux教学的误区 | 1303 | 0 | 0 | 2010-07-06 | |
| 各国对学生的处罚 | 2570 | 0 | 0 | 2010-07-06 | |
| URL、URI、以及URN | 1773 | 0 | 0 | 2010-03-27 | |
| 没有主题的邮件 | 1636 | 0 | 0 | 2010-03-21 | |
| 一位教研员自曝:没想到捞那么多“外快” | 1991 | 0 | 0 | 2010-02-11 | |
| 六字决 | 1911 | 0 | 0 | 2009-08-25 | |
| 高考舞弊,来自哪里,又伤害了谁? | 1513 | 0 | 0 | 2009-06-16 | |
| 山东省信息技术学业水平考试在线模拟题 | 1801 | 0 | 0 | 2009-04-29 | |
| 第一次听说“磨课” | 2142 | 0 | 0 | 2009-02-05 | |
| Ubuntu和PC-BSD的比较(草稿) | 4599 | 1 | 0 | 2009-01-31 | |
| 什么样人够格做校长? | 1391 | 0 | 0 | 2009-01-11 |
adx1102011-06-18 19:43
superzjq2011-06-10 23:38
非常感谢老师的关注:)使用skipto可以解决这个问题
但还有点疑问,one_pass不是只跟nat和pipe有关吗,limit应该是属于动态规则吧 ?
在下不才 针对两种情况进行了测试
net.inet.ip.fw.one_pass = 0
# ipfw show
00100 9 529 allow ip from 192.168.1.0/24 to any in via em1 limit src-addr 100
00200 0 0 nat 1 ip from 192.168.1.0/24 to any out via em0
00300 0 0 nat 1 ip from any to me in via em0
00400 3 373 allow ip from any to any(用来匹配所有重新进入ipfw的数据包)
65535 0 0 deny ip from any to any
net.inet.ip.fw.one_pass = 1
# ipfw show
00100 8 480 allow ip from 192.168.1.0/24 to any in via em1 limit src-addr 100
00200 0 0 nat 1 ip from 192.168.1.0/24 to any out via em0
00300 0 0 nat 1 ip from any to me in via em0
00400 0 0 allow ip from any to 192.168.1.0/24 out via em1
65535 45 1262 deny ip from any to any
其中em0接外网,em1接内网,有没one_pass都一样,数据包一被limit匹配后就没了下文
只能跟skipto一起使用,不知道是不是BUG,还是说有哪些地方需要设置
我用的是FreeBSD 8.2,内核配置都是默认的 
superzjq2011-05-26 17:59
老师您好,能否帮我看下这段配置
ipfw add allow ip from 192.168.1.0/24 to any in via em1 limit src-addr 10
ipfw add nat 1 ip from 192.168.1.0/24 to any out via em0
ipfw add nat 1 ip from any to me in via em0
ipfw nat 1 config if em0 log
ipfw add allow ip from any to any
em0接外网,em1接内网,做了NAT,想限制每IP连接数,已经明确指定了方向和接口,但不知为何数据包被第一条limit匹配后就无法到达第二条的nat上了,去掉第一条的limit部分后则完全没有问题,实在是让我郁闷不已,望不吝赐教
