独学而无友,则孤陋而寡闻!
| 标题 | 阅读 | 评论 | 转发 | 发布日期 | |
|---|---|---|---|---|---|
| 【推荐】 WordPress的NextGenGallery无法上传中文名图片 | 2263 | 0 | 0 | 2012-03-17 | |
| dedecms调用discuz论坛日志,头像相册方法整理贴 | 12460 | 0 | 0 | 2011-02-13 | |
| 让dedecms后台能使用中文名登录 | 2227 | 0 | 0 | 2011-02-11 | |
| edown自动审核 | 2370 | 0 | 0 | 2011-01-11 | |
| dede过长网址被截断的处理 | 1968 | 0 | 0 | 2010-11-09 | |
| Dedecms综合应用讲座 | 1352 | 0 | 0 | 2010-11-09 | |
| typo3的函数与类笔记 | 2208 | 0 | 0 | 2010-04-17 | |
| Modx Notation(2) | 2934 | 0 | 0 | 2010-03-19 | |
| modx资料笔记 | 2392 | 0 | 0 | 2010-03-19 | |
| 关于typo3和modx的讨论(节选) | 2722 | 0 | 0 | 2010-03-19 | |
| 几种cms/blog系统试用记 | 1799 | 0 | 0 | 2010-03-18 | |
| typo3修改小结 | 1669 | 0 | 0 | 2010-03-02 | |
| typo3模板站点 | 3618 | 0 | 0 | 2009-10-21 | |
| typo3的wecdiscussion插件宽度会不到边 | 1604 | 0 | 0 | 2009-10-18 | |
| TYPO3 ext小记 - 部分文件的作用 | 1334 | 0 | 0 | 2009-10-10 | |
| typo3学习资源 | 1469 | 0 | 0 | 2009-10-10 | |
| TYPO3安装注意事项 | 6157 | 0 | 0 | 2009-10-09 | |
| Typo3常用缩写 | 1461 | 0 | 0 | 2009-10-08 | |
| habari推荐的nginx配置 | 1300 | 0 | 0 | 2009-10-05 | |
| drupal学习资源 | 1457 | 0 | 0 | 2009-07-21 |
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部分后则完全没有问题,实在是让我郁闷不已,望不吝赐教
