Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "ding dang" <jiadeip@hotmail.com>
To: spoft@sohu.com
Cc: netfilter@lists.netfilter.org
Subject: Re: Could someone tell me the rules of port translation in SNAT ?
Date: Wed, 07 Jan 2004 09:49:42 +0000	[thread overview]
Message-ID: <BAY10-F100u8E4ej3vp0003a1c1@hotmail.com> (raw)




>From: "spoft" <spoft@sohu.com>
>To: "ding dang" <jiadeip@hotmail.com>
>Subject: Re: Could someone tell me the rules of port translation in SNAT ?
>Date: Wed, 7 Jan 2004 16:19:53 +0800
>
>dst ip, dst port, and SNATed sport of the connections must be unique. So 
the firewall can NATed correctly and enough.
>So when:
>    1) dst ip and dst port are same,then the SNATed sport must be 
different between two connetions.
>    2) dst ip or dst port is different, then the SNATed sport may be same 
between two connections.

Thanks.

For 2) above:  when will the SNATed sport be different then?


> >
> > 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
> >
> >
> >

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  



             reply	other threads:[~2004-01-07  9:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-07  9:49 ding dang [this message]
2004-01-07 10:08 ` Could someone tell me the rules of port translation in SNAT ? Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2004-01-08  1:55 ding dang
2004-01-07  7:37 ding dang
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-F100u8E4ej3vp0003a1c1@hotmail.com \
    --to=jiadeip@hotmail.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=spoft@sohu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox