All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with SNAT and same port number
@ 2004-02-23  3:30 netfilter
  0 siblings, 0 replies; only message in thread
From: netfilter @ 2004-02-23  3:30 UTC (permalink / raw)
  To: netfilter

Hi,

I am wanting to change the source address of outgoing packets that have a src 
port of 53.

I have tried 
/sbin/iptables -A POSTROUTING -p tcp -t nat -o bond0 --sport 53 -j SNAT 
--to-source 192.168.0.1:53

This doesnt work, it seems to be that you cant SNAT to a port the same as the 
original src port because

/sbin/iptables -A POSTROUTING -p tcp -t nat -o bond0 --sport 53 -j SNAT 
--to-source 192.168.0.1

/sbin/iptables -A POSTROUTING -p tcp -t nat -o bond0 --sport 53 -j SNAT 
--to-source 192.168.0.1:52

both works, but obviously not the same results as I wanted because the src 
port is also changed.

Is there any other way to do what I am wanting??

TIA


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-23  3:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23  3:30 Problem with SNAT and same port number netfilter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.