Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Could someone tell me the rules of port translation in SNAT ?
Date: Mon, 5 Jan 2004 11:14:24 +0000	[thread overview]
Message-ID: <200401051114.24879.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <BAY10-F80mi4Ho8YZ4n00031d23@hotmail.com>

On Monday 05 January 2004 6:22 am, ding dang wrote:

> When using SNAT of Netfilter as an NAPT, how will Netfilter assign the
> public UDP port for a UDP request from the private network to Internet?

With both TCP and UDP, netfilter will use the source port contained in the 
original packet if it can (ie: if that source port is not being used for 
something else by the netfilter machine).   If this is not possible, then 
another port is chosen at random using the standard socket-binding mechanism 
used for any network connection.

> Could someone detail it to me when the UDP request is
> NEW/ESTABLISHED/RELATED/REPLIED/UNREPLIED?

This makes no difference.

Antony.

-- 
In science, one tries to tell people
in such a way as to be understood by everyone
something that no-one ever knew before.

In poetry, it is the exact opposite.

 - Paul Dirac

                                                     Please reply to the list;
                                                           please don't CC me.



  reply	other threads:[~2004-01-05 11:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05  6:22 Could someone tell me the rules of port translation in SNAT ? ding dang
2004-01-05 11:14 ` Antony Stone [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-01-07  7:37 ding dang
2004-01-07  9:49 ding dang
2004-01-07 10:08 ` Antony Stone
2004-01-08  1:55 ding dang

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=200401051114.24879.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.co.uk \
    --cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox