From: "ding dang" <jiadeip@hotmail.com>
To: netfilter@lists.netfilter.org
Subject: Re: Could someone tell me the rules of port translation in SNAT ?
Date: Wed, 07 Jan 2004 07:37:22 +0000 [thread overview]
Message-ID: <BAY10-F1037eQFo6iJk0001e3f5@hotmail.com> (raw)
> > 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.
Thanks.
But what i observed is:(SNAT using UDP port 20000-30000)
private addr netfilter port Internet addr
10.0.0.8:2000 ---> 20000 ----> 193.0.0.8:3000
10.0.0.8:2001 ---> 20000 ----> 193.0.0.8:3001
10.0.0.8:2002 ---> 20000 ----> 193.0.0.8:3002
that means DIFFERENT UDP requests from private network for DIFFERENT
Internet destination result in a same Netfilter port no matter the Internet
destination sends reply or not ;
private addr netfilter port Internet addr
10.0.0.8:2000 ---> 20000 ----> 193.0.0.8:3000
10.0.0.8:2001 ---> 20001 ----> 193.0.0.8:3000
10.0.0.8:2002 ---> 20002 ----> 193.0.0.8:3000
DIFFERENT UDP requests from private network for a SAME Internet destination
result in DIFFERENT Netfilter ports, why?
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
next reply other threads:[~2004-01-07 7:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 7:37 ding dang [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-08 1:55 Could someone tell me the rules of port translation in SNAT ? ding dang
2004-01-07 9:49 ding dang
2004-01-07 10:08 ` Antony Stone
2004-01-05 6:22 ding dang
2004-01-05 11:14 ` Antony Stone
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=BAY10-F1037eQFo6iJk0001e3f5@hotmail.com \
--to=jiadeip@hotmail.com \
--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