免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1766 | 回复: 0

openbsd下策略路由的实现. [复制链接]

论坛徽章:
0
发表于 2009-04-09 14:56 |显示全部楼层

从IP地址A.A.A.A到另一个地址B.B.B.B的下一条路由地址C.C.C.C
linux下有ip route2 实现 ;在openbsd下应该这样实现


pass out log on em0 route-to (em0 C.C.C.C) inet from A.A.A.A to B.B.B.B flags S/SA keep state
即可.




ROUTING
     If a packet matches a rule with a route option set, the packet filter
     will route the packet according to the type of route option.  When such a
     rule creates state, the route option is also applied to all packets
     matching the same connection.
     fastroute
           The fastroute option does a normal route lookup to find the next
           hop for the packet.
     route-to
           The route-to option routes the packet to the specified interface
           with an optional address for the next hop.  When a route-to rule
           creates state, only packets that pass in the same direction as the
           filter rule specifies will be routed in this way.  Packets passing
           in the opposite direction (replies) are not affected and are routed
           normally.
     reply-to
           The reply-to option is similar to route-to, but routes packets that
           pass in the opposite direction (replies) to the specified inter-
           face.  Opposite direction is only defined in the context of a state
           entry, and reply-to is useful only in rules that create state.  It
           can be used on systems with multiple external connections to route
           all outgoing packets of a connection through the interface the in-
           coming connection arrived through (symmetric routing enforcement).
     dup-to
           The dup-to option creates a duplicate of the packet and routes it
           like route-to.  The original packet gets routed as it normally
           would.



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/21125/showart_1895419.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP