All of lore.kernel.org
 help / color / mirror / Atom feed
* specify source port on NAT
@ 2007-06-29 13:37 Snow Wolf
  2007-06-29 16:57 ` Jorge Davila
  0 siblings, 1 reply; 2+ messages in thread
From: Snow Wolf @ 2007-06-29 13:37 UTC (permalink / raw)
  To: netfilter

hello members,

My client has a strange requirement.When I made a nat firewall with
iptables for him,he need the forwarded package's source port was not
changed,or changed to a specified port which he can control.

For example,

192.168.1.1  --->   iptables(nat)  ---> www.aol.com
(sport: 1234)          (sport: 1234)       (dport:80)

He need that when a package was left from iptables,the source port was
still 1234.
(or something like 1235 is also ok,but he need to control it,it means
he can descide which port is the source port from iptables.)

How to do it?thanks.


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

* Re: specify source port on NAT
  2007-06-29 13:37 specify source port on NAT Snow Wolf
@ 2007-06-29 16:57 ` Jorge Davila
  0 siblings, 0 replies; 2+ messages in thread
From: Jorge Davila @ 2007-06-29 16:57 UTC (permalink / raw)
  To: Snow Wolf; +Cc: netfilter


 From http://iptables-tutorial.frozentux.net/

An example:

iptables -t nat -A POSTROUTING -p tcp -o eth0 -j SNAT --to-source 
194.236.50.155-194.236.50.160:1024-32000

Best regards,

Jorge Dávila.

Snow Wolf wrote:
> hello members,
> 
> My client has a strange requirement.When I made a nat firewall with
> iptables for him,he need the forwarded package's source port was not
> changed,or changed to a specified port which he can control.
> 
> For example,
> 
> 192.168.1.1  --->   iptables(nat)  ---> www.aol.com
> (sport: 1234)          (sport: 1234)       (dport:80)
> 
> He need that when a package was left from iptables,the source port was
> still 1234.
> (or something like 1235 is also ok,but he need to control it,it means
> he can descide which port is the source port from iptables.)
> 
> How to do it?thanks.
> 
> 


-- 
Jorge Isaac Davila Lopez
Nicaragua Open Source
+505 430 5462
davila@nicaraguaopensource.com



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

end of thread, other threads:[~2007-06-29 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29 13:37 specify source port on NAT Snow Wolf
2007-06-29 16:57 ` Jorge Davila

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.