-4

I want to set IP Rotation using iptables so I am using below code.

My server Virtualization Type is OpenVZ.

My server provider has enabled all the options then also don't know what is the wrong, It is showing error iptables: No chain/target/match by that name.

iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.1
iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.2
iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.3

They are also ready to enable my needed options so if need any specific option to enable then please tell me.

Or is there any other problem ??? Please help me to solve this.

I found similar question here : Can't resolve issue: iptables: No chain/target/match by that name, but I can find any specific answer there like how to solve it with OpenVZ. So, I have created new question for attention.

  • @BE77Y, I already checked that post but I dint find any solution. I want to know how to solve this within `openVZ`. My server provider is also ready to enable any needed modules. – Jeeten Parmar Mar 27 '15 at 11:36
  • 1
    Asking the same question again is still a poor choice in my opinion - if anything you could request that your original question be re-opened. – BE77Y Mar 27 '15 at 11:37
  • @BE77Y, ohk sir. But, please help me to solve this now. – Jeeten Parmar Mar 27 '15 at 11:38
  • 1
    No - as I've said above, simply duplicating an already-asked question is unlikely to help yourself. In any case, you've found the same response from @c4f4t0r below as on the question linked above - which is almost certainly the answer you're looking for. – BE77Y Mar 27 '15 at 11:39

1 Answers1

2

i think you are missing some kernel module in your openvz container, because if I use "iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source 1.1.1.2" in my linux workstation it works

Maybe the missing modules is "xt_statistic"

c4f4t0r
  • 5,149
  • 3
  • 28
  • 41