码迷,mamicode.com
首页 > Web开发 > 详细

[linux/net]策略路由实现特定主机特定路径

时间:2014-07-19 21:16:00      阅读:305      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   2014   

bubuko.com,布布扣
 
  echo 200 silence >> /etc/iproute2/rt_tables
ip rule add from 10.192.0.230 table silence
ip rule add from 10.192.0.231 table silence
ip rule add from 10.192.0.232 table silence
ip rule add from 10.192.0.233 table silence
ip rule add from 10.192.0.234 table silence
ip rule add from 10.192.0.235 table silence
ip rule add from 10.192.0.236 table silence
ip route add default via 117.172.xxx.1 dev eth2 table silence


iptables -t nat -A POSTROUTING -s 10.192.0.230/32 -j SNAT --to-source 117.172.xxx.17
iptables -t nat -A POSTROUTING -s 10.192.0.231/32 -j SNAT --to-source 117.172.xxx.17
iptables -t nat -A POSTROUTING -s 10.192.0.232/32 -j SNAT --to-source 117.172.xxx.17
iptables -t nat -A POSTROUTING -s 10.192.0.233/32 -j SNAT --to-source 117.172.xxx.17
iptables -t nat -A POSTROUTING -s 10.192.0.234/32 -j SNAT --to-source 117.172.xxx.17
iptables -t nat -A POSTROUTING -s 10.192.0.235/32 -j SNAT --to-source 117.172.xxx.17
iptables -t nat -A POSTROUTING -s 10.192.0.236/32 -j SNAT --to-source 117.172.xxx.17

[linux/net]策略路由实现特定主机特定路径,布布扣,bubuko.com

[linux/net]策略路由实现特定主机特定路径

标签:style   blog   http   color   os   2014   

原文地址:http://www.cnblogs.com/silenceli/p/3849449.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!