Re: match nth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pedro Drimel Neto wrote:

> Hi all,
>
> I'm using the module nth... and I know that is support only --packet 0
--packet 1 and --packet 2 what means that I can use only 3 IP with it...
right ?
>
> If I add a network card (-o eth1) could I use more IP's ?
>
> Regards...
>
>
>

Please read the docs carefully:-
http://netfilter.org/projects/patch-o-matic/pom-base.html#pom-base-nth

If u want to add more IP's then what u have to do  just increase the
--every value .
for example:-

iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 5 \
--packet 0 -j SNAT --to-source 10.0.0.5
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 5 \
--packet 1 -j SNAT --to-source 10.0.0.6
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 5 \
--packet 2 -j SNAT --to-source 10.0.0.7
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 5 \
--packet 3 -j SNAT --to-source 10.0.0.8
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 5 \
--packet 4 -j SNAT --to-source 10.0.0.9

i think there is no need to add more interface card.
Please correct me if i am wrong.

Thanks
Vikrant



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux