All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Liu <richardliu@ms1.techarea.org>
To: netfilter-devel@lists.netfilter.org
Subject: How to change source port in MASQUERADE mode?
Date: Fri, 30 Sep 2005 12:36:48 +0800	[thread overview]
Message-ID: <433CC0E0.5060308@ms1.techarea.org> (raw)

Hi,
I have a question about change tuple source port.
I have a nat device, and I want this device can change tuple source port
in some special conditions (not always).

I want change tuple source port in MASQUERADE module.

for example:
    Destination                Gateway                Source
    DA(Ipaddr):Port          GA:Port                SA:Port

In Masquerade modules
                                    src:GA:1000           src:SA:1000
                                    dst:DA:23               dst:DA:23

But I want to the src port be changed in some conditions like this.
                                    src:GA:50000+1000  src:SA:1000
                                    dst:DA:23               dst:DA:23

I am tracing source few days, but I still don't know which function
allocate tuple source port.
Does anyone can give me some hints, I am very appreciate.

             reply	other threads:[~2005-09-30  4:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30  4:36 Richard Liu [this message]
2005-09-30 11:58 ` How to change source port in MASQUERADE mode? Henrik Nordstrom
2005-09-30 17:13   ` Richard Liu

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=433CC0E0.5060308@ms1.techarea.org \
    --to=richardliu@ms1.techarea.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /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.