找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4095|回复: 15

[其它] 我想问一下,如果规则重复了,为以哪一个为准

[复制链接]
发表于 2007-9-5 18:57:42 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
在防火墙里面
上面一第是通过的
下面哪一条是不准通过的,
哪防火墙的规则以哪一个为准
routeros
发表于 2007-9-5 20:34:21 | 显示全部楼层
按先后顺序!


你第一条通过,就不会走到第二条了
routeros
回复

使用道具 举报

 楼主| 发表于 2007-9-6 08:18:31 | 显示全部楼层
你的意思就是说是由上执行到下的吗?
routeros
回复

使用道具 举报

发表于 2007-9-6 09:01:53 | 显示全部楼层
结果就是除了192.168.0.12外别的不能访问外网

其实也可以用一条规则搞定的啊
routeros
回复

使用道具 举报

发表于 2007-9-6 10:05:44 | 显示全部楼层
从上到下执行,另外拒绝的规则比放行的规则有优先。要是第一条执行了,后边的相同的规则就不在执行
routeros
回复

使用道具 举报

发表于 2007-9-6 11:36:40 | 显示全部楼层
结果全部不能访问外网!!
你必须把允许放在拒绝前面.
routeros
回复

使用道具 举报

 楼主| 发表于 2007-9-6 12:16:12 | 显示全部楼层
现在我的情况是这样的

第一条我设置了192.168.0.10-192.168.0.20全天可以通过

第二条我设置了全部不能通过在12:00-13:30这段时间内

但是结果是192.168.0.10-192.168.0.20在中午12:00-13:30这段时间内都不能通过,我又没有设置错误,时间又没有错误,现在很郁闷啊
routeros
回复

使用道具 举报

发表于 2007-9-6 13:21:57 | 显示全部楼层
能不能把你的规则贴出来?
routeros
回复

使用道具 举报

 楼主| 发表于 2007-9-6 13:40:30 | 显示全部楼层
add chain=forward src-address=192.168.0.21 \
    time=0s-0s,sat,fri,thu,wed,tue,mon,sun action=accept \
    comment="H级 上网时间" disabled=no
add chain=forward src-address=192.168.0.11-192.168.0.19 \
    time=1h1m-23h59m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.51-192.168.0.52 \
    time=0s-0s,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.54 \
    time=0s-0s,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no


add chain=forward src-address=192.168.0.91 \
    time=7h30m-22h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="E级 \
    国际业务部正常上班时间" disabled=no
add chain=forward src-address=192.168.0.92 \
    time=7h30m-22h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.93 \
    time=7h30m-22h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.94 \
    time=7h30m-22h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.95 \
    time=7h30m-22h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.96 \
    time=7h30m-22h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.62 \
    time=7h30m-22h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no


add chain=forward src-address=192.168.0.24 \
    time=8h-17h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="M级 \
    上班时间" disabled=no
add chain=forward src-address=192.168.0.241 \
    time=8h-17h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.53 \
    time=8h-17h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.46 \
    time=8h-17h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.193 \
    time=8h-17h30m,sat,fri,thu,wed,tue,mon,sun action=accept comment="" \
    disabled=no
add chain=forward src-address=192.168.0.13 action=accept comment="" \
    disabled=yes


add chain=forward time=17h30m-23h59m,sat,fri,thu,wed,tue,mon,sun action=drop \
    comment="L级 上网时间" disabled=no
add chain=forward time=0s-8h,sat,fri,thu,wed,tue,mon,sun action=drop \
    comment="" disabled=no
add chain=forward time=12h-13h30m,sat,fri,thu,wed,tue,mon,sun action=drop \
    comment="" disabled=no
add chain=input in-interface=ether4 protocol=icmp action=drop comment="No \
    DDOS" disabled=no

[ 本帖最后由 slkm 于 2007-9-6 14:56 编辑 ]
routeros
回复

使用道具 举报

 楼主| 发表于 2007-9-6 13:47:37 | 显示全部楼层
我的防火墙是这样解释的

H级,上网没有时间限制
E级,限制为7:30-22:30
M级,限制为8:00-17:30
L级,限制为8:00-12:00 13:30-17:30

现在情况就是192.168.0.13在H里面,但不明白为什么中午12:00-13:30也通不过
routeros
回复

使用道具 举报

发表于 2007-9-6 14:28:10 | 显示全部楼层
可以试一下使用"!"的方法对IP段192.168.0.10-192.168.0.20之外的IP使用DORP
routeros
回复

使用道具 举报

发表于 2007-9-6 14:56:07 | 显示全部楼层
add chain=forward src-address=192.168.0.13 action=accept comment="" \
    disabled=yes /?????????
还有不要发一大堆出来,看得头晕...只发相关的就可以了
routeros
回复

使用道具 举报

 楼主| 发表于 2007-9-6 14:56:07 | 显示全部楼层

但是我觉得没必要用你这个方法啊,既然ros规则是由上到下的话,哪我为什么不行呢?
我不明白的就是这一点
routeros
回复

使用道具 举报

 楼主| 发表于 2007-9-6 14:58:00 | 显示全部楼层
原帖由 tpy372 于 2007-9-6 14:56 发表
add chain=forward src-address=192.168.0.13 action=accept comment="" \
    disabled=yes /?????????
还有不要发一大堆出来,看得头晕...只发相关的就可以了

这个是关闭的了,没有映响的吧?disabled=yes
routeros
回复

使用道具 举报

发表于 2007-9-6 16:06:24 | 显示全部楼层
你的规则设置有可能存在冲突.
你贴那么一堆代码来,看的头都大了.
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-9-28 10:17 , Processed in 0.154791 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表