最新帖子 精华区 社区服务 会员列表 统计排行 银行 广告管理
主题 : linux的IProute2和FreeBSD的PF,双线基于源地址的路由回包设置
jack 离线
级别: 管理员
显示用户信息 
0  发表于: 2009-05-25 17:06

linux的IProute2和FreeBSD的PF,双线基于源地址的路由回包设置

张森力作,大家学习 eht0接电信网线 ,eth1接网通网线
$if_tel=电信IP   $gw_tel=电信网关
$if_cnc=网通IP   $gw_cnc=网通网关

Linux

ip route add default via $gw_tel dev eth0 src $if_tel table 100
ip route add default via $gw_cnc dev eth1 src $if_cnc table 200
ip rule add from $if_tel table 100
ip rule add from $if_cnc table 200

FreeBSD

pass out quick route-to ( 电信网卡 电信网关IP ) from 电信IP to any
pass out quick route-to ( 网通网卡 网通网关IP ) from 网通IP to any本文出自 “天盈技术交流共享” 博客,请务必保留此出处http://takewin.blog.51cto.com/485348/110546
From:江苏省常州市 顶端
快速回复 顶端
内容
HTML 代码不可用
使用签名
Wind Code自动转换

按"Ctrl+Enter"直接提交