All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@lists.netfilter.org
Subject: Re: Is ip_conntrack_ftp needed for 1:1 nat?
Date: Wed, 07 Jun 2006 17:16:39 +0200	[thread overview]
Message-ID: <4486EDD7.2040002@plouf.fr.eu.org> (raw)
In-Reply-To: <02BB8A4AC86C564C89C7F14CF98CE0C4012795@knowledge.wizdom.nu>

Sietse van Zanen wrote :
> BZZZZZZZZT

Huh ?

> You have just missed the 1.000.000 dollar question. The short answer is indeed: NO.
>  
> When you do pure 1:1 NAT and don't filter any traffic, you do not need
> to track connections, as any packet will just get NATted between the two
> addresses.

Packets will. But addresses in PORT commands or PASV replies won't. So 
when the sender of this information is masqueraded, the other side will 
try (and mostly fail) to connect to the given private address or simply 
refuse to connect because it does not match the apparent address 
(protection against abuse).

Possible workaround in passive mode : use the command EPSV instead of 
PASV, because unlike the PASV reply, the EPSV reply does not contain the 
(useless because already known) server address.
Limit : it works only for a masqueraded server, but the use of EPSV is 
up to the client, and not all FTP clients support it.

I repeat, FTP will work without tracking control connections nor special 
setup on the NATed host only in the following conditions :

- active mode with a non NATed client, so PORT commands contain the 
expected address (the server may be NATed) ;
- passive mode with a non NATed server, so PASV replies contain the 
expected address (the client may be NATed) ;
- passive mode with a NATed server when the client uses EPSV (client may 
also be NATed) ;


  reply	other threads:[~2006-06-07 15:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-06 15:52 Is ip_conntrack_ftp needed for 1:1 nat? Robert LeBlanc
2006-06-06 16:16 ` Alexandru Dragoi
2006-06-07 12:56 ` Pascal Hambourg
2006-06-07 14:32   ` Sietse van Zanen
2006-06-07 15:16     ` Pascal Hambourg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-06 16:37 Robert LeBlanc
2006-06-07 14:57 Robert LeBlanc
2006-06-07 15:01 ` Sietse van Zanen
2006-06-07 19:10 ` Pascal Hambourg

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=4486EDD7.2040002@plouf.fr.eu.org \
    --to=pascal.mail@plouf.fr.eu.org \
    --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 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.