Re: snat to multiple source ip

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

 



Harrison, Bruce (CXO) wrote:

> You're assuming that the man page accurately describes the behavior
> of the code (which normally is the case).  But how about doing a quick
> test as suggested by Derick just to be sure.  Could be a bug?

The second ip address sometimes *is* used. My guess is that SNAT
choose the second IP when the system open a second socket to the same
host.
My guess is that SNAT is working as described in the previous post:
1st socket opened to a.a.a.a  -->> SNAT with first_ip
2nd socket opened to b.b.b.b  -->> SNAT with first_ip
3rd socket opened to c.c.c.c  -->> SNAT with first_ip
4th socket opened to b.b.b.b  -->> SNAT with second_ip
5th socket opened to d.d.d.d  -->> SNAT with first_ip
6th socket opened to a.a.a.a  -->> SNAT with second_ip

It should work in this manner:

1st socket opened to a.a.a.a  -->> SNAT with first_ip
2nd socket opened to b.b.b.b  -->> SNAT with second_ip
3rd socket opened to c.c.c.c  -->> SNAT with first_ip
4th socket opened to b.b.b.b  -->> SNAT with second_ip
5th socket opened to d.d.d.d  -->> SNAT with first_ip
6th socket opened to a.a.a.a  -->> SNAT with second_ip

Right?

> Have a Great Day!

thanks!



[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