首页 > 其他 > 详细

iptables的statistic模块配置rr

时间:2019-06-26 14:06:15      阅读:451      评论:0      收藏:0      [点我收藏+]

网上搜的是这样的 :

iptables -A PREROUTING -t nat -d 172.17.64.8 -m statistic --mode nth --every 2 --packet 0 -j DNAT --to-destination xx.89.191.141

iptables -A PREROUTING -t nat -d 172.17.64.8  -m statistic --mode nth --every 2 --packet 1 -j DNAT --to-destination xx.90.200.33

但是会有没有match上的现象,可以,使用:

iptables -A PREROUTING -t nat -d 172.17.64.8 -m statistic --mode nth --every 2 --packet 1 -j DNAT --to-destination xx.89.191.141
iptables -A PREROUTING -t nat -d 172.17.64.8  -m statistic --mode nth --every 1 --packet 0 -j DNAT --to-destination xx.90.200.33 // 表示所有没有match上的包,都match这个规则

参考: http://ipset.netfilter.org/iptables-extensions.man.html

iptables的statistic模块配置rr

原文:https://www.cnblogs.com/muahao/p/11089282.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!