Linux Netfilter discussions
 help / color / mirror / Atom feed
* difference between SNAT and SAME Patch?
@ 2002-09-17  8:27 SB CH
  2002-09-17  9:26 ` Martin Josefsson
  0 siblings, 1 reply; 2+ messages in thread
From: SB CH @ 2002-09-17  8:27 UTC (permalink / raw)
  To: netfilter

Hello, all.

what's the difference of the SNAT and SAME patch?

 ex)
1)iptables -t nat -A POSTROUTING -j SNAT --to-source 1.2.3.4-1.2.3.7
2)iptables -t nat -A POSTROUTING -j SAME --to 1.2.3.4-1.2.3.7

Thanks in advance.


_________________________________________________________________
고 / 감 / 도 / 사 / 랑 / 만 / 들 / 기 MSN 러브 http://www.msn.co.kr/love/



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: difference between SNAT and SAME Patch?
  2002-09-17  8:27 difference between SNAT and SAME Patch? SB CH
@ 2002-09-17  9:26 ` Martin Josefsson
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Josefsson @ 2002-09-17  9:26 UTC (permalink / raw)
  To: SB CH; +Cc: Netfilter

On Tue, 2002-09-17 at 10:27, SB CH wrote:
> Hello, all.
> 
> what's the difference of the SNAT and SAME patch?
> 
>  ex)
> 1)iptables -t nat -A POSTROUTING -j SNAT --to-source 1.2.3.4-1.2.3.7
> 2)iptables -t nat -A POSTROUTING -j SAME --to 1.2.3.4-1.2.3.7

SNAT will use the currently least used ip in the range for the new
connection. That means that clients can get diffrent ip's for their
connections, even against the same server and some webservers don't like
this, ie. hotmail, banking via internet....

SAME on the other hand doesn't care which ip has the least number of
connections. It will calculate which ip in the range to use for a given
client, that way a client always gets the same ip on all of it's
connections. I wrote this target when users complained about banking via
internet not working via SNAT with multiple ip's.

(SAME uses both the clients ipadress and the ip of the server you are
trying to connect to in the calculation so by default clients will get
diffrent ip's against diffrent servers but always the same ip against
the same server. There is an option to force it to only care about the
clients ip so that they will always get the same ip regardless of which
server they are trying to connect to, that option is called --nodst,
this is how I use it here)

I hope that helps.

-- 
/Martin

Never argue with an idiot. They drag you down to their level, then beat
you with experience.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-17  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-17  8:27 difference between SNAT and SAME Patch? SB CH
2002-09-17  9:26 ` Martin Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox