首页 > 代码库 > [linux/net]策略路由实现特定主机特定路径
[linux/net]策略路由实现特定主机特定路径
echo 200 silence >> /etc/iproute2/rt_tables
ip rule add from 10.192.0.230 table silenceip rule add from 10.192.0.231 table silenceip rule add from 10.192.0.232 table silenceip rule add from 10.192.0.233 table silenceip rule add from 10.192.0.234 table silenceip rule add from 10.192.0.235 table silenceip rule add from 10.192.0.236 table silenceip route add default via 117.172.xxx.1 dev eth2 table silenceiptables -t nat -A POSTROUTING -s 10.192.0.230/32 -j SNAT --to-source 117.172.xxx.17iptables -t nat -A POSTROUTING -s 10.192.0.231/32 -j SNAT --to-source 117.172.xxx.17iptables -t nat -A POSTROUTING -s 10.192.0.232/32 -j SNAT --to-source 117.172.xxx.17iptables -t nat -A POSTROUTING -s 10.192.0.233/32 -j SNAT --to-source 117.172.xxx.17iptables -t nat -A POSTROUTING -s 10.192.0.234/32 -j SNAT --to-source 117.172.xxx.17iptables -t nat -A POSTROUTING -s 10.192.0.235/32 -j SNAT --to-source 117.172.xxx.17iptables -t nat -A POSTROUTING -s 10.192.0.236/32 -j SNAT --to-source 117.172.xxx.17
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。