All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jorge Davila <davila@nicaraguaopensource.com>
To: Snow Wolf <snowwolfv@gmail.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: specify source port on NAT
Date: Fri, 29 Jun 2007 10:57:22 -0600	[thread overview]
Message-ID: <468539F2.50106@nicaraguaopensource.com> (raw)
In-Reply-To: <6d86fd720706290637i60bb2fb3l12408f33e2a8bf4d@mail.gmail.com>


 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



      reply	other threads:[~2007-06-29 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29 13:37 specify source port on NAT Snow Wolf
2007-06-29 16:57 ` Jorge Davila [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=468539F2.50106@nicaraguaopensource.com \
    --to=davila@nicaraguaopensource.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=snowwolfv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.